Configuring Secure Socket Layer in WebSphere Application Server

Overview: WebSphere Application Server's use of Secure Socket Layer

Secure Socket Layer (SSL) provides secure communication for several WebSphere Application Server components. In particular, SSL is used between:

The administrative model in WebSphere Application Server allows these SSL components to be centrally managed by configuring the default SSL settings. Using the default settings to connect to the LDAP server and plug-in can be overridden by configuring the specific SSL settings for those connections.

Configuring Secure Socket Layer between the Web browser and the Web server:

Configuring Secure Socket Layer for the browser

Configuring SSL for the browser is browser-specific. Refer to the respective browser documentation for instructions. When you type "https://..." instead of "http://...", the browser creates an SSL connection instead of a simple TCP connection to the Web server. Then, the browser either prompts you or fails to connect. When the browser prompts you, it asks if you want to trust the SSL secured Web server you trying to connect to, because there is no signer certificate in the memory corresponding to the certificate used to secure the Web server. This is normal if the Web server was secured using a self signed certificate or a Certificate Authority (CA) that does not have an agreement with the Web browser. The browser fails if it is unable to validate the Web server or unable to agree upon the level of security options.

Configuring Secure Socket Layer for the Web server

Configuring SSL for the Web server depends on the type of Web server. Refer to your Web server documentation for instructions. When SSL is enabled, an SSL key file is required. The key file should contain the CA signer certificates and any personal certificates. Client authentication is disabled by default. See the InfoCenter article "5.5.5: Mapping certificates to users for client authentication and authorization" for more information.

In order for the client certificate to be forwarded by the WebSphere Web server plug-in to the WebSphere Application Server, client authentication must be enabled for the Web server. Enabling client authentication in WebSphere Application Server is not required unless you want to authenticate the WebSphere Web server plug-in or any other clients connecting directly to the WebSphere Application Server through SSL.

Also, the virtual host for each application server using the SSL port (usually 443), needs to have a port alias added for the SSL port. See the InfoCenter article "6.6.16: Administering virtual hosts".

Configuring Secure Socket Layer for IBM HTTP Server

This section provides an example of configuring SSL for IBM HTTP Server. See the IBM HTTP Server documentation for the current and complete instructions. The httpd.conf.sample file in your Web server provides examples of all directives, including the SSL-related directives.

Create a key file using the IBM HTTP Server key management utility.

  1. Add the following lines to the bottom of your httpd.conf file:
    LoadModule ibm_ssl_module modules/IBMModuleSSL128.dll(for Windows)
    
  2. 		
    LoadModule ibm_ssl_module libexec/mod_ibm_ssl_128.so (for Unix)
  3. 		
    AddModule mod_ibm_ssl.c (for Unix)
  4. 		
    Listen 443
  5. 		
    <VirtualHost:443>
  6. 		
    SSLEnable
  7. 		
    </VirtualHost>
  8.  
    Keyfile "product_installation_root/myKeys/WebServerKeys.kdb"

  9. (use a backward slash (\) instead of a forward slash (/)for Windows)
After adding these lines to the bottom of your httpd.conf file, the Web server to listen on port 443 (the default SSL port).
  1. Start your IBM HTTP Server.
  2. Test your configuration from a browser by entering a URL such as:
    https://localhost
    
  3. If you are using a self-signed certificate, instead of a certificate issued by a CA, such as VeriSign, your browser should prompt you to trust the unknown signer of the server certificate. If you enabled client authentication, your browser might prompt you to select a certificate to send to the Web server in order to perform client authentication. The page should then be displayed. 
    	
  4. Test your configuration from a browser on a sample application:

Configuring Secure Socket Layer between the Web server plug-in and an application server

