ActiveMQ user config - which file does what?

Viewed 323

There are many locations for defining usernames and passwords:

  • activemq.xml
  • users.properties
  • groups.properties
  • credentials.properties
  • credentials-enc.properties

I am using authorizationPlugin in activemq.xml. I figure user/pass is for specific destinations

  1. How do the groups in authorizationPlugin relate to groups.properties?
  2. When are credentials.properties and credentials-enc.properties being used?
  3. How will the password from user.properties be used in contrast to the credentials.properties and credentials-enc.properties?
  4. Is it necessary that user/pass/group from files match (apart from users.properties/groups.properties)

Basically I want

  1. user/pass on TCP port
  2. user/pass on web console
  3. user/pass per destination
1 Answers

A good reference here: ActiveMQ Security

I suggest starting with getting user+password how you want, and then add authorization. The authorization is generally done by group or role tied to a destination or a destination wildcard. Be sure to create a 'allusers' group or 'allrole' as you generally want to grant all users access to the topic://ActiveMQ.Advisory.> destination wildcard.

The different files in the distribution are provided by different sample setups.

Assuming the Apache ActiveMQ distribution

  • conf/login.config defines which files ActiveMQ uses for authenticating and authorizing users and groups
  • conf/jetty-realm.properties defines which files the web console uses for authenticating and authorizing web console access

Note for future readers-- there is a JIRA to consolidate all auth in ActiveMQ to one set of files. Follow JIRA AMQ-8391

Related