-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-18666. A whitelist of endpoints to skip Kerberos authentication doesn't work for ResourceManager and Job History Server #5480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HDFS-16129 is not in hadoop 3.3.4. If you want to fix this issue in hadoop 3.3.4, try patch file on https://issues.apache.org/jira/browse/HADOOP-18666. |
In my environment, |
As I mentioned, if you set yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled=false, it won't work. |
Hmm... I use hadoop 3.3.4. And I set the configuration you mentioned but it doesn't work. |
Which version do you use? |
I see. We are using 3.3.0 + many patches, which doesn't include HDFS-16129. |
Yeah, the reason why I mentioned https://issues.apache.org/jira/browse/HDFS-16129 is that without this patch will be different. |
what is the value of hadoop.http.filter.initializers in your env? |
|
Sorry, it is hard to find why your version of Hadoop just works with insufficient information. |
You can access specific endpoints in whitelist without kerberos authentication with your modified version of hadoop 3.3.0, right? |
Yes, I can access only the whitelist endpoints. my-jobhistoryserver configs: <property name="hadoop.http.authentication.kerberos.endpoint.whitelist" value="/isActive,/jmx,/prom"/>
<property name="hadoop.http.authentication.kerberos.keytab" value="/path/to/spnego.keytab"/>
<property name="hadoop.http.authentication.kerberos.principal" value="HTTP/_HOST@MY_REALM"/>
<property name="hadoop.http.authentication.type" value="kerberos"/>
<property name="hadoop.http.filter.initializers" value="org.apache.hadoop.security.AuthenticationFilterInitializer,org.apache.hadoop.http.lib.StaticUserWebFilter,org.apache.hadoop.security.HttpCrossOriginFilterInitializer"/>
|
Thanks for reply, I'll try to reproduce it with vanilla hadoop 3.3.0. 😢 |
HADOOP-17371 upgrades jetty version. I found that Maybe it makes |
💔 -1 overall
This message was automatically generated. |
Thanks for your investigation. Actually, my modified version has already included HADOOP-17371. But surely the different versions of jetty could introduce the problem. |
I tested hadoop 3.3.4 with jetty 9.4.20.v20190813 but this issue has been reproduced. |
@tasanuma core-site.xml
yarn-site.xml
The source code I use when testing it is here => https://github.com/eubnara/hadoop/tree/eub-3.3.0. |
RM
JHS
|
I cannot figure out why your version of hadoop just works without your full source code and configurations. Sorry. |
@eubnara Thanks for doing the test with 3.3.0! Hmm... your configurations seem good. I'm not sure the cause. The whitelist also works with ResourceManager even if it is Anyway, if the problem exists, we need to fix it. Could you create a unit test for this change? |
@tasanuma |
💔 -1 overall
This message was automatically generated. |
I think this build failure is caused by downloading Node.js. It may not be related to this PR.
|
Thanks for creating the unit test, @eubnara. The changes mostly seem good to me.
|
Thanks for feedback! I got to know how to use checkstyle.xml in my IDE thanks to you. |
Thanks for updating it. +1 if the CI result is ok. If you are using IntelliJ, I also recommend using |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Wow, thanks for your kind advice! |
spnegoConf.set("hadoop.prometheus.endpoint.enabled", "true"); | ||
spnegoConf.set("hadoop.http.filter.initializers", | ||
"org.apache.hadoop.security.AuthenticationFilterInitializer"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eubnara Sorry, I have one more request. Could you use constants here?
spnegoConf.set("hadoop.prometheus.endpoint.enabled", "true"); | |
spnegoConf.set("hadoop.http.filter.initializers", | |
"org.apache.hadoop.security.AuthenticationFilterInitializer"); | |
spnegoConf.set(CommonConfigurationKeysPublic.HADOOP_PROMETHEUS_ENABLED, "true"); | |
spnegoConf.set(FILTER_INITIALIZER_PROPERTY, AuthenticationFilterInitializer.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Thanks.
…n doesn't work for ResourceManager and Job History Server
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merged it. Thanks for your contribution, @eubnara! |
@tasanuma Thanks for your feedbacks! |
…n doesn't work for ResourceManager and Job History Server (apache#5480)
Description of PR
Thanks to HADOOP-16527, we can add a whitelist of endpoints to skip Kerberos authentication such as
/isActive
,/jmx
,/prom
.However, I found that ResourceManager and Job History Server doesn't repect
hadoop.http.authentication.kerberos.endpoint.whitelist
.To workaround this issue for ResourceManager, set
yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled=true
in yarn-site.xml.However, there is no workaround for Job History Server.
This bug is caused by HttpServer2#initSpnego call without proper configurations which starts with "hadoop.http.authentication.".
How was this patch tested?
Manually tested in internal cluster. It works with ResourceManager (without
yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled=true
set), Job History Server.For code changes: