Description
We should never expose the Credentials in the EXPLAIN and DESC FORMATTED/EXTENDED command. However, below commands exposed the credentials.
CREATE TABLE tab1 USING org.apache.spark.sql.jdbc
== 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
DESC FORMATTED tab1
... |# 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 | | +----------------------------+------------------------------------------------------------------+-------+
DESC EXTENDED tab1
... 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]))| |
CREATE TEMP VIEW tab1 USING org.apache.spark.sql.jdbc
== 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)
Attachments
Issue Links
- relates to
-
SPARK-28642 Hide credentials in show create table
- Resolved
- links to