You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2015/06/01 19:37:54 UTC

[19/50] storm git commit: STORM-827: Allow AutoTGT to work with storm-hdfs too.

STORM-827: Allow AutoTGT to work with storm-hdfs too.


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/33d7747e
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/33d7747e
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/33d7747e

Branch: refs/heads/0.10.x-branch
Commit: 33d7747e0f0df86f5d1c932f8e3e82279de9a23d
Parents: 512d3de
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue May 19 15:42:34 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue May 19 15:42:34 2015 -0500

----------------------------------------------------------------------
 .../org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/33d7747e/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
----------------------------------------------------------------------
diff --git a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
index 9e390e9..86e7e3d 100644
--- a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
+++ b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
@@ -17,6 +17,8 @@
  */
 package org.apache.storm.hdfs.common.security;
 
+import backtype.storm.security.auth.kerberos.AutoTGT;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.security.UserGroupInformation;
@@ -42,7 +44,8 @@ public class HdfsSecurityUtil {
     public static void login(Map conf, Configuration hdfsConfig) throws IOException {
         //If AutoHDFS is specified, do not attempt to login using keytabs, only kept for backward compatibility.
         if(conf.get(TOPOLOGY_AUTO_CREDENTIALS) == null ||
-                !(((List)conf.get(TOPOLOGY_AUTO_CREDENTIALS)).contains(AutoHDFS.class.getName()))) {
+                (!(((List)conf.get(TOPOLOGY_AUTO_CREDENTIALS)).contains(AutoHDFS.class.getName())) &&
+                 !(((List)conf.get(TOPOLOGY_AUTO_CREDENTIALS)).contains(AutoTGT.class.getName())))) {
             if (UserGroupInformation.isSecurityEnabled()) {
                 LOG.info("Logging in using keytab as AutoHDFS is not specified for " + TOPOLOGY_AUTO_CREDENTIALS);
                 String keytab = (String) conf.get(STORM_KEYTAB_FILE_KEY);