Browse Source

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 years ago
parent
commit
640e976c73
2 changed files with 9 additions and 1 deletions
  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.job.committer.setup.cleanup.needed=false and
     mapreduce.map/reduce.failures.maxpercent>0 (Subroto Sanyal via tgraves)
     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
 Release 1.0.4 - Unreleased
 
 
   NEW FEATURES
   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,
                       SecurityUtil.getServerPrincipal(principalInConf,
                           serverAddress.getHostName()));
                           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()) {
                 if (httpKeytab != null && !httpKeytab.isEmpty()) {
                   params.put("kerberos.keytab", httpKeytab);
                   params.put("kerberos.keytab", httpKeytab);
                 }
                 }