mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3400 - cached ldap autorization module - xbean support
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1147104 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
56a700110c
commit
01bc7fa9c5
|
@ -19,12 +19,7 @@ package org.apache.activemq.security;
|
|||
import org.apache.activemq.command.ActiveMQDestination;
|
||||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
import org.apache.activemq.command.ActiveMQTopic;
|
||||
import org.apache.activemq.filter.DestinationMapNode;
|
||||
import org.apache.activemq.filter.DestinationNode;
|
||||
import org.apache.activemq.jaas.GroupPrincipal;
|
||||
import org.apache.activemq.security.AuthorizationEntry;
|
||||
import org.apache.activemq.security.DefaultAuthorizationMap;
|
||||
import org.apache.activemq.security.TempDestinationAuthorizationEntry;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
@ -37,6 +32,13 @@ import javax.naming.directory.*;
|
|||
import javax.naming.event.*;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* A {@link DefaultAuthorizationMap} implementation which uses LDAP to initialize and update
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
*
|
||||
*/
|
||||
public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implements NamespaceChangeListener,
|
||||
ObjectChangeListener, InitializingBean {
|
||||
|
||||
|
|
|
@ -39,9 +39,7 @@
|
|||
|
||||
<authorizationPlugin>
|
||||
<map>
|
||||
<bean id="CachedLDAPAuthorizationMap" class="org.apache.activemq.security.CachedLDAPAuthorizationMap"
|
||||
xmlns="http://www.springframework.org/schema/beans">
|
||||
</bean>
|
||||
<cachedLDAPAuthorizationMap/>
|
||||
</map>
|
||||
</authorizationPlugin>
|
||||
</plugins>
|
||||
|
|
|
@ -39,14 +39,13 @@
|
|||
|
||||
<authorizationPlugin>
|
||||
<map>
|
||||
<bean id="CachedLDAPAuthorizationMap" class="org.apache.activemq.security.CachedLDAPAuthorizationMap"
|
||||
xmlns="http://www.springframework.org/schema/beans">
|
||||
<property name="connectionURL" value="ldap://localhost:389" />
|
||||
<property name="connectionUsername" value="cn=admin,dc=activemq,dc=apache,dc=org" />
|
||||
<property name="connectionPassword" value="sunflower" />
|
||||
<property name="baseDn" value="dc=activemq,dc=apache,dc=org" />
|
||||
<property name="refreshInterval" value="300000" /> <!-- refresh every 5 min -->
|
||||
</bean>
|
||||
<cachedLDAPAuthorizationMap
|
||||
connectionURL="ldap://localhost:389"
|
||||
connectionUsername="cn=admin,dc=activemq,dc=apache,dc=org"
|
||||
connectionPassword="sunflower"
|
||||
baseDn="dc=activemq,dc=apache,dc=org"
|
||||
refreshInterval="300000"
|
||||
/>
|
||||
</map>
|
||||
</authorizationPlugin>
|
||||
</plugins>
|
||||
|
|
Loading…
Reference in New Issue