File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
core/src/main/scala/org/apache/spark Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ private[spark] class SecurityManager(sparkConf: SparkConf)
370370 .orElse(sparkConf.getOption(SecurityManager .SPARK_AUTH_SECRET_CONF )) match {
371371 case Some (value) => value
372372 case None => throw new Exception (" Error: a secret key must be specified via the " +
373- " spark.authenticate.secret config" )
373+ SecurityManager . SPARK_AUTH_SECRET_CONF + " config" )
374374 }
375375 }
376376 sCookie
Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ private[spark] object SparkConf extends Logging {
557557 def isExecutorStartupConf (name : String ): Boolean = {
558558 isAkkaConf(name) ||
559559 name.startsWith(" spark.akka" ) ||
560- name.startsWith(" spark.auth" ) ||
560+ ( name.startsWith(" spark.auth" ) && name != SecurityManager . SPARK_AUTH_SECRET_CONF ) ||
561561 name.startsWith(" spark.ssl" ) ||
562562 isSparkPortConf(name)
563563 }
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ object CommandUtils extends Logging {
9898 newEnvironment,
9999 command.classPathEntries ++ classPath,
100100 Seq [String ](), // library path already captured in environment variable
101+ // filter out auth secret from java options
101102 command.javaOpts.filterNot(_.startsWith(" -D" + SecurityManager .SPARK_AUTH_SECRET_CONF )))
102103 }
103104
You can’t perform that action at this time.
0 commit comments