Step 1: Creating an Secure Socket Layer key file for the application server
  1. Start the JSSE key management utility. On Windows, start the Key Management Utility from the WebSphere Application Server entry on the Start menu.
  2. Create a new key database file.
    a. Click Key Database File and select New.
    b. Specify settings: c. Click OK.
    d. Enter a password and click OK.
  3. Delete all of the signer certificates.
  4. Click Signer Certificates and select Personal Certificates.
  5. Add a new self-signed certificate.
    a. Click New Self-Signed to add a self-signed certificate.
    b. Specify settings: c. Click OK.
  6. Extract the certificate from this self-signed certificate so that it can be imported into the signer certificate section of the application server SSL key file and the plug-in SSL key file.
    a. Click Extract Certificate.
    b. Specify settings: c. Click OK.
  7. Import the self-signed certificate as a signer certificate. If you are using a CA instead of a self-signed certificate, a special certificate called the CA certificate must be received from the CA separately and imported as the signer certificate instead of doing as follows for a self-signed certificate:
    a. Click Personal Certificates and select Signer Certificates.
    b. Click Add.
    c. Specify settings: d. Click OK.
  8. Enter "appServer signer" for the label and click OK.
  9. Click Key Database File.
  10. Select Exit. Make sure to exit or close the key database file each time it is modified to ensure the changes are picked up by the plug-in.
Step 2: Creating a Secure Socket Layer key file for the Web server plug-in
  1. Create the directory product_installation_root\myKeys.
This directory should contain the SSL key files and extracted certificates that you create.
  1. Start the key management utility of GSKit.
GSKit is the SSL implementation used by the WebSphere plug-in, which is the same implementation used by the IBM HTTP Server.
  1. Click Key Database File and select New.
  2. Specify settings and click OK:
  3. Enter a password for your SSL key file.
  4. Select Stash the password to a file. Click OK.
The "product_installation_root\myKeys\plug-inKeys.sth file is created containing an encoded form of the password. Encoding prevents a casual viewing of the password, but is not highly secure. Therefore, use operating system permissions to prevent all access to this file by unauthorized persons.
  1. When you see the list of default Signer Certificates, select the first certificate and click Delete.
  2. Repeat the previous step until all of the signer certificates have been deleted.
  3. Click Signer Certificates and select Personal Certificates.
  4. Add a new self-signed certificate. If you are using a CA instead of a self-signed certificate, a special certificate called the CA certificate must be received from the CA separately and imported as the signer certificate instead of doing as follows for a self-signed certificate:
    a. Click New Self-Signed to add a self-signed certificate.
    b. Specify settings. c. Click OK.
  5. Extract the certificate so that you can import it into the application server key file later.
    a. Click Extract Certificate.
    b. Specify settings: c. Click OK.
  6. Import the application server certificate. If you are using a CA instead of a self-signed certificate, a special certificate called the CA certificate must be received from the CA separately and imported as the signer certificate instead of doing as follows for a self-signed certificate:
    a. Go to the Signer Certificates.
    b. Click Add.
    c. Specify settings: d. Click OK.
  7. Type "appServer signer" for the label and click OK.
  8. Click the Key Database File menu and select Close. Make sure to exit or close the key database file each time it is modified to ensure the changes are picked up by the plug-in.
Step 3: Import the plug-in certificate into the application server Secure Socket Layer key file
  1. Start the JSSE key management utility.
  2. Click Key Database File and select Open.
  3. Find appServerKeys.jks in your myKeys directory and double-click on it.
  4. Enter a password for your SSL key file.
  5. Import the plug-in certificate.
    a. Go to the Signer Certificates.
    b. Click Add.
    c. Specify settings. If you are using a CA instead of a self-signed certificate, a special certificate called the CA certificate must be received from the CA separately and imported as the signer certificate instead of doing as follows for a self-signed certificate: d. Click OK.
  6. Enter "plug-in signer" for the label and click OK.
  7. Click Key Database File.
  8. Select Exit. Make sure to exit or close the key database file each time it is modified to ensure the changes are picked up by the plug-in.
Step 4: Referencing the appServerKeys.jks key file in the Web container transport settings
  1. In the administrative console navigation tree, click WebSphere Administrative Domain > Nodes > node_name > Application Servers > application_server_name.
  2. In the properties frame, click the Services tab.
  3. In the Service table, click Web Container Service > Edit Properties.
  4. In the Web Container Service window, click the Transport tab.
  5. Click Add.
  6. Specify settings in the General tab.
  7. Select Enable SSL.
  8. Specify settings in the SSL configuration.
  9. Select Enable client authentication. Enabling client authentication ensures that only the plug-in containing the matching certificate is able to authenticate to the application server.
  10. Save your changes.
  11. In the navigation tree, right-click WebSphere Administrative Domain > Nodes > node_name to display a pop-up menu.
  12. Select Regen Webserver Plugin to incorporate the transport settings into the plugin-cfg.xml file.
Step 5: Modifying the Web server plug-in configuration file
  1. Start the JSSE key management utility.
    On Windows, start the key management utility from the WebSphere Application Server entry on the Start menu.
  2. Create a new key database file.
    a. Click Key Database File and select New.
    b. Specify settings: c. Click OK.
    d. Enter a password and click OK.
  3. Delete all of the signer certificates.
  4. Click Signer Certificates and select Personal Certificates.
  5. Add a new self-signed certificate.
    a. Click New Self-Signed to add a self-signed certificate.
    b. Specify settings.
    c. Click OK.
  6. Extract the certificate from this self-signed certificate so that it can be imported into the signer certificate section of the application server's SSL key file and other trust files as needed.
    a. Click Extract Certificate.
    b. Specify settings: c. Click OK.
  7. Import the self-signed certificate as a signer certificate. If you are using a CA instead of a self-signed certificate, a special certificate called the CA certificate must be received from the CA separately and imported as the signer certificate instead of doing the following for a self-signed certificate:
    a.Click Personal Certificates and select Signer Certificates.
    b.Click Add.
    c.Specify settings: d.Click OK.
  8. Enter "SSL Signer" for the label and click OK.
  9. Click Key Database File.
  10. Click Exit. Make sure to exit or close the key database file each time it is modified to ensure the changes are picked up by the WebSphere Application Server.
Step 2: Reference the key file in WebSphere Application Server systems administration
  1. In the navigation tree click Security Center.
  2. Click Default SSL Configuration.
  3. Specify settings in the default SSL configuration.
  4. Save your changes.
Step 3: Creating a Secure Socket Layer key file for the WebSphere Application Server administrative clients and external EJB clients
  1. Start the JSSE key management utility.
    On Windows, start the key management utility from the WebSphere Application Server entry on the Start menu.
  2. Create a new key database file.
    a.Click Key Database File and select New.
    b.Specify settings: c. Click OK.
    d. Enter a password and click OK.
  3. Delete all of the signer certificates.
  4. Import the self-signed certificate as a signer certificate.
    a. Go to the Signer Certificates section.
    b. Click Add.
    c. Specify settings. If using a CA instead of a self-signed certificate, a special certificate called the CA certificate must be received from the CA separately and imported as the signer certificate instead of doing the following for a self-signed certificate: d.Click OK.
  5. Enter "Default SSL Signer" for the label and click OK.
  6. Click Key Database File.
  7. Select Exit. Make sure to exit or close the key database file each time it is modified to ensure the changes are picked up by the WebSphere Application Server.
Step 4: Reference the key file in WebSphere Application Server administrative clients and external EJB clients
  1. Edit the "product_installation_root\properties\sas.client.props and any other copy or derivation of the sas.client.props file using a text editor and modify the following parameters as indicated:
    com.ibm.ssl.keyStoreType=JKS 
    com.ibm.ssl.keyStore=product_installation_root\myKeys\ClientKeys.jks
    com.ibm.ssl.keyStorePassword=enter your password
    com.ibm.ssl.trustStoreType=JKS
    com.ibm.ssl.trustStore=product_installation_root\myKeys\ClientKeys.jks
    com.ibm.ssl.trustStorePassword=enter your password
  2. Save the modified file
Step 5: (Optional) Add the SSLKeys.arm signer certificate to the plug-in key file
  1. Start the GSKit key management utility.
  2. Open the plug-in key file.
  3. Import SSLKeys.arm as a signer certificate.
    a. Access the Signer Certificates section.
    b. Click Add.
    c. Specify settings: d. Click OK.
  4. Click the Key Database File menu and select Close.
Step 6: (Optional) Add the LDAP server signer certificate to the SSLKeys.jks file
  1. Export the certificate from the LDAP server.
  2. Start the JSSE key management utility.
  3. Open the SSLKeys.jks file.
  4. Import the LDAP server certificate as a signer certificate.
    a. Access the Signer Certificates section.
    b. Click Add.
    c. Specify settings: d. Click OK.
  5. Click the Key Database File menu and select Close. Make sure to exit or close the key database file each time it is modified to ensure the changes are picked up by the WebSphere Application Server.
Step 7: Stop and restart the servers.