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.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
2.3. Enabling Remote JMX SSL
Overview Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
If you haven't already done so, you need to:
- Set your
JAVA_HOMEenvironment variable - Configure a JBoss Fuse user with the
adminroleEdit the<installDir>/jboss-fuse6.0.redhat-024/etc/users.propertiesfile to enable the defaultadminuser by uncommenting the line#admin=admin,admin. Alternatively, you can define another user with theadminrole. - cd to
<installDir>/jboss-fuse6.0.redhat-024/etc.
Create the jbossweb.keystore Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
- Using your favorite xml editor, create and save the
keystore.xmlfile in the<installDir>/jboss-fuse6.0.redhat-024/etcdirectory. - Include this text in the file:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check whether<installDir>/jboss-fuse6.0.redhat-024/etcnow contains the filekeystore.xml.
Ensure that the keystore.xml file is loaded at the appropriate time Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Create the
org.apache.felix.fileinstall-keystore.cfg file.
- Using your favorite text editor, create and save the
org.apache.felix.fileinstall-keystore.cfgfile in the<installDir>/jboss-fuse6.0.redhat-024/etcdirectory. - Include these properties in the file:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check whether<installDir>/jboss-fuse6.0.redhat-024/etcnow contains the fileorg.apache.felix.fileinstall-keystore.cfg.
Add the required properties to org.apache.karaf.management.cfg Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
- Restart Red Hat JBoss Fuse, if necessary.NoteWhen you restart Red Hat JBoss Fuse,
fuse.logwill contain anINFOmessage that the OsgiKeystoreManager could not find thesample_keystoreyou configured in theorg.apache.karaf.management.cfgfile. This occurs because thesample_keystorewas not loaded at the time the OSGi management bundle was loading.But theorg.pache.felix.fileinstall-keystore.cfgfile 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=JbossPasswordCopy 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: adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow