3.5. Enable Broker-to-Broker Authentication in A-MQ
To enable authentication between 2 brokers, for example Broker A and Broker B, where Broker A is configured to perform authentication, you can configure Broker B to log on to Broker A by setting the
userName
attribute and the password attribute in the networkConnector
element.
To configure the network connector follow the below instructions:
- Assuming that Broker A is configured to connect to Broker B. Configure the Broker A's networkConnector element with username/password credentials as shown:
- For example, the following settings would enable basic encryption using the MD5 message digest algorithm:
<beans> <broker> <networkConnectors> <networkConnector name="BrokerABridge" userName="user" password="password" uri="static://(ssl://brokerA:61616)"/> </networkConnectors> </broker> </beans>
Here Broker A's authentication plug-in checks for Broker A's username. For example, if Broker A has its authentication configured by a simpleAuthenticationPlugin element, Broker A's username must appears in this element.
The encryption settings in the
org.apache.karaf.jaas.cfg
file are applied only to the default karaf realm in a standalone container.