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_r376642304
##########
File path:
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java
##########
@@ -112,6 +112,27 @@ public static Configuration
getHadoopConfiguration(org.apache.flink.configuratio
return result;
}
+ public static boolean isCredentialsConfigured(boolean useTicketCache)
throws Exception {
+ UserGroupInformation loginUser =
UserGroupInformation.getCurrentUser();
Review comment:
Hmm. I might be zeroing in on this problem. Although the
[documentation](https://hadoop.apache.org/docs/r2.8.3/api/org/apache/hadoop/security/UserGroupInformation.html)
is pretty vague --> seems like `getLoginUser` returns the actual user logged
in via keytab or ticket; and `getCurrentUser` return the actual user (login, or
the impersonated user via delegation token).
In short, say I am logged in as userA and then use a `UGI.doAs` section as a
proxy userB. inside the `doAs` section. getLoginUser returns userA and
getCurrentUser returns userB.. This might be the cause of the delegation token
based security problem -- it might result in UGI differences
----------------------------------------------------------------
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