You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/20 20:53:45 UTC

[GitHub] [spark] mridulm commented on a change in pull request #30446: [spark-33504] The application log in the Spark history server contains sensitive attributes should be redated

mridulm commented on a change in pull request #30446:
URL: https://github.com/apache/spark/pull/30446#discussion_r527964297



##########
File path: core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala
##########
@@ -97,6 +97,17 @@ class EventLoggingListenerSuite extends SparkFunSuite with LocalSparkContext wit
     assert(redactedProps(key) == "*********(redacted)")
   }
 
+  test("Spark-33504 password redaction in properties") {
+    val key = "spark.executorEnv.HADOOP_CREDSTORE_PASSWORD"
+    val secretPassword = "secret_password"
+    val conf = getLoggingConf(testDirPath, None).set(key, secretPassword)
+    val properties = new Properties()
+    properties.setProperty(key, secretPassword)
+    val eventLogger = new EventLoggingListener("test", None, testDirPath.toUri(), conf)
+    val redactedProperties = eventLogger.redactProperties(properties)

Review comment:
       Test whether `SparkListenerJobStart` is updated as required ? `redactProperties` can be made private




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org