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.Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 3. Securing the Web Console
Abstract
etc/org.ops4j.pax.web.cfg
configuration file.
Prerequisites Copier lienLien copié sur presse-papiers!
JBossFuse:karaf@root> features:install webconsole
JBossFuse:karaf@root> features:install webconsole
Create X.509 certificate and private key Copier lienLien copié sur presse-papiers!
Enabling SSL/TLS Copier lienLien copié sur presse-papiers!
- Open
etc/org.ops4j.pax.web.cfg
in a text editor. - Disable the insecure HTTP port by adding the org.osgi.service.http.enabled and setting it to false as shown in Example 3.1, “Pax Web Property for Disabling the HTTP Port”.
Example 3.1. Pax Web Property for Disabling the HTTP Port
org.osgi.service.http.enabled=false
org.osgi.service.http.enabled=false
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable the secure HTTPS port by adding the org.osgi.service.http.secure.enabled and setting it to
true
as shown in Example 3.2, “Pax Web Property for Enabling the HTTPS Port”.Example 3.2. Pax Web Property for Enabling the HTTPS Port
org.osgi.service.http.secure.enabled=true
org.osgi.service.http.secure.enabled=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify the port used for connecting over HTTPS by adding the org.osgi.service.http.port.secure and setting it to an available port as shown in Example 3.3, “Pax Web Property for Enabling the HTTPS Port”.
Example 3.3. Pax Web Property for Enabling the HTTPS Port
org.osgi.service.http.port.secure=8183
org.osgi.service.http.port.secure=8183
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the keystore used to hold the X.509 certificates.
- Specify the location of the keystore by adding the org.ops4j.pax.web.ssl.keystore.
- Specify the type of keystore used by adding the org.ops4j.pax.web.ssl.keystore.type and setting it to
JKS
. - Specify the password for unlocking the Java keystore by adding the org.ops4j.pax.web.ssl.password property.
- Specify the password for decrypting the private key by adding the org.ops4j.pax.web.ssl.keypassword property.NoteThis is typically the same as the password used to unlock the keystore.
- Specify if certificate-based client authentication at the server is wanted by adding the org.ops4j.pax.web.ssl.clientauthwanted property.When set to
true
the server will request that the client send an X.509 certificate during the SSL handshake. - Specify if certificate-based client authentication at the server is required by adding the org.ops4j.pax.web.ssl.clientauthneeded property.When set to
true
an exception is thrown if the client does not present a valid X.509 certificate during the SSL handshake.
Example Copier lienLien copié sur presse-papiers!
cherry.jks
. The keystore has the store password password
and the key password password
.
Example 3.4. Configuration for Web Console to use SSL
SSL configuration properties Copier lienLien copié sur presse-papiers!
org.ops4j.pax.web.ssl.keystore
- The location of the Java keystore file on the file system. Relative paths are resolved relative to the
KARAF_HOME
environment variable (by default, the install directory). org.ops4j.pax.web.ssl.keystore.type
- The implementation of the keystore, which is normally
JKS
. (In principle, the JDK allows you to plug in a custom keystore implementation.) org.ops4j.pax.web.ssl.password
- The store password that unlocks the Java keystore file.
org.ops4j.pax.web.ssl.keypassword
- The key password that decrypts the private key stored in the keystore (usually the same as the store password).
org.ops4j.pax.web.ssl.clientauthwanted
- When
true
, during the SSL handshake, the secure socket requests the client to send an X.509 certificate. The client is not necessarily obliged to send the certificate, however. org.ops4j.pax.web.ssl.clientauthneeded
- When
true
, the SSL protocol throws an exception, if the client does not present a valid certificate during the SSL handshake.
Configuration reference Copier lienLien copié sur presse-papiers!
Connect to the secure Web console Copier lienLien copié sur presse-papiers!
webconsole
feature, you should be able to open the Web console by browsing to the following URL:
https:
scheme, instead of http:
, in this URL.
smx
and the password smx
.