-
- Downloads
[SPARK-20435][CORE] More thorough redaction of sensitive information
This change does a more thorough redaction of sensitive information from logs and UI Add unit tests that ensure that no regressions happen that leak sensitive information to the logs. The motivation for this change was appearance of password like so in `SparkListenerEnvironmentUpdate` in event logs under some JVM configurations: `"sun.java.command":"org.apache.spark.deploy.SparkSubmit ... --conf spark.executorEnv.HADOOP_CREDSTORE_PASSWORD=secret_password ..." ` Previously redaction logic was only checking if the key matched the secret regex pattern, it'd redact it's value. That worked for most cases. However, in the above case, the key (sun.java.command) doesn't tell much, so the value needs to be searched. This PR expands the check to check for values as well. ## How was this patch tested? New unit tests added that ensure that no sensitive information is present in the event logs or the yarn logs. Old unit test in UtilsSuite was modified because the test was asserting that a non-sensitive property's value won't be redacted. However, the non-sensitive value had the literal "secret" in it which was causing it to redact. Simply updating the non-sensitive property's value to another arbitrary value (that didn't have "secret" in it) fixed it. Author: Mark Grover <mark@apache.org> Closes #17725 from markgrover/spark-20435.
Showing
- core/src/main/scala/org/apache/spark/internal/config/package.scala 2 additions, 2 deletions...main/scala/org/apache/spark/internal/config/package.scala
- core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala 11 additions, 5 deletions...ala/org/apache/spark/scheduler/EventLoggingListener.scala
- core/src/main/scala/org/apache/spark/util/Utils.scala 18 additions, 4 deletionscore/src/main/scala/org/apache/spark/util/Utils.scala
- core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala 34 additions, 0 deletions...test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
- core/src/test/scala/org/apache/spark/util/UtilsSuite.scala 7 additions, 3 deletionscore/src/test/scala/org/apache/spark/util/UtilsSuite.scala
- docs/configuration.md 2 additions, 2 deletionsdocs/configuration.md
- resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala 26 additions, 6 deletions...scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala
Loading
Please register or sign in to comment