HDFS-3813. Log error message if security and WebHDFS are enabled but principal/keytab are not configured. Contributed by Stephen Chu.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1394340 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b8f81d74c8
commit
6582da034b
|
@ -249,6 +249,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
HDFS-3916. libwebhdfs (C client) code cleanups.
|
HDFS-3916. libwebhdfs (C client) code cleanups.
|
||||||
(Colin Patrick McCabe via eli)
|
(Colin Patrick McCabe via eli)
|
||||||
|
|
||||||
|
HDFS-3813. Log error message if security and WebHDFS are enabled but
|
||||||
|
principal/keytab are not configured. (Stephen Chu via atm)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -107,6 +107,10 @@ public class NameNodeHttpServer {
|
||||||
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_PRINCIPAL_KEY,
|
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_PRINCIPAL_KEY,
|
||||||
SecurityUtil.getServerPrincipal(principalInConf,
|
SecurityUtil.getServerPrincipal(principalInConf,
|
||||||
bindAddress.getHostName()));
|
bindAddress.getHostName()));
|
||||||
|
} else if (UserGroupInformation.isSecurityEnabled()) {
|
||||||
|
LOG.error("WebHDFS and security are enabled, but configuration property '" +
|
||||||
|
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_PRINCIPAL_KEY +
|
||||||
|
"' is not set.");
|
||||||
}
|
}
|
||||||
String httpKeytab = conf.get(
|
String httpKeytab = conf.get(
|
||||||
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY);
|
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY);
|
||||||
|
@ -117,6 +121,10 @@ public class NameNodeHttpServer {
|
||||||
params.put(
|
params.put(
|
||||||
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY,
|
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY,
|
||||||
httpKeytab);
|
httpKeytab);
|
||||||
|
} else if (UserGroupInformation.isSecurityEnabled()) {
|
||||||
|
LOG.error("WebHDFS and security are enabled, but configuration property '" +
|
||||||
|
DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY +
|
||||||
|
"' is not set.");
|
||||||
}
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue