[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDAP] User is not authorized to create topic://ActiveMQ.Advisory.Connection

I'm trying to implement LDAP based authentication and authorization in

The LDAP part is done with ApacheDS 2.0.

I created the users (e.g. uid=user2,ou=users,o=X) as inetOrgPerson with a
SHA userPassword.
The ou=system looks like this: 
LDAP.png <http://activemq.2283324.n4.nabble.com/file/t379096/LDAP.png>  

The shiro.ini contains:
ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
ldapRealm.userDnTemplate = uid={0},ou=users,o=X
ldapRealm.contextFactory.url = ldap://localhost:10389
securityManager.realms = $ldapRealm

The authentication is working from Java:

Factory<SecurityManager> factory = new
SecurityManager securityManager = factory.getInstance();
AuthenticationToken authenticationToken = new UsernamePasswordToken("user2",
AuthenticationInfo authenticationInfo =
System.out.println("authenticationInfo: " + authenticationInfo);
//authenticationInfo: user2

However, when connecting to the MoM-Broker and trying to send a Message I
get the following Exception:

SecurityException: Subject [user2] is not authorized to create destination:

How can I grant this user to create the destination topic?

For reference, I tried to get an answer  here
<https://stackoverflow.com/q/50703245/12860>   first.

Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html