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-2@1379648 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Owen O'Malley 2012-08-31 22:33:52 +00:00
parent dbe5edbfaa
commit 89efe23ef2
2 changed files with 11 additions and 5 deletions

View File

@ -527,13 +527,16 @@ Release 2.0.1-alpha - UNRELEASED
HDFS-3837. Fix DataNode.recoverBlock findbugs warning. (eli) 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-2686. Remove DistributedUpgrade related code. (suresh) HDFS-2686. Remove DistributedUpgrade related code. (suresh)
HDFS-3833. TestDFSShell fails on windows due to concurrent file HDFS-3833. TestDFSShell fails on windows due to concurrent file
read/write. (Brandon Li via suresh) read/write. (Brandon Li via suresh)
HDFS-3466. Get HTTP kerberos principal from the web authentication keytab.
(omalley)
BREAKDOWN OF HDFS-3042 SUBTASKS BREAKDOWN OF HDFS-3042 SUBTASKS
@ -835,7 +838,7 @@ Release 2.0.0-alpha - 05-23-2012
(Brandon Li via szetszwo) (Brandon Li via szetszwo)
HDFS-2617. Replaced Kerberized SSL for image transfer and fsck 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 HDFS-3365. Enable users to disable socket caching in DFS client
configuration (todd) configuration (todd)

View File

@ -117,8 +117,11 @@ public class NameNodeHttpServer {
SecurityUtil.getServerPrincipal(principalInConf, SecurityUtil.getServerPrincipal(principalInConf,
bindAddress.getHostName())); bindAddress.getHostName()));
} }
String httpKeytab = conf String httpKeytab = conf.get(
.get(DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY); 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( params.put(
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY, DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY,