Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.2.3. 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 via MBeans. To prevent unauthorized access to data and applications, you need to secure JMX communications by configuring JMX over SSL.
Configuring JMX over SSL access, involves:
After you have configured JMX over SSL access, you should test the connection.
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
admin
roleEdit the<installDir>/jboss-fuse6.0.redhat-024/etc/users.properties
file to enable the defaultadmin
user by uncommenting the line#admin=admin,admin
. Alternatively, you can define another user with theadmin
role. - cd to
<installDir>/jboss-fuse6.0.redhat-024/etc
.
Create the jbossweb.keystore Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
At the command line, using
-dname
values 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 the same command line.
The command returns output that looks like this:
Check whether
<installDir>/jboss-fuse6.0.redhat-024/etc
now contains the file jbossweb.keystore
.
Create 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-fuse6.0.redhat-024/etc
directory. - Include this text in the file:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check whether<installDir>/jboss-fuse6.0.redhat-024/etc
now contains the filekeystore.xml
.
Ensure that the keystore.xml file is loaded at the appropriate time Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Create the
org.apache.felix.fileinstall-keystore.cfg
file.
- Using your favorite text editor, create and save the
org.apache.felix.fileinstall-keystore.cfg
file in the<installDir>/jboss-fuse6.0.redhat-024/etc
directory. - Include these properties in the file:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check whether<installDir>/jboss-fuse6.0.redhat-024/etc
now contains the fileorg.apache.felix.fileinstall-keystore.cfg
.
Add the required properties to org.apache.karaf.management.cfg Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Edit the
<installDir>/jboss-fuse6.0.redhat-024/etc/org.apache.karaf.management.cfg
file to include these properties at the end of the file:
secured = true secureProtocol = SSL keyAlias = jbossalias keyStore = sample_keystore trustStore = sample_keystore
secured = true
secureProtocol = SSL
keyAlias = jbossalias
keyStore = sample_keystore
trustStore = sample_keystore
Testing the Secure JMX connection Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
- Restart Red Hat JBoss Fuse, if necessary.NoteWhen you restart Red Hat JBoss Fuse,
fuse.log
will contain anINFO
message that the OsgiKeystoreManager could not find thesample_keystore
you configured in theorg.apache.karaf.management.cfg
file. This occurs because thesample_keystore
was not loaded at the time the OSGi management bundle was loading.But theorg.pache.felix.fileinstall-keystore.cfg
file you created forces the OSGi management bundle to reload and scan the keystore, enabling JConsole to connect successfully to Red Hat JBoss Fuse over SSL. - Open a terminal, and start up JConsole by entering this command:
jconsole -J-Djavax.net.debug=all -J-Djavax.net.ssl.trustStore=/NotBackedUp/FuseSource/ jboss-fuse-6.0.0.redhat-024/etc/jbossweb.keystore -J-Djavax.net.ssl.trustStoreType=JKS -J-Djavax.net.ssl.trustStorePassword=JbossPassword
jconsole -J-Djavax.net.debug=all -J-Djavax.net.ssl.trustStore=/NotBackedUp/FuseSource/ jboss-fuse-6.0.0.redhat-024/etc/jbossweb.keystore -J-Djavax.net.ssl.trustStoreType=JKS -J-Djavax.net.ssl.trustStorePassword=JbossPassword
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantType the entire command on the same command line.NoteThe system property -J-Djavax.net.debug=all shows all transport information, including SSL handshake messages, confirming that communication between JConsole and Red Hat JBoss Fuse occurs over SSL. - When JConsole opens, select the option Remote Process in the New Connection wizard.
- Under the Remote Process option, enter these values for the
service:jmx:<protocol>:<sap>
url, Username, and Password:service:jmx:<protocol>:<sap>: service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root Username: admin Password: admin
service:jmx:<protocol>:<sap>: service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root Username: admin Password: admin
Copy to Clipboard Copied! Toggle word wrap Toggle overflow