Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/509#discussion_r11925006
--- 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 --
yes its a simple change. I can go either way because there are reasons to
do it both. what do you see as the benefit of having it override?
We could actually have a config for 3 things - on and override what
application said, use application setting, off for everyone no matter what
application says. using just a boolean it have the middle option.
---
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.
---