Skip to content

Commit 5dd84c6

Browse files
committed
remove auth secret conf from initial set up for executors
1 parent 90cb7d2 commit 5dd84c6

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

core/src/main/scala/org/apache/spark/SecurityManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

core/src/main/scala/org/apache/spark/SparkConf.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

core/src/main/scala/org/apache/spark/deploy/worker/CommandUtils.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)