Xiao Li created SPARK-17783:
-------------------------------
Summary: Hide Credentials in CREATE and DESC FORMATTED/EXTENDED a
PERSISTENT/TEMP Table for JDBC
Key: SPARK-17783
URL: https://issues.apache.org/jira/browse/SPARK-17783
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.0.1, 2.1.0
Reporter: Xiao Li
Priority: Critical
We should never expose the Credentials in the EXPLAIN and DESC
FORMATTED/EXTENDED command
{noformat}
CREATE TABLE tab1 USING org.apache.spark.sql.jdbc
{noformat}
{noformat}
== Physical Plan ==
ExecutedCommand
+- CreateDataSourceTableCommand CatalogTable(
Table: `tab1`
Created: Tue Oct 04 21:39:44 PDT 2016
Last Access: Wed Dec 31 15:59:59 PST 1969
Type: MANAGED
Provider: org.apache.spark.sql.jdbc
Storage(Properties:
[url=jdbc:h2:mem:testdb0;user=testUser;password=testPass, dbtable=TEST.PEOPLE,
user=testUser, password=testPass])), false
{noformat}
{noformat}
DESC FORMATTED tab1
{noformat}
{noformat}
...
|# Storage Information |
| |
|Compressed: |No
| |
|Storage Desc Parameters: |
| |
| path
|file:/Users/xiaoli/IdeaProjects/sparkDelivery/spark-warehouse/tab1| |
| url
|jdbc:h2:mem:testdb0;user=testUser;password=testPass | |
| dbtable |TEST.PEOPLE
| |
| user |testUser
| |
| password |testPass
| |
+----------------------------+------------------------------------------------------------------+-------+
{noformat}
{noformat}
DESC EXTENDED tab1
{noformat}
{noformat}
...
Storage(Properties:
[path=file:/Users/xiaoli/IdeaProjects/sparkDelivery/spark-warehouse/tab1,
url=jdbc:h2:mem:testdb0;user=testUser;password=testPass, dbtable=TEST.PEOPLE,
user=testUser, password=testPass]))| |
{noformat}
{noformat}
CREATE TEMP VIEW tab1 USING org.apache.spark.sql.jdbc
{noformat}
{noformat}
== Physical Plan ==
ExecutedCommand
+- CreateTempViewUsing `tab1`, false, org.apache.spark.sql.jdbc, Map(url ->
jdbc:h2:mem:testdb0;user=testUser;password=testPass, dbtable -> TEST.PEOPLE,
user -> testUser, password -> testPass)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]