Skip to content

Commit 14dba45

Browse files
Devian-uasrowen
authored andcommitted
[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 #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.
1 parent 55d6dad commit 14dba45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/scala/org/apache/spark/ui/env/EnvironmentPage.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ private[ui] class EnvironmentPage(parent: EnvironmentTab) extends WebUIPage("")
2727
private val listener = parent.listener
2828

2929
private def removePass(kv: (String, String)): (String, String) = {
30-
if (kv._1.toLowerCase.contains("password")) (kv._1, "******") else kv
30+
if (kv._1.toLowerCase.contains("password") || kv._1.toLowerCase.contains("secret")) {
31+
(kv._1, "******")
32+
} else kv
3133
}
3234

3335
def render(request: HttpServletRequest): Seq[Node] = {

0 commit comments

Comments
 (0)