[SPARK-16796][WEB UI] Mask spark.authenticate.secret on Spark environ…
## What changes were proposed in this pull request? Mask `spark.authenticate.secret` on Spark environment page (Web UI). This is addition to https://github.com/apache/spark/pull/14409 ## How was this patch tested? `./dev/run-tests` [info] ScalaTest [info] Run completed in 1 hour, 8 minutes, 38 seconds. [info] Total number of tests run: 2166 [info] Suites: completed 65, aborted 0 [info] Tests: succeeded 2166, failed 0, canceled 0, ignored 590, pending 0 [info] All tests passed. Author: Artur Sukhenko <artur.sukhenko@gmail.com> Closes #14484 from Devian-ua/SPARK-16796.
This commit is contained in:
parent
55d6dad6f2
commit
14dba45208
|
@ -27,7 +27,9 @@ private[ui] class EnvironmentPage(parent: EnvironmentTab) extends WebUIPage("")
|
|||
private val listener = parent.listener
|
||||
|
||||
private def removePass(kv: (String, String)): (String, String) = {
|
||||
if (kv._1.toLowerCase.contains("password")) (kv._1, "******") else kv
|
||||
if (kv._1.toLowerCase.contains("password") || kv._1.toLowerCase.contains("secret")) {
|
||||
(kv._1, "******")
|
||||
} else kv
|
||||
}
|
||||
|
||||
def render(request: HttpServletRequest): Seq[Node] = {
|
||||
|
|
Loading…
Reference in a new issue