-
-
Notifications
You must be signed in to change notification settings - Fork 7
Securing connections
Dannes Wessels edited this page Mar 20, 2016
·
24 revisions
Add a snippet like below to the <broker> section of the activemq.xml configuration file. Note that ActiveMQ provides sophisticated authentication features for 'real world' usages. The ActiveMQ project provides documentation about pluggable security through various different providers.
Server side
Add an XML fragment to enable (simple) authentication. Please note the anonymousAccessAllowed attribute.
<plugins>
<simpleAuthenticationPlugin anonymousAccessAllowed="false">
<users>
<authenticationUser username="system" password="manager" groups="users,admins"/>
<authenticationUser username="user" password="password" groups="users"/>
<authenticationUser username="myusername" password="mypassword" groups="guests"/>
</users>
</simpleAuthenticationPlugin>
</plugins>On the client site define connection.username and connection.password in the scripts or in conf.xml:
Client side, XML config
<parameter name="connection.username" value="myusername"/>
<parameter name="connection.password" value="mypassword"/>Client side, in XQuery
let $jmsConfiguration :=
map {
"java.naming.factory.initial"
:= "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
"java.naming.provider.url" := "tcp://localhost:61616",
"destination" := "dynamicQueues/eXistdb-messaging-demo",
"connection-factory" := "ConnectionFactory",
"connection.username" := "myusername",
"connection.password" := "mypassword"
}On the ActiveMQ website there is documentation how to secure connections between ActiveMQ clients and a ActiveMQ broker.