diff options
author | Marcelo Vanzin <vanzin@cloudera.com> | 2017-02-21 16:14:34 -0800 |
---|---|---|
committer | Marcelo Vanzin <vanzin@cloudera.com> | 2017-02-21 16:14:34 -0800 |
commit | 17d83e1ee5f14e759c6e3bf0a4cba3346f00fc48 (patch) | |
tree | acecf6d8f52c15ccf0a28fd38194ba129c9a3e05 /.github | |
parent | 7363dde6348fd70d67a13bb4644baca7c77ac241 (diff) | |
download | spark-17d83e1ee5f14e759c6e3bf0a4cba3346f00fc48.tar.gz spark-17d83e1ee5f14e759c6e3bf0a4cba3346f00fc48.tar.bz2 spark-17d83e1ee5f14e759c6e3bf0a4cba3346f00fc48.zip |
[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.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions