Enabling SSL on JBoss Application Server
Enable and verify SSL on JBoss Application Server.
Procedure
-
Generate Key
-
keytool -genkey -alias jboss7 -keyalg RSA -keystore server.keystore -validity 10950
Note: Where,- the value of -alias refers an alias for the JBoss 7 Application Server name.
- the value of -keystore refers to the filename where the generated key is saved.
- the value of
-validity refers to the validity of the certificate. Specify the value in days. For example, if the certificate is valid for 30 years, specify 10950.
You can modify the values as per your requirement.
- Press Enter. The command prompts to enter the password.
- Enter the password.
- Re-enter the new password. The command displays a list of questions related to your organization.
- Type an answer for each question.
- Enter the password.
-
Re-enter the new password.
A server.keystore file is generated in the $JBOSS_HOME/standalone/configuration directory.
-
-
Add HTTPS Connector
- Go to $JBOSS_HOME/standalone/configuration directory and open the standalone.xml file.
-
Under
<subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host"> element, add the following details:
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enabled="true" secure="true"/>
- Save the updated standalone.xml file.
-
Specify SSL Parameters
- Go to $JBOSS_HOME/standalone/configuration directory and open the standalone.xml file.
-
Specify the following SSL parameter inside the
https connector parameter.
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true" enabled="true"> <ssl name="jboss7_ssl" key-alias="jboss71" password="Tibco321" certificate-key-file="../standalone/configuration/server.keystore" protocol="TLSv1"/> </connector>
- Save the updated standalone.xml file.
-
Verify SSL Configuration
For https protocol, JBoss uses 8443 port.
Copyright © Cloud Software Group, Inc. All rights reserved.