walterddr commented on a change in pull request #10891: 
[FLINK-15561][Security][hotfix] Add Delegation Token checker in 
YarnClusterDescriptor
URL: https://github.com/apache/flink/pull/10891#discussion_r368648299
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
 ##########
 @@ -435,9 +436,13 @@ public void killCluster(ApplicationId applicationId) 
throws FlinkException {
                        UserGroupInformation loginUser = 
UserGroupInformation.getCurrentUser();
                        if (loginUser.getAuthenticationMethod() == 
UserGroupInformation.AuthenticationMethod.KERBEROS
                                        && useTicketCache && 
!loginUser.hasKerberosCredentials()) {
-                               LOG.error("Hadoop security with Kerberos is 
enabled but the login user does not have Kerberos credentials");
-                               throw new RuntimeException("Hadoop security 
with Kerberos is enabled but the login user " +
+                               // a delegation token is an adequate substitute 
in most cases
 
 Review comment:
   Yes. this is the expected result. See: 
https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/security/modules/HadoopModule.java#L146
 which is used in client/JM/TM. 
   
   However I think the checker in here not present - this means specifically in 
YarnClusterDescriptor it does not support delegation token. This seems like a 
bug to me. 
   
   Regarding the implementation, yes I can do that as well (e.g. merging with 
the upper layer if, I was trying to pair the code logic with `HadoopModule`. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to