Ldap 用户未被授权创建topic://ActiveMQ.Advisory.Connection

Ldap 用户未被授权创建topic://ActiveMQ.Advisory.Connection,ldap,activemq,shiro,Ldap,Activemq,Shiro,我正在尝试在ActiveMQ中实现基于LDAP的身份验证和授权 LDAP部分是使用Apacheds2.0完成的。(结构取自-不幸的是,引用的FuseSource ActiveMQ安全指南处于脱机状态) 我使用SHA用户密码将用户(例如uid=user2、ou=users、o=X)创建为inetOrgPerson。 ou=系统如下所示: 所选元素的ldif为: dn: cn=admin,cn=ActiveMQ.\>,ou=Topic,ou=Destination,ou=ActiveMQ,o

我正在尝试在ActiveMQ中实现基于LDAP的身份验证和授权

LDAP部分是使用Apacheds2.0完成的。(结构取自-不幸的是,引用的FuseSource ActiveMQ安全指南处于脱机状态)

我使用SHA用户密码将用户(例如uid=user2、ou=users、o=X)创建为inetOrgPerson。 ou=系统如下所示:

所选元素的ldif为:

dn: cn=admin,cn=ActiveMQ.\>,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system
objectClass: groupOfNames
objectClass: top
cn: admin
member: ou=users,o=X
member: uid=user2,ou=users,o=X
(我仅与一名成员进行了尝试,并与两名成员进行了尝试)

shiro.ini是从activemq.xml的插件部分引用的,带有:

<bean id="shiroPlugin" class="org.apache.activemq.shiro.ShiroPlugin" xmlns="http://www.springframework.org/schema/beans">
    <property name="iniResourcePath" value="classpath:shiro.ini"/>
</bean>
身份验证正在从Java进行:

Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
SecurityManager securityManager = factory.getInstance();
AuthenticationToken authenticationToken = new UsernamePasswordToken("user2", "password123");
AuthenticationInfo authenticationInfo = securityManager.authenticate(authenticationToken);
System.out.println("authenticationInfo: " + authenticationInfo);
//authenticationInfo: user2
如何授予此用户创建目标主题的权限?(老生常谈的问题没有帮助)

Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
SecurityManager securityManager = factory.getInstance();
AuthenticationToken authenticationToken = new UsernamePasswordToken("user2", "password123");
AuthenticationInfo authenticationInfo = securityManager.authenticate(authenticationToken);
System.out.println("authenticationInfo: " + authenticationInfo);
//authenticationInfo: user2
SecurityException: Subject [user2] is not authorized to create destination: topic://ActiveMQ.Advisory.Connection