Skip to content

Securing connections

Dannes Wessels edited this page Mar 20, 2016 · 24 revisions

Authentication

Simple example: Configuring ActiveMQ

Add a snippet like below to the <broker> section of the activemq.xml configuration file. Note nate ActiveMQ provides sophisticated authentication messages for 'real' usage'

<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`:

in XML:

  <parameter name="connection.username" value="myusername"/>
  <parameter name="connection.password" value="mypassword"/>

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" := "username",
        "connection.password" := "password"
    }

SSL

to be written

Clone this wiki locally