walterddr commented on a change in pull request #12462:
URL: https://github.com/apache/flink/pull/12462#discussion_r435930727



##########
File path: 
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java
##########
@@ -113,7 +113,8 @@ public static Configuration 
getHadoopConfiguration(org.apache.flink.configuratio
        }
 
        public static boolean isCredentialsConfigured(UserGroupInformation ugi, 
boolean useTicketCache) throws Exception {
-               if (UserGroupInformation.isSecurityEnabled()) {
+               if (UserGroupInformation.isSecurityEnabled()
+                       && ugi.getAuthenticationMethod() == 
UserGroupInformation.AuthenticationMethod.KERBEROS) {

Review comment:
       +1 on this. 
   also do you think we should keep the `isCredentialsConfigured` API available 
for 1 more release and it can simply be:
   ```
   @Deprecated
   public static boolean isCredentialsConfigured(UserGroupInformation ugi, 
boolean useTicketCache) throws Exception {
       return isKerberosSecurityEnabled(ugi) && isKerberosCredentialsValid(ugi, 
useTicketCache);
   }
   ```




----------------------------------------------------------------
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]


Reply via email to