spark-instrumented-optimizer/project
Marcelo Vanzin 17d83e1ee5 [SPARK-19652][UI] Do auth checks for REST API access.
The REST API has a security filter that performs auth checks
based on the UI root's security manager. That works fine when
the UI root is the app's UI, but not when it's the history server.

In the SHS case, all users would be allowed to see all applications
through the REST API, even if the UI itself wouldn't be available
to them.

This change adds auth checks for each app access through the API
too, so that only authorized users can see the app's data.

The change also modifies the existing security filter to use
`HttpServletRequest.getRemoteUser()`, which is used in other
places. That is not necessarily the same as the principal's
name; for example, when using Hadoop's SPNEGO auth filter,
the remote user strips the realm information, which then matches
the user name registered as the owner of the application.

I also renamed the UIRootFromServletContext trait to a more generic
name since I'm using it to store more context information now.

Tested manually with an authentication filter enabled.

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #16978 from vanzin/SPARK-19652.
2017-02-21 16:14:34 -08:00
..
build.properties [SPARK-18638][BUILD] Upgrade sbt, Zinc, and Maven plugins 2016-12-03 10:36:19 +00:00
MimaBuild.scala [SPARK-18638][BUILD] Upgrade sbt, Zinc, and Maven plugins 2016-12-03 10:36:19 +00:00
MimaExcludes.scala [SPARK-19652][UI] Do auth checks for REST API access. 2017-02-21 16:14:34 -08:00
plugins.sbt [SPARK-18697][BUILD] Upgrade sbt plugins 2016-12-09 14:13:01 +08:00
SparkBuild.scala [SPARK-19550][BUILD][WIP] Addendum: select Java 1.7 for scalac 2.10, still 2017-02-19 04:24:11 -08:00