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

    https://github.com/apache/spark/pull/509#discussion_r11959231
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---
    @@ -167,17 +167,23 @@ class HistoryServer(
        * directory. If this file exists, the associated application is 
regarded to be completed, in
        * which case the server proceeds to render the SparkUI. Otherwise, the 
server does nothing.
        */
    -  private def renderSparkUI(logDir: FileStatus, logInfo: EventLoggingInfo) 
{
    +  private def renderSparkUI(logDir: FileStatus, elogInfo: 
EventLoggingInfo) {
         val path = logDir.getPath
         val appId = path.getName
    -    val replayBus = new ReplayListenerBus(logInfo.logPaths, fileSystem, 
logInfo.compressionCodec)
    +    val replayBus = new ReplayListenerBus(elogInfo.logPaths, fileSystem, 
elogInfo.compressionCodec)
         val appListener = new ApplicationEventListener
         replayBus.addListener(appListener)
    -    val ui = new SparkUI(conf, replayBus, appId, "/history/" + appId)
    +    val appConf = conf.clone()
    +    val appSecManager = new SecurityManager(appConf)
    +    val ui = new SparkUI(conf, appSecManager, replayBus, appId, 
"/history/" + appId)
     
         // Do not call ui.bind() to avoid creating a new server for each 
application
         replayBus.replay()
         if (appListener.applicationStarted) {
    +      // Note this relies on the user setting acls properly. We could also 
add in a master config
    +      // to the history server that admins would set if we don't trust the 
user.
    +      appSecManager.setViewAcls(appListener.sparkUser, 
appListener.viewAcls)
    +      appSecManager.setUIAcls(appListener.enableViewAcls)
    --- End diff --
    
    We've been trying to avoid having configs that are substrings of other 
configs, so what about: `spark.history.ui.acls.policy`?


---
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.
---

Reply via email to