These days the enterprise applications have grown more complex and boast a great deal of sensitive and critical data online. Cyber security has become more than important these days to secure the data.
Secure Sockets Layer plays a pivotal role in how a sensitive data can be protected, accessed over a network.
Secure Sockets Layer (SSL) provides secure connections by allowing two applications connecting over a network connection to authenticate the other’s identity and by encrypting the data exchanged between the applications. Authentication allows a server and optionally a client to verify the identity of the application on the other end of a network connection. Encryption makes data transmitted over the network intelligible only to the intended recipient.
It provides transport level security by usage of the SSL certificates which are provided by the Industry standard Certificate Authorities like Verisign, GeoTrust, GoDaddy etc.
WebLogic Server supports SSL on a dedicated listen port which defaults to 7002. To establish an SSL connection, a Web browser connects to WebLogic Server by supplying the SSL listen port and the HTTPs protocol in the connection URL, for example,
The below post describes the complete procedure about procuring the certificate, installing and configuring the certificate to the WebLogic Server. (WebLogic SSL Configuration).
1: Generating and procuring the certificate:
a: Open a command prompt and set the environment by running the setDomainEnv script.
b: Generate the private – public key pair. For demonstration we would use keytool java utility to do so. However we can use other utilities like openssl etc.
keytool -genkey -alias client -keyalg RSA -keysize 2048 -keystore identity.jks -storepass password -keypass password
c: Generate a Certificate Signing Request (CSR) and send it to Certifying Authority.
keytool -certreq -keyalg RSA -keysize 2048 -alias client -file certreq.csr -keystore identity.jks -storepass password
The CA would return with the certificate reply and the RootCA and sometimes an intermediateCA certificate.
d: Import the certificates into the keystore, this can be done in two ways either by importing the certificates in an order of RootCA, intermediateCA and then Certificate reply. Or we can create a certificate chain clubbing them in an order into a .pem file.
For demo, we would create a certificate chain file CertChain.pem and import it into the identity keystore overriding the private key alias which is client in this example.
keytool -import -file CertChain.pem -alias client -keystore identity.jks -storepass password
e: Create a trust keystore, this can be done my importing your RootCA certificate into another keystore that constitutes the trust.
keytool -import -file rootCA.cer -alias RootCA -keystore trust.jks -storepass password
To verify the contents of the keystore, you can use the below command,
Keytool –list –v –keystore <keystore-name> -storepass <keystore-password>
2: Configuring the keystore on the WebLogic Server.
a: Log into the Admin Console, select the server on which you want to configure the SSL certificate.
Server –> Click on the Keystore tab. By default it points to the Demo Certificates.
From the dropdown list select the “Custom Identity and Custom Trust” option.
Enter the identity and trust keystore details.
b: Configure the identity of the server:
Click on the SSL tab and enter the alias of the private key i.e. client in this case and the keypass password.
NOTE: If you enable the SSL for a WebLogic Server, by default it would be One Way SSL. If you want to change to Two Way SSL, you would require to select the two way SSL behavior from the Advanced option list.
c: Configure the SSL port.
By default it would be 7002.
Go to server –> General tab –> Specify and enable SSL port.
You can see the below messages in the server logs which indicate that the certificates are loaded.
<Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias client from the JKS keystore file C:\Wonders\WebLogic\Security\SSL-Certs\Verisign\identityVerisign.jks.>
<Notice> <Security> <BEA-090169> <Loading trustedcertificates from the JKS keystore file C:\Wonders\WebLogic\Security\SSL-Certs\Verisign\trustVerisign.jks.>
3: Test the setup:
You can test the setup by accessing the admin console (if SSL is configured for Admin Server) or any application deployed on the server by accessing it on https protocol.
Now verify whether the right certificate is configured or not.
Click on the certificate details and you would find the details about the identity and the RootCA along with the certificate chain.
NOTE: For a production environment make sure that CN (Common Name) of the certificate matches with the server host name.
You can also use self signed certificates or trial certificates for testing purpose. However is it not recommended to use them in production environment.
You can get the Verisign trail certificates from the below link.
For further reading :
Wonders Team 🙂