knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dillido...@apache.org
Subject git commit: KNOX-387: replace JndiLdapRealm with KnoxLdapRelam in unit tests and functional tests
Date Thu, 22 May 2014 21:50:54 GMT
Repository: knox
Updated Branches:
  refs/heads/master af5179647 -> a1ad390d5


KNOX-387: replace JndiLdapRealm with KnoxLdapRelam in unit tests and functional tests


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/a1ad390d
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/a1ad390d
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/a1ad390d

Branch: refs/heads/master
Commit: a1ad390d5e6599790e00488d9c1d6386bed9a25e
Parents: af51796
Author: Dilli Dorai Arumugam <darumugam@hortonworks.com>
Authored: Thu May 22 14:49:54 2014 -0700
Committer: Dilli Dorai Arumugam <darumugam@hortonworks.com>
Committed: Thu May 22 14:49:54 2014 -0700

----------------------------------------------------------------------
 .../hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java       | 1 -
 gateway-release/home/samples/sandbox-with-knox-inside.xml        | 2 +-
 gateway-server/src/test/resources/conf-demo/conf/shiro.ini       | 2 +-
 .../gateway/topology/xml/simple-topology-ambari-format.conf      | 2 +-
 .../hadoop/gateway/topology/xml/simple-topology-knox-format.xml  | 2 +-
 gateway-server/src/test/resources/shiro.ini                      | 2 +-
 .../java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java     | 4 ++--
 .../java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java    | 2 +-
 .../org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java   | 2 +-
 .../java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java    | 2 +-
 gateway-test/src/test/resources/shiro.ini                        | 2 +-
 hsso-release/home/deployments/BASIC.xml                          | 2 +-
 hsso-release/home/templates/topology.xml                         | 2 +-
 13 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
index 352e4c7..408d051 100644
--- a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
+++ b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
@@ -114,7 +114,6 @@ public class ShiroSubjectIdentityAdapter implements Filter {
         auditor.audit( Action.AUTHENTICATION , sourceUri, ResourceType.URI, ActionOutcome.SUCCESS,
"Groups: " + userRoles );
       }
       
-      // TODO: add groups through extended JndiLdapRealm implementation once Jira KNOX-4
is resolved
       
 //      The newly constructed Sets check whether this Subject has been set read-only 
 //      before permitting subsequent modifications. The newly created Sets also prevent 

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-release/home/samples/sandbox-with-knox-inside.xml
----------------------------------------------------------------------
diff --git a/gateway-release/home/samples/sandbox-with-knox-inside.xml b/gateway-release/home/samples/sandbox-with-knox-inside.xml
index 515b482..6e5879a 100644
--- a/gateway-release/home/samples/sandbox-with-knox-inside.xml
+++ b/gateway-release/home/samples/sandbox-with-knox-inside.xml
@@ -24,7 +24,7 @@
             <enabled>true</enabled>
             <param>
                 <name>main.ldapRealm</name>
-                <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
+                <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
             </param>
             <param>
                 <name>main.ldapRealm.userDnTemplate</name>

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-server/src/test/resources/conf-demo/conf/shiro.ini
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/conf-demo/conf/shiro.ini b/gateway-server/src/test/resources/conf-demo/conf/shiro.ini
index 773e1ba..b3472a2 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/shiro.ini
+++ b/gateway-server/src/test/resources/conf-demo/conf/shiro.ini
@@ -17,7 +17,7 @@
 ##########################################################################
 
 [main]
-ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
+ldapRealm = org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm
 ldapRealm.userDnTemplate = uid={0},ou=people,dc=hadoop,dc=apache,dc=org
 ldapRealm.contextFactory.url = ldap://localhost:33389
 ldapRealm.contextFactory.authenticationMechanism = simple

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-ambari-format.conf
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-ambari-format.conf
b/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-ambari-format.conf
index fd105f2..594bb12 100644
--- a/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-ambari-format.conf
+++ b/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-ambari-format.conf
@@ -26,7 +26,7 @@
     </property>
     <property>
         <name>topology.gateway.provider.authentication.ShiroProvider.param.main.ldapRealm</name>
-        <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
+        <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
     </property>
     <property>
         <name>topology.gateway.provider.authentication.ShiroProvider.param.main.ldapRealm.userDnTemplate</name>

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-knox-format.xml
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-knox-format.xml
b/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-knox-format.xml
index a7c90a0..7d66ef1 100644
--- a/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-knox-format.xml
+++ b/gateway-server/src/test/resources/org/apache/hadoop/gateway/topology/xml/simple-topology-knox-format.xml
@@ -27,7 +27,7 @@
            <name>ShiroSecurity</name>
            <param>
                <name>main.ldapRealm</name>
-               <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
+               <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
            </param>
            <param>
                <name>main.ldapRealm.userDnTemplate</name>

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-server/src/test/resources/shiro.ini
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/shiro.ini b/gateway-server/src/test/resources/shiro.ini
index 773e1ba..b3472a2 100644
--- a/gateway-server/src/test/resources/shiro.ini
+++ b/gateway-server/src/test/resources/shiro.ini
@@ -17,7 +17,7 @@
 ##########################################################################
 
 [main]
-ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
+ldapRealm = org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm
 ldapRealm.userDnTemplate = uid={0},ou=people,dc=hadoop,dc=apache,dc=org
 ldapRealm.contextFactory.url = ldap://localhost:33389
 ldapRealm.contextFactory.authenticationMechanism = simple

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
index 70d2a35..dd6dfe0 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
@@ -167,7 +167,7 @@ public class GatewayBasicFuncTest {
               .addTag( "enabled" ).addText( "true" )
               .addTag( "param" )
                 .addTag( "name" ).addText( "main.ldapRealm" )
-                .addTag( "value" ).addText( "org.apache.shiro.realm.ldap.JndiLdapRealm" ).gotoParent()
+                .addTag( "value" ).addText( "org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm"
).gotoParent()
               .addTag( "param" )
                 .addTag( "name" ).addText( "main.ldapRealm.userDnTemplate" )
                 .addTag( "value" ).addText( "uid={0},ou=people,dc=hadoop,dc=apache,dc=org"
).gotoParent()
@@ -2014,4 +2014,4 @@ public class GatewayBasicFuncTest {
   }
 
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
index f253cf3..a990e74 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
@@ -146,7 +146,7 @@ public class GatewayDeployFuncTest {
         .addTag( "enabled" ).addText( "true" )
         .addTag( "param" )
         .addTag( "name" ).addText( "main.ldapRealm" )
-        .addTag( "value" ).addText( "org.apache.shiro.realm.ldap.JndiLdapRealm" ).gotoParent()
+        .addTag( "value" ).addText( "org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm"
).gotoParent()
         .addTag( "param" )
         .addTag( "name" ).addText( "main.ldapRealm.userDnTemplate" )
         .addTag( "value" ).addText( "uid={0},ou=people,dc=hadoop,dc=apache,dc=org" ).gotoParent()

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
index 6ff33da..137a446 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
@@ -138,7 +138,7 @@ public class GatewayLocalServiceFuncTest {
         .addTag( "enabled" ).addText( "true" )
         .addTag( "param" )
         .addTag( "name" ).addText( "main.ldapRealm" )
-        .addTag( "value" ).addText( "org.apache.shiro.realm.ldap.JndiLdapRealm" ).gotoParent()
+        .addTag( "value" ).addText( "org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm"
).gotoParent()
         .addTag( "param" )
         .addTag( "name" ).addText( "main.ldapRealm.userDnTemplate" )
         .addTag( "value" ).addText( "uid={0},ou=people,dc=hadoop,dc=apache,dc=org" ).gotoParent()

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
index cfa1f32..737f8f2 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
@@ -136,7 +136,7 @@ public class GatewaySampleFuncTest {
         .addTag( "enabled" ).addText( "true" )
         .addTag( "param" )
         .addTag( "name" ).addText( "main.ldapRealm" )
-        .addTag( "value" ).addText( "org.apache.shiro.realm.ldap.JndiLdapRealm" ).gotoParent()
+        .addTag( "value" ).addText( "org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm"
).gotoParent()
         .addTag( "param" )
         .addTag( "name" ).addText( "main.ldapRealm.userDnTemplate" )
         .addTag( "value" ).addText( "uid={0},ou=people,dc=hadoop,dc=apache,dc=org" ).gotoParent()

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/gateway-test/src/test/resources/shiro.ini
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/shiro.ini b/gateway-test/src/test/resources/shiro.ini
index 773e1ba..b3472a2 100644
--- a/gateway-test/src/test/resources/shiro.ini
+++ b/gateway-test/src/test/resources/shiro.ini
@@ -17,7 +17,7 @@
 ##########################################################################
 
 [main]
-ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
+ldapRealm = org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm
 ldapRealm.userDnTemplate = uid={0},ou=people,dc=hadoop,dc=apache,dc=org
 ldapRealm.contextFactory.url = ldap://localhost:33389
 ldapRealm.contextFactory.authenticationMechanism = simple

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/hsso-release/home/deployments/BASIC.xml
----------------------------------------------------------------------
diff --git a/hsso-release/home/deployments/BASIC.xml b/hsso-release/home/deployments/BASIC.xml
index 133b337..6d50700 100644
--- a/hsso-release/home/deployments/BASIC.xml
+++ b/hsso-release/home/deployments/BASIC.xml
@@ -23,7 +23,7 @@
             <enabled>true</enabled>
             <param>
                 <name>main.ldapRealm</name>
-                <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
+                <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
             </param>
             <param>
                 <name>main.ldapRealm.userDnTemplate</name>

http://git-wip-us.apache.org/repos/asf/knox/blob/a1ad390d/hsso-release/home/templates/topology.xml
----------------------------------------------------------------------
diff --git a/hsso-release/home/templates/topology.xml b/hsso-release/home/templates/topology.xml
index 8ee236e..251265d 100644
--- a/hsso-release/home/templates/topology.xml
+++ b/hsso-release/home/templates/topology.xml
@@ -24,7 +24,7 @@
             <name>ShiroProvider</name>
             <param>
                 <name>main.ldapRealm</name>
-                <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
+                <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
             </param>
             <param>
                 <name>main.ldapRealm.userDnTemplate</name>


Mime
View raw message