[ 
https://issues.apache.org/jira/browse/HADOOP-18666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702748#comment-17702748
 ] 

ASF GitHub Bot commented on HADOOP-18666:
-----------------------------------------

eubnara commented on code in PR #5480:
URL: https://github.com/apache/hadoop/pull/5480#discussion_r1142192543


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServerWithSpnego.java:
##########
@@ -191,6 +193,48 @@ public void testAuthenticationWithProxyUser() throws 
Exception {
     }
   }
 
+  @Test
+  public void testAuthenticationToAllowList() throws Exception {
+    Configuration spnegoConf = getSpnegoConf(new Configuration());
+    String[] allowList = new String[] {"/jmx", "/prom"};
+    String[] denyList = new String[] {"/conf", "/stacks", "/logLevel"};
+    spnegoConf.set(PREFIX + "kerberos.endpoint.whitelist", String.join(",", 
allowList));
+    spnegoConf.set("hadoop.prometheus.endpoint.enabled", "true");
+    spnegoConf.set("hadoop.http.filter.initializers",
+        "org.apache.hadoop.security.AuthenticationFilterInitializer");

Review Comment:
   You're right. Thanks.





> A whitelist of endpoints to skip Kerberos authentication doesn't work for 
> ResourceManager and Job History Server
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18666
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18666
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>            Reporter: YUBI LEE
>            Assignee: YUBI LEE
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HADOOP-18666-branch-3.3.4.patch
>
>
> 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.}}".
> I will make a PR soon.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to