HIVE-29639: Support a pluggable authentication filter for the HiveServer2 WebUI#6518
HIVE-29639: Support a pluggable authentication filter for the HiveServer2 WebUI#6518magnuma3 wants to merge 1 commit into
Conversation
|
|
We also support LDAP for HS2 WebUI. cc @difin |
| HIVE_SERVER2_WEBUI_USE_CUSTOM_AUTH_FILTER("hive.server2.webui.use.custom.auth.filter", false, | ||
| "If true, the HiveServer2 WebUI will be secured with custom auth filter"), |
There was a problem hiding this comment.
Instead of adding a new config, why not extend the existing config to support custom_auth? https://github.com/apache/hive/blob/master/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java#L3914C5-L3914C35
There was a problem hiding this comment.
Thanks for the review @saihemanth-cloudera!
I initially followed the pattern of the existing hive.server2.webui.use.spnego and hive.server2.webui.use.pam configs.
I noticed that hive.server2.webui.auth.method was introduced more recently in HIVE-28457 (4.1.0) but currently only supports NONE and LDAP, so the WebUI auth configuration is a bit split between the two styles right now.
Is the long-term plan to eventually consolidate use.spnego and use.pam into hive.server2.webui.auth.method as well? That context would help me align this PR with the intended direction.
This has been a pain point for long time without knox in the picture. So I'm +1 to the idea of setting up a custom auth filter. |



HIVE-29639
What changes were proposed in this pull request?
Add a configurable
javax.servlet.Filterslot to the WebUI, mirroringSpark's
spark.ui.filters. AnyFiltercan then beinstalled via configuration alone, with no code changes
Why are the changes needed?
In a Kerberized cluster, the HS2 WebUI is typically protected with
SPNEGO (
hive.server2.webui.use.spnego+ keytab/principal). SPNEGOworks fine for command-line / Kerberos clients, but in a browser it is
clunky: end users need a working Kerberos ticket cache on their
workstation, the browser has to be whitelisted for the SPNEGO domain,
and there is no clean way to plug the UI into an organisation's
broader SSO flow.
Elsewhere in the Hadoop ecosystem, this gap is commonly closed by
KnoxSSO in front of Kerberized NameNode / YARN ResourceManager /
Oozie UIs so end users get a single browser SSO experience instead of
raw SPNEGO, while the services themselves stay Kerberized.
HS2 cannot join that story today. There is no supported way to insert
a custom
javax.servlet.Filterinto the WebUI servlet pipeline, sooperators either live with browser SPNEGO
Does this PR introduce any user-facing change?
hive.server2.webui.use.custom.auth.filterfalsehive.server2.webui.custom.auth.filterFilterclass. Required when the switch is on; empty is rejected at startup.hive.server2.webui.custom.auth.filter.param.<name><name>becomes the parameter key.How was this patch tested?