A.Ston
A.Ston

Reputation: 7

how to assign certificate for ActiveMQ ssl transport Connector?

I have enabled ssl transport Connector in Active MQ Version 5.17.1 (in activemq.xml) using this line:

<transportConnector name="ssl" uri="ssl://0.0.0.0:29617?transport.needClientAuth=true&amp;maximumConnections=1000&amp;wireFormat.maxFrameSize=209715200&amp;jms.prefetchPolicy.all=10"/>

which is structured like this:

<beans>
  <broker>
    <transportConnectors>
      <transportConnector ....../>
    </transportConnector>
  </broker>
</beans>

How do I tell this connector now which broker.ks and broker.ts (and the corresponding passwords) to use? I could not find anything on the web except the java options as in https://activemq.apache.org/how-do-i-use-ssl but those "effect all SSL users in a JVM". Is there a way to define .ks and .ts per connector? and where would I put it in the xml structure?

Upvotes: 0

Views: 481

Answers (1)

Tim Bish
Tim Bish

Reputation: 18421

You can add configuration to the ActiveMQ XML configuration file to provide the location and credentials for the key store so you don't need to use the environment variable option.

     <sslContext>
        <sslContext keyStore="file:${activemq.conf}/broker.ks"
          keyStorePassword="password" trustStore="file:${activemq.conf}/broker.ts"
          trustStorePassword="password"/>
    </sslContext>

The broker distribution ships with example configurations that demonstrate a configured broker with SSL enabled.

Upvotes: 1

Related Questions