Using Encrypted Property Placeholders for ActiveMQ SSL passwords in "etc/activemq.xml" file

Solution Verified - Updated -

Issue

When activating ActiveMQ features in JBoss Fuse, the default etc/activemq.xml file is used as configuration.

In order to activate SSL, some configuration needs to be applied on the file, mainly to define the keystore and truststore ActiveMQ will use.

Here is an example of the configuration:

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="${broker-name}" dataDirectory="${data}" start="false" useJmx="true">
...
<sslContext>
    <sslContext keyStore="wherever.jks" keyStorePassword="changeit" trustStore="wherever.jks" trustStorePassword="changeit" />
</sslContext>
...
</broker>

As you can see, the password to the keystore and truststore have to be written in clear in the file.

Is there a way to encrypt these passwords so they do not appear in clear text in the file? Something like in etc/users.properties maybe?

Environment

  • Fuse ESB Enterprise 7.1
  • Fuse MQ Enterprise 7.1
  • Red Hat JBoss A-MQ 6.0
  • Red Hat JBoss Fuse 6.0
  • Red Hat JBoss A-MQ 6.1
  • Red Hat JBoss Fuse 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content