Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4960#discussion_r33997902
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
 ---
    @@ -38,14 +41,51 @@ private[mesos] trait MesosSchedulerUtils extends 
Logging {
       // Driver for talking to Mesos
       protected var mesosDriver: MesosSchedulerDriver = null
     
    +  protected def createSchedulerDriver(
    +      masterUrl: String,
    +      scheduler: Scheduler,
    +      sparkUser: String,
    +      appName: String,
    +      conf: SparkConf,
    +      webuiUrl: Option[String] = None,
    +      checkpoint: Option[Boolean] = None,
    +      failoverTimeout: Option[Double] = None,
    +      frameworkId: Option[String] = None): MesosSchedulerDriver = {
    +    val fwInfoBuilder = 
FrameworkInfo.newBuilder().setUser(sparkUser).setName(appName)
    +    val credBuilder = Credential.newBuilder()
    +    webuiUrl.foreach { url => fwInfoBuilder.setWebuiUrl(url) }
    +    checkpoint.foreach { checkpoint => 
fwInfoBuilder.setCheckpoint(checkpoint) }
    +    failoverTimeout.foreach { timeout => 
fwInfoBuilder.setFailoverTimeout(timeout) }
    +    frameworkId.foreach { id =>
    +      fwInfoBuilder.setId(FrameworkID.newBuilder().setValue(id).build())
    +    }
    +    conf.getOption("spark.mesos.principal").foreach { principal =>
    +      fwInfoBuilder.setPrincipal(principal)
    +      credBuilder.setPrincipal(principal)
    +    }
    +    conf.getOption("spark.mesos.secret").foreach { secret =>
    +      credBuilder.setSecret(ByteString.copyFromUtf8(secret))
    +    }
    +    if (credBuilder.hasSecret && !fwInfoBuilder.hasPrincipal) {
    --- End diff --
    
    hm, if the secret is not set then the security guarantees are fairly weak, 
aren't they? Anyone can pretend to be admin.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to