SSL Enable in JBoss

Step 1: Create keyStore certificate:

Open command prompt

C:\Program Files\Java\jdk1.6.0_32\bin>keytool -genkey -alias mycert -keyalg RSA

-keystore mycert.keystore -validity 180

Re-enter new password:test123
What is your first and last name?
[Unknown]: admin
What is the name of your organizational unit?
[Unknown]: myorg
What is the name of your organization?
[Unknown]: myorg
What is the name of your City or Locality?
[Unknown]: pune
What is the name of your State or Province?
[Unknown]: maharashtra
What is the two-letter country code for this unit?
[Unknown]: 91
Is CN=admin, OU=myorg, O=myorg, L=pune, ST=maharashtra, C=91 correct?
[no]: yes
Enter key password for test123
(RETURN if same as keystore password):
Re-enter new password: test123

Now we have mycert.keystore certification file inside C:\Program Files\Java\jdk1.6.0_32\bin location.

Step 2: Then copy mycert.keystore file and paste it in following server location:

\jboss-eap-6.1\standalone\configuration

Step 3: Open standalone.xml file.

(\jboss-eap-6.1\standalone\configuration\standalone.xml)

Step 4: Add following bold tags inside standalone.xml:
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enable-lookups="false" secure="true">

<ssl name="ssl" key-alias="mycert" password="test123" certificate-key-file="../standalone/configuration/mycert.keystore" protocol="TLSv1" verify-client="false"/>

</connector></b>

<virtual-server name="default-host" enable-welcome-root="true">

<alias name="localhost"/>

<alias name="example.com"/>

</virtual-server>

</subsystem>

.......

.......

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>

<socket-binding name="ajp" port="8009"/>

<socket-binding name="http" port="8080"/>

<socket-binding name="https" port="8443"/><

<socket-binding name="remoting" port="4447"/>

<socket-binding name="txn-recovery-environment" port="4712"/>

<socket-binding name="txn-status-manager" port="4713"/>

<outbound-socket-binding name="mail-smtp">

<remote-destination host="localhost" port="25"/>

</outbound-socket-binding>

</socket-binding-group>

Step 5: Save it and restart jBoss server.

Comments

Popular posts from this blog

XML Parsing in IBM BPM

Type conversion in IBM BPM

Parse the JSON in IBM BPM