Activemq secure connection
First, define user groups
1.1 simpleAuthenticationPlugin by configuring user groups in activemq.xml
1.2 configure user groups through JAAS
Add login.config file
Activemq {org.apache.activemq.jaas.PropertiesLoginModule required org.apache.activemq.jaas.properties.user= "users.properties" org.apache.activemq.jaas.properties.group= "groups.properties" reload=true;}
Note: when reload is set to true, the username and password will be reloaded on each request, that is, the modification will take effect immediately.
Add users.properties
System=manageradmin=passworduser=passwordguest=passwordsslclient=CN=localhost, OU=activemq.org, O=activemq.org, L=LA, ST=CA, C=US
Add groups.properties
Admins=system,sslclient,client,broker1,broker2tempDestinationAdmins=system,user,sslclient,client,broker1,broker2users=system,user,sslclient,client,broker1,broker2guests=guest
2. Queue and topic configure read and write permissions for different roles
Note:
The value of configuration should match the name of the setting in login.config, such as activemq
ActiveMQ.Advisory. > the topic configured as an expression must be set. Because this is the type of theme when connecting, if you do not configure this item, the connection will report an error (no permissions).
II. The connection between broker and broker
Reference address: http://activemq.apache.org/security.html