From e6dbad4f6f6163a93fd707c740f59bba92295549 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Tue, 15 Jan 2013 03:25:12 +0000 Subject: [PATCH] HADOOP-9178. src/main/conf is missing hadoop-policy.xml. Contributed by Sandy Ryza git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1433275 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 +++ .../content/xdocs/service_level_auth.xml | 16 --------------- .../hadoop/fs/CommonConfigurationKeys.java | 16 +++++++++++++-- .../hadoop/hdfs/HDFSPolicyProvider.java | 20 +++++++++++-------- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index cbfef30c7f..1ff76be2bc 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -543,6 +543,9 @@ Release 2.0.3-alpha - Unreleased HADOOP-9203. RPCCallBenchmark should find a random available port. (Andrew Purtell via suresh) + HADOOP-9178. src/main/conf is missing hadoop-policy.xml. + (Sandy Ryza via eli) + Release 2.0.2-alpha - 2012-09-07 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/docs/src/documentation/content/xdocs/service_level_auth.xml b/hadoop-common-project/hadoop-common/src/main/docs/src/documentation/content/xdocs/service_level_auth.xml index 771ac052b3..6716c48602 100644 --- a/hadoop-common-project/hadoop-common/src/main/docs/src/documentation/content/xdocs/service_level_auth.xml +++ b/hadoop-common-project/hadoop-common/src/main/docs/src/documentation/content/xdocs/service_level_auth.xml @@ -116,22 +116,6 @@ ACL for NamenodeProtocol, the protocol used by the secondary namenode to communicate with the namenode. - - security.inter.tracker.protocol.acl - ACL for InterTrackerProtocol, used by the tasktrackers to - communicate with the jobtracker. - - - security.job.submission.protocol.acl - ACL for JobSubmissionProtocol, used by job clients to - communciate with the jobtracker for job submission, querying job status - etc. - - - security.task.umbilical.protocol.acl - ACL for TaskUmbilicalProtocol, used by the map and reduce - tasks to communicate with the parent tasktracker. - security.refresh.policy.protocol.acl ACL for RefreshAuthorizationPolicyProtocol, used by the diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java index a7579a9640..daa57af2c9 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java @@ -21,6 +21,7 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.http.lib.StaticUserWebFilter; +import org.apache.hadoop.security.authorize.Service; /** * This class contains constants for configuration keys used @@ -114,7 +115,18 @@ public class CommonConfigurationKeys extends CommonConfigurationKeysPublic { SECURITY_HA_SERVICE_PROTOCOL_ACL = "security.ha.service.protocol.acl"; public static final String SECURITY_ZKFC_PROTOCOL_ACL = "security.zkfc.protocol.acl"; - + public static final String + SECURITY_CLIENT_PROTOCOL_ACL = "security.client.protocol.acl"; + public static final String SECURITY_CLIENT_DATANODE_PROTOCOL_ACL = + "security.client.datanode.protocol.acl"; + public static final String + SECURITY_DATANODE_PROTOCOL_ACL = "security.datanode.protocol.acl"; + public static final String + SECURITY_INTER_DATANODE_PROTOCOL_ACL = "security.inter.datanode.protocol.acl"; + public static final String + SECURITY_NAMENODE_PROTOCOL_ACL = "security.namenode.protocol.acl"; + public static final String SECURITY_QJOURNAL_SERVICE_PROTOCOL_ACL = + "security.qjournal.service.protocol.acl"; public static final String HADOOP_SECURITY_TOKEN_SERVICE_USE_IP = "hadoop.security.token.service.use_ip"; public static final boolean HADOOP_SECURITY_TOKEN_SERVICE_USE_IP_DEFAULT = @@ -191,4 +203,4 @@ public class CommonConfigurationKeys extends CommonConfigurationKeysPublic { public static final long HADOOP_SECURITY_UID_NAME_CACHE_TIMEOUT_DEFAULT = 4*60*60; // 4 hours -} \ No newline at end of file +} diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HDFSPolicyProvider.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HDFSPolicyProvider.java index 7268eddb97..7571128bd0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HDFSPolicyProvider.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HDFSPolicyProvider.java @@ -40,14 +40,18 @@ public class HDFSPolicyProvider extends PolicyProvider { private static final Service[] hdfsServices = new Service[] { - new Service("security.client.protocol.acl", ClientProtocol.class), - new Service("security.client.datanode.protocol.acl", - ClientDatanodeProtocol.class), - new Service("security.datanode.protocol.acl", DatanodeProtocol.class), - new Service("security.inter.datanode.protocol.acl", - InterDatanodeProtocol.class), - new Service("security.namenode.protocol.acl", NamenodeProtocol.class), - new Service("security.qjournal.service.protocol.acl", QJournalProtocol.class), + new Service(CommonConfigurationKeys.SECURITY_CLIENT_PROTOCOL_ACL, + ClientProtocol.class), + new Service(CommonConfigurationKeys.SECURITY_CLIENT_DATANODE_PROTOCOL_ACL, + ClientDatanodeProtocol.class), + new Service(CommonConfigurationKeys.SECURITY_DATANODE_PROTOCOL_ACL, + DatanodeProtocol.class), + new Service(CommonConfigurationKeys.SECURITY_INTER_DATANODE_PROTOCOL_ACL, + InterDatanodeProtocol.class), + new Service(CommonConfigurationKeys.SECURITY_NAMENODE_PROTOCOL_ACL, + NamenodeProtocol.class), + new Service(CommonConfigurationKeys.SECURITY_QJOURNAL_SERVICE_PROTOCOL_ACL, + QJournalProtocol.class), new Service(CommonConfigurationKeys.SECURITY_HA_SERVICE_PROTOCOL_ACL, HAServiceProtocol.class), new Service(CommonConfigurationKeys.SECURITY_ZKFC_PROTOCOL_ACL,