Skip to content

JAAS

This page provides step-by-step instructions for configuring the Java Authentication and Authorization Service (JAAS) for both VM and Docker environments.

  1. Ensure the configuration file is named JMS_BRIDGE_ROOT/etc/jms-bridge/login.config. If not, rename it.

  2. Open the file and verify its content matches the following:

    Terminal window
    MyDomain {
    org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule required
    debug=true
    org.apache.activemq.jaas.properties.user="users.properties"
    org.apache.activemq.jaas.properties.role="roles.properties";
    };
  3. Check that the content of JMS_BRIDGE_ROOT/etc/jms-bridge/users.properties is as follows:

    Terminal window
    superSys=superSys123
    theAdmin=theAdmin123
    theUser=theUser123
  4. Ensure the content of JMS_BRIDGE_ROOT/etc/jms-bridge/roles.properties is as follows:

    Terminal window
    admins=theAdmin,superSys
    users=theUser,superSys
  5. Enable security settings in JMS_BRIDGE_ROOT/etc/jms-bridge/broker.xml by adding the following configurations:

    Terminal window
    <security-enabled>true</security-enabled>
    <security-settings>
    <security-setting match="#">
    <permission type="send" roles="admins,users"/>
    <permission type="consume" roles="admins,users"/>
    <permission type="createAddress" roles="admins"/>
    <permission type="deleteAddress" roles="admins"/>
    <permission type="createDurableQueue" roles="admins"/>
    <permission type="deleteDurableQueue" roles="admins"/>
    <permission type="createNonDurableQueue" roles="admins"/>
    <permission type="deleteNonDurableQueue" roles="admins"/>
    <permission type="manage" roles="admins"/>
    </security-setting>
    </security-settings>
  6. Open the configuration file located at JMS_BRIDGE_ROOT/etc/jms-bridge/jms-bridge.conf.

  7. Add the following property to the jms-bridge.conf file:

    Terminal window
    security {
    domain = "MyDomain"
    }
  8. After completing the configuration, restart the JMS BRIDGE servers.