mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4555 - fix regression that groupClass cannot be set on <cachedLDAPAuthorizationMap/>
This commit is contained in:
parent
6c859676b3
commit
9d656731ab
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue