Преглед изворни кода

HDFS-3466. Get HTTP kerberos principal from the web authentication keytab.
(omalley)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1379653 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley пре 12 година
родитељ
комит
640e976c73
2 измењених фајлова са 9 додато и 1 уклоњено
  1. 3 0
      CHANGES.txt
  2. 6 1
      src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java

+ 3 - 0
CHANGES.txt

@@ -530,6 +530,9 @@ Release 1.1.0 - unreleased
     mapreduce.job.committer.setup.cleanup.needed=false and
     mapreduce.map/reduce.failures.maxpercent>0 (Subroto Sanyal via tgraves)
 
+    HDFS-3466. Get HTTP kerberos principal from the web authentication keytab.
+    (omalley)
+
 Release 1.0.4 - Unreleased
 
   NEW FEATURES

+ 6 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java

@@ -372,7 +372,12 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
                       SecurityUtil.getServerPrincipal(principalInConf,
                           serverAddress.getHostName()));
                 }
-                String httpKeytab = conf.get(DFSConfigKeys.DFS_NAMENODE_KEYTAB_FILE_KEY);
+                String httpKeytab = conf.get(
+                  DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY);
+                if (httpKeytab == null) {
+                  httpKeytab = 
+                    conf.get(DFSConfigKeys.DFS_NAMENODE_KEYTAB_FILE_KEY);
+                }
                 if (httpKeytab != null && !httpKeytab.isEmpty()) {
                   params.put("kerberos.keytab", httpKeytab);
                 }