activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4555 - fix regression that groupClass cannot be set on <cachedLDAPAuthorizationMap/>
Date Mon, 26 May 2014 14:42:48 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 6c859676b -> 9d656731a


https://issues.apache.org/jira/browse/AMQ-4555 - fix regression that groupClass cannot be
set on <cachedLDAPAuthorizationMap/>


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

Branch: refs/heads/trunk
Commit: 9d656731ab00280368a212b17c2d538b66d0e91b
Parents: 6c85967
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Mon May 26 16:42:38 2014 +0200
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Mon May 26 16:42:38 2014 +0200

----------------------------------------------------------------------
 .../security/SimpleCachedLDAPAuthorizationMap.java      | 12 ++++++++++++
 .../org/apache/activemq/security/activemq-apacheds.xml  |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/9d656731/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
b/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
index 2de4eb5..e01d5c0 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/security/SimpleCachedLDAPAuthorizationMap.java
@@ -90,6 +90,8 @@ public class SimpleCachedLDAPAuthorizationMap implements AuthorizationMap
{
     private int refreshInterval = -1;
     private boolean refreshDisabled = false;
 
+    protected String groupClass = DefaultAuthorizationMap.DEFAULT_GROUP_CLASS;
+
     // Internal State
     private long lastUpdated;
 
@@ -255,6 +257,7 @@ public class SimpleCachedLDAPAuthorizationMap implements AuthorizationMap
{
 
         // Create and swap in the new instance with updated LDAP data.
         newMap.setAuthorizationEntries(new ArrayList<DestinationMapEntry>(entries.values()));
+        newMap.setGroupClass(groupClass);
         this.map.set(newMap);
 
         updated();
@@ -1107,6 +1110,15 @@ public class SimpleCachedLDAPAuthorizationMap implements AuthorizationMap
{
         this.refreshInterval = refreshInterval;
     }
 
+    public String getGroupClass() {
+        return groupClass;
+    }
+
+    public void setGroupClass(String groupClass) {
+        this.groupClass = groupClass;
+        map.get().setGroupClass(groupClass);
+    }
+
     protected static enum DestinationType {
         QUEUE, TOPIC, TEMP;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/9d656731/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
index e498ae0..67768c1 100644
--- a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
+++ b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/activemq-apacheds.xml
@@ -39,7 +39,7 @@
 
           <authorizationPlugin>
               <map>
-                <cachedLDAPAuthorizationMap legacyGroupMapping="false" connectionURL="ldap://localhost:${ldapPort}"/>
+                <cachedLDAPAuthorizationMap legacyGroupMapping="false" connectionURL="ldap://localhost:${ldapPort}"
groupClass="org.apache.activemq.jaas.GroupPrincipal"/>
               </map>
           </authorizationPlugin>
       </plugins>


Mime
View raw message