From c76a7893f9215d25fca18f4444157db2addf720e Mon Sep 17 00:00:00 2001 From: Owen O'Malley Date: Fri, 31 Aug 2012 22:31:03 +0000 Subject: [PATCH] HDFS-3466. Get HTTP kerberos principal from the web authentication keytab. (omalley) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1379646 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 8 ++++++-- .../hadoop/hdfs/server/namenode/NameNodeHttpServer.java | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d1692cbe129..7e9ea2bf2eb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -698,8 +698,12 @@ Branch-2 ( Unreleased changes ) HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (eli) - HDFS-3733. Audit logs should include WebHDFS access. (Andy Isaacson via eli) + HDFS-3733. Audit logs should include WebHDFS access. (Andy Isaacson via + eli) + HDFS-3466. Get HTTP kerberos principal from the web authentication keytab. + (omalley) + BREAKDOWN OF HDFS-3042 SUBTASKS HDFS-2185. HDFS portion of ZK-based FailoverController (todd) @@ -997,7 +1001,7 @@ Release 2.0.0-alpha - 05-23-2012 (Brandon Li via szetszwo) HDFS-2617. Replaced Kerberized SSL for image transfer and fsck - with SPNEGO-based solution. (jghoman, tucu, and atm via eli) + with SPNEGO-based solution. (jghoman, omalley, tucu, and atm via eli) HDFS-3365. Enable users to disable socket caching in DFS client configuration (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java index 7090f455d8b..5ba7b63d247 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java @@ -117,8 +117,11 @@ public class NameNodeHttpServer { SecurityUtil.getServerPrincipal(principalInConf, bindAddress.getHostName())); } - String httpKeytab = conf - .get(DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_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( DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY,