I am trying to use the JaasAuthenticationPlugin to authenticate users trying to access specific queues. (Most of my code is based off of the examples given in ActiveMQ in Action)
Ultimately, I want to authenticate against an Active Directory server, which may have groups with spaces in their names, but when I attempt to use groups with spaces in their names, I run into problems. What I have so far:
login.config:
activemq-domain {
org.apache.activemq.jaas.PropertiesLoginModule required
debug=true
org.apache.activemq.jaas.properties.user="users.properties"
org.apache.activemq.jaas.properties.group="groups.properties";
};
users.properties:
user=password
group.properties:
users=user
Users Group=user
activemq.xml:
<plugins>
<jaasAuthenticationPlugin configuration="activemq-domain" />
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">"
read="users"
write="users"
admin="users" />
<authorizationEntry topic=">"
read="users"
write="users"
admin="users" />
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
This works fine, but as soon as I try to use "Users Group" instead of "users", I get:
javax.jms.JMSException: User user is not authorized to create: topic://ActiveMQ.Advisory.Connection
Are group names with spaces unsupported by ActiveMQ or JAAS? Do I need to escape the spaces somehow?
Try escaping the space
Change:
Users Group=user
To:
Users\ Group=user