You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by sn...@apache.org on 2014/12/10 00:42:27 UTC

[2/7] incubator-ranger git commit: Argus-180-Ranger lookup for hadoop repository fails when wire encryption is on

Argus-180-Ranger lookup for hadoop repository fails when wire encryption
is on


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/57b8dbd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/57b8dbd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/57b8dbd4

Branch: refs/heads/ranger-0.4
Commit: 57b8dbd436ee8edc7f014aa4b516c25b1ed973b0
Parents: 80b3e1b
Author: rmani <rm...@hortonworks.com>
Authored: Wed Nov 12 22:45:25 2014 -0800
Committer: sneethiraj <sn...@apache.org>
Committed: Sun Dec 7 01:12:46 2014 -0500

----------------------------------------------------------------------
 .../java/com/xasecure/hadoop/client/config/HadoopClassLoader.java | 3 +++
 .../com/xasecure/hadoop/client/config/HadoopConfigHolder.java     | 1 +
 security-admin/src/main/resources/resourcenamemap.properties      | 1 +
 3 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/57b8dbd4/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopClassLoader.java
----------------------------------------------------------------------
diff --git a/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopClassLoader.java b/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopClassLoader.java
index 7142bfa..214ff4d 100644
--- a/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopClassLoader.java
+++ b/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopClassLoader.java
@@ -84,6 +84,9 @@ public class HadoopClassLoader extends ClassLoader {
 				for(Object keyobj : prop.keySet()) {
 					String key = (String)keyobj;
 					String val = prop.getProperty(key) ;
+					if (HadoopConfigHolder.HADOOP_RPC_PROTECTION.equals(key) && (val == null || val.trim().isEmpty()))  {
+						continue;
+					}
 					out.println("<property><name>" + key.trim() + "</name><value>" + val + "</value></property>") ;
 				}
 				out.println("</configuration>") ;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/57b8dbd4/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopConfigHolder.java
----------------------------------------------------------------------
diff --git a/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopConfigHolder.java b/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopConfigHolder.java
index 6702954..b1bd62b 100644
--- a/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopConfigHolder.java
+++ b/lookup-client/src/main/java/com/xasecure/hadoop/client/config/HadoopConfigHolder.java
@@ -41,6 +41,7 @@ public class HadoopConfigHolder  {
 	public static final String XASECURE_LOGIN_PASSWORD = "password" ;
 	public static final String HADOOP_SECURITY_AUTHENTICATION = "hadoop.security.authentication";
 	public static final String HADOOP_SECURITY_AUTHENTICATION_METHOD = "kerberos";
+	public static final String HADOOP_RPC_PROTECTION = "hadoop.rpc.protection";
 	
 
 	private static boolean initialized = false ;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/57b8dbd4/security-admin/src/main/resources/resourcenamemap.properties
----------------------------------------------------------------------
diff --git a/security-admin/src/main/resources/resourcenamemap.properties b/security-admin/src/main/resources/resourcenamemap.properties
index e87a663..d9b4d71 100644
--- a/security-admin/src/main/resources/resourcenamemap.properties
+++ b/security-admin/src/main/resources/resourcenamemap.properties
@@ -17,6 +17,7 @@ fs.default.name=core-site.xml
 hadoop.security.authentication=core-site.xml
 hadoop.security.authorization=core-site.xml
 hadoop.security.auth_to_local=core-site.xml
+hadoop.rpc.protection=core-site.xml
 dfs.datanode.kerberos.principal=hdfs-site.xml
 dfs.namenode.kerberos.principal=hdfs-site.xml
 dfs.secondary.namenode.kerberos.principal=hdfs-site.xml