Red Hat AMQ 6
As of February 2025, Red Hat is no longer supporting Red Hat AMQ 6. If you are using AMQ 6, please upgrade: Migrating to AMQ 7.2.4. Enabling Remote JMX SSL
Overview Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Red Hat JBoss Fuse provides a JMX port that allows remote monitoring and management of Fuse containers using MBeans. By default, however, the credentials that you send over the JMX connection are unencrypted and vulnerable to snooping. To encrypt the JMX connection and protect against password snooping, you need to secure JMX communications by configuring JMX over SSL.
To configure JMX over SSL, perform the following steps:
After you have configured JMX over SSL access, you should test the connection.
Warning
If you are planning to enable SSL/TLS security, you must ensure that you explicitly disable the SSLv3 protocol, in order to safeguard against the Poodle vulnerability (CVE-2014-3566). For more details, see Disabling SSLv3 in JBoss Fuse 6.x and JBoss A-MQ 6.x.
Note
If you configure JMX over SSL while Red Hat JBoss Fuse is running, you will need to restart it.
Prerequisites Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
If you haven't already done so, you need to:
- Set your
JAVA_HOME
environment variable - Configure a JBoss Fuse user with the
Administrator
roleEdit the<installDir>/jboss-fuse-6.3.0.redhat-187/etc/users.properties
file and add the following entry, on a single line:admin=YourPassword,Administrator
admin=YourPassword,Administrator
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This creates a new user with username,admin
, password,YourPassword
, and theAdministrator
role.
Create the jbossweb.keystore file Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Open a command prompt and make sure you are in the
etc/
directory of your AMQ installation:
cd <installDir>/jboss-fuse-6.3.0.redhat-187/etc
cd <installDir>/jboss-fuse-6.3.0.redhat-187/etc
At the command line, using a
-dname
value (Distinguished Name) appropriate for your application, type this command:
$JAVA_HOME/bin/keytool -genkey -v -alias jbossalias -keyalg RSA -keysize 1024 -keystore jbossweb.keystore -validity 3650 -keypass JbossPassword -storepass JbossPassword -dname "CN=127.0.0.1, OU=RedHat Software Unit, O=RedHat, L=Boston, S=Mass, C=USA"
$JAVA_HOME/bin/keytool -genkey -v -alias jbossalias -keyalg RSA -keysize 1024 -keystore jbossweb.keystore -validity 3650 -keypass JbossPassword -storepass JbossPassword -dname "CN=127.0.0.1, OU=RedHat Software Unit, O=RedHat, L=Boston, S=Mass, C=USA"
Important
Type the entire command on a single command line.
The command returns output that looks like this:
Check whether
<installDir>/jboss-fuse-6.3.0.redhat-187/etc
now contains the file jbossweb.keystore
.
Create and deploy the keystore.xml file Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
- Using your favorite xml editor, create and save the
keystore.xml
file in the<installDir>/jboss-fuse-6.3.0.redhat-187/etc
directory. - Include this text in the file:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Deploy the
keystore.xml
file to the container, by copying it into the<installDir>/jboss-fuse-6.3.0.redhat-187/deploy
directory (the hot deploy directory).NoteSubsequently, if you need to undeploy thekeystore.xml
file, you can do so by deleting thekeystore.xml
file from thedeploy/
directory while the Karaf container is running.
Add the required properties to org.apache.karaf.management.cfg Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Edit the
<installDir>/jboss-fuse-6.3.0.redhat-187/etc/org.apache.karaf.management.cfg
file to include these properties at the end of the file:
secured = true secureProtocol = TLSv1 keyAlias = jbossalias keyStore = sample_keystore trustStore = sample_keystore
secured = true
secureProtocol = TLSv1
keyAlias = jbossalias
keyStore = sample_keystore
trustStore = sample_keystore
Important
You must set
secureProtocol
to TLSv1
, in order to protect against the Poodle vulnerability (CVE-2014-3566)
Restart the AMQ container Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You must restart the AMQ container for the new JMX SSL/TLS settings to take effect.
Testing the Secure JMX connection Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
- Open a command prompt and make sure you are in the
etc/
directory of your AMQ installation:cd <installDir>/jboss-fuse-6.3.0.redhat-187/etc
cd <installDir>/jboss-fuse-6.3.0.redhat-187/etc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open a terminal, and start up JConsole by entering this command:
jconsole -J-Djavax.net.debug=ssl -J-Djavax.net.ssl.trustStore=jbossweb.keystore -J-Djavax.net.ssl.trustStoreType=JKS -J-Djavax.net.ssl.trustStorePassword=JbossPassword
jconsole -J-Djavax.net.debug=ssl -J-Djavax.net.ssl.trustStore=jbossweb.keystore -J-Djavax.net.ssl.trustStoreType=JKS -J-Djavax.net.ssl.trustStorePassword=JbossPassword
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Where the-J-Djavax.net.ssl.trustStore
option specifies the location of thejbossweb.keystore
file (make sure this location is specified correctly, or the SSL/TLS handshake will fail). The-J-Djavax.net.debug=ssl
setting enables logging of SSL/TLS handshake messages, so you can verify that SSL/TLS has been successfully enabled.ImportantType the entire command on the same command line. - When JConsole opens, select the option Remote Process in the New Connection wizard.
- Under the Remote Process option, enter the following value for the
service:jmx:<protocol>:<sap>
connection URL:service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root
service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow And fill in the Username, and Password fields with valid JAAS credentials (as set in theetc/users.properties
file):Username: admin Password: YourPassword
Username: admin Password: YourPassword
Copy to Clipboard Copied! Toggle word wrap Toggle overflow