Configure the Web server plug-in for Secure Sockets Layer
Before you begin
WebSphere has an internal HTTP transport which accepts HTTP requests. If you install an external HTTP server, the Web server plug-in must forward requests from the external HTTP server to WebSphere's internal HTTP transport. You should follow HTTP vendor's instruction to install and configure your HTTP server. Test your HTTP server by accessing...
http://your-host-URL...and...
https://your-host-URLYou should also have Web server plugin installed.
The connection between external HTTP server and WebSphere is by default not secured, even when global security is enabled.
This section documents the configuration necessary to instantiate a secure connection between the Web server plug-in and the internal HTTP transport in the WAS Web container on a distributed platform. By default, this connection is not secure, even when global security is enabled. This document discusses the configuration for IBM HTTP Server; however, the Web server-related configuration in this situation is not specific to any distributed platform Web server.
Procedure
- Create self-signed personal certificate. The Web server plug-in requires a key ring file to store its own private and public key files and to store the public certificate from the Web container key file. The following steps are required to generate a self-signed certificate for the Web server plug-in.
When you install Web server plugin, a default key ring is installed...
plugin_install_root/etc/plugin-key.kdbUse this file instead of creating a new one. In the following steps, a new file is created, but the steps are similar if you use an existing file. Create a directory on the Web server host for storing the key ring file that is referenced by the plug-in and associated files, for example,...
plugin_install_root/etc/keys
- Create a directory on the Web server host for storing the key ring file that is referenced by the plug-in and associated files, for example: plugin_install_root/etc/keys.
- Launch the key management utility (iKeyman), which is available in the WAS plugin_install_root/bin installation directory.
- From the iKeyman menu, click Key Database File > New.
- Enter the following settings:
- Key database type
- CMS Key Database File
- File name
- WASplugin.kdb
- Location
- plugin_install_root/etc/keys/ or the file of your choice
- Click OK.
- Set the password of your choice at the password prompt and confirm the password.
- Click the Stash the password to a file? option.
- Click OK.
- From the iKeyman menu, click Create > New Self-Signed Certificate to create a new self-signed certificate key pair. Specify the following options. Optionally, one can choose to complete all of the remaining fields.
- Key label
- WASplugin
- Version
- X509 V3
- Key size
- 1024
- Common name
- your_host_name
- Organization
- IBM
- Country
- US
- Validity period
- 365
- Click OK.
- Extract the public self-signed certificate key. This key is used later by the embedded HTTP server peer to authenticate connections that originate from the plug-in.
- Click Personal Certificates in the menu and select the WASplugin certificate that you just created.
- Click Extract Certificate. Extract the certificate to a file:
- Data type
- Base64-encoded ASCII data
- Certificate file name
- WASpluginPubCert.arm
- Location
- plugin_install_root/etc/keys or a directory of your choice
- Click OK.
- Close the key database and exit the iKeyman utility when you finish.
- Generate a self-signed certificate for the Web container.
- Launch the JKS-capable iKeyman version that is located the install_root/bin directory.
- Click Key Database File > New from the iKeyman menu.
- Enter the following settings:
- Key database type
- JKS
- File name
- WASWebContainer.jks
- Location
- install_root/profiles/profile/etc/keys or the directory of your choice
- Click OK.
- Set the password of your choice at the password prompt and confirm the password.
- Click Create > New Self-Signed Certificate from the iKeyman menu. The following values are used in this example:
- Key Label
- WASWebContainer
- Version
- X509 V3
- Key size
- 1024
- Common name
- your_host_name
- Organization
- IBM
- Country
- US
- Validity Period
- 365
- Click OK.
- Extract the public self-signed certificate key. This key is used later by the Web server plug-in peer to authenticate connections that originate from the embedded HTTP server in the product.
- Click Personal Certificates from the list. Select the WASWebContainer certificate that you just created. Click Extract Certificate. Extract the certificate to a file:
- Data type
- Base64-encoded ASCII data
- Certificate file name
- WASWebContainerPubCert.arm
- Location
- install_root/profiles/profile/etc/keys
- Click OK.
- Close the database and exit the key management utility.
- Exchange the public certificates.
- Copy the WASpluginPubCert.arm file from the Web server machine to the WAS machine. The source directory in this case is...
plugin_install_root/etc/keys...while the destination is...
install_root/profiles/profile/etc/keys- Copy the WASWebContainerPubCert.arm file from the product machine to the Web server machine. The source directory in this case is...
install_root/profiles/profile/etc/keys...while the destination is...
plugin_install_root/etc/keys
- Import the certificate into the Web server plug-in key file.
- On the Web server machine, launch the iKeyman utility, which supports the CMS key database format.
- From the iKeyman menu, click Key Database File > Open and select the previously created key database file: WASplugin.kdb.
- In the password prompt window, enter the password. Click OK.
- Click Signer Certificates from the list and click Add. This action imports the public certificate previously extracted from the embedded HTTP server (Web container) keystore file.
- Data type
- Base64-encoded ASCII data
- Certificate file name
- WASWebContainerPubCert.arm
- Location
- plugin_install_root/etc/keys
- Click OK. You are prompted for a label name that represents the trusted signer public certificate.
- Enter a label for the certificate: WASWebContainer.
- Close the key database and exit IKeyman when you finish.
- Import the certificate into the Web container keystore file.
- On the WAS machine, launch the JKS-capable iKeyman version, which is located in the install_root/bin directory.
- From the iKeyman menu, click Key Database File > Open. Select the previously created WASWebContainer.jks file.
- In the password prompt window, enter the password. Click OK.
- Click Signer Certificates from the list. Click Add. This action imports the public certificate previously extracted from the embedded HTTP server (Web container) keystore file.
- Data type
- Base64-encoded ASCII data
- Certificate file name
- WASpluginPubCert.arm
- Location
- install_root/profiles/profile/etc/keys
- Click OK. You are prompted for a label name that represents the trusted signer public certificate.
- Enter a label for the certificate: WASplugin.
- Close the key database and exit iKeyman when you finish.
- Modify the Web container to support SSL. To complete the configuration between Web server plug-in and Web container, modify the WAS Web container to use the previously created self-signed certificates.
- Start the WAS administrative console.
- Click Security > SSL.
- Click New JSSE repertoire to create a new entry in the repertoire. Provide the following values to complete the form:
- Alias
- WebContainerSSLSettings
- Security level
- HIGH
- Key file name
- install_root/profiles/profileetc/keys/WASWebContainer.jks
- Key file password
- key_file_password
- Key file format
- JKS
- Trust file name
- install_root/profiles/profileetc/keys/WASWebContainer.jks
- Trust file password
- trust_file_password
- Trust file format
- JKS
- If you want mutual SSL between the two parties, select the Client authentication option.
- Click OK.
- Save the configuration in the administrative console.
- Click Servers > Clusters > cluster_name > Cluster Members > servername.
In an Network Deployment environment, one can also access a cluster by clicking Servers > Clusters >cluster_name.
- Under Container settings, click Web container settings > Web container transport chains.
We can either modify the WCInboundDefaultSecure transport chain or click New and create a new transport chain.
If you are modifying the WCInboundDefaultSecure transport chain, click TCP Inbound Channel (TCP 4). Under related items, click Ports. Click WC defaulthost secure and modify the information in the Host and Port fields. Click OK and then Save.
If you create a new transport chain, use the transport chain wizard, and specify a secure port number. For example, specify 9443. You must add the same port number to the virtual hosts.
- Add a new virtual host entry by clicking Environment > Virtual hosts > default_host.
- Under Additional properties, click Host aliases > New.
- Enter a host name and specify the same port number that you specified for the transport chain. For example, specify 9442 for the port number.
- Click OK.
- Add a host alias for port 443 if it is not already defined.
- Click Save at the top of the panel.
- Modify the Web server plug-in file. In a production environment, add the secure transport definition, port 9443, to the plugin-cfg.xml file. Complete the following steps in the administrative console modify the Web server plug-in file:
- Click Servers > Application servers > servername.
- Under Container settings, click Web container settings > Web container.
- Under Additional settings, click Web container transport chains.
- Verify that the WCInboundDefaultSecure port 443 is enabled. If the WCInboundDefaultSecure port 443 is not enabled, click the WCInboundDefaultSecure transport definition name, select Enabled, and click OK.
- Verify that the proper plugin-key.kdb and plugin-key.sth files exist on the Web server. In subsequent steps, modify the plugin-cfg.xml file that resides on the Web server. You must specify the local path to both the WASplugin.kdb and WASplugin.sth files in the plugin-cfg.xml file.
- Click Servers > Web servers > Web_servername.
- Under Additional properties, click Plug-in properties > Custom properties.
- Click New and add the property information for the keyring location. Enter the following information for the keyring location:
- Name
- KeyringLocation
- Value
- plugin_install_root/etc/keys/WASplugin.kdb
- Click New and add the property information for the stash file location. Enter the following information for the stash file location:
- Name
- StashfileLocation
- Value
- plugin_install_root/etc/keys/WASplugin.sth
- Click Save at the top of the administrative console panel to save all of your changes.
- If you want to access the Web server plug-in from the Web server, click Servers > Web servers > Web_servername, and then click the Generate Plug-in option.
- Restart the application server.
- Test the secure connection. Test the secure connection by accessing a Web application on the WAS using port 9443. For example, https://your_server_address:9443/snoop.
- Import the correct certificate with public and private keys into the browser to test the secured connection, when client-side certification is required.
- Launch the iKeyman utility that supports the CMS key database file, on the Web server machine. The iKeyman utility is also bundled with IBM HTTP Server.
- Open the key file for the plug-in, plugin_install_root/etc/key. Provide the password when prompted.
- Click WASplugin certificate, located under the personal certificates. Click Export.
- Save the certificate in PKCS12 format to a file, for example plugin_install_root/etc/key/WASplugin.p12 . Provide a password to secure the PKCS12 certificate file.
- Close the key file and exit iKeyman.
- Copy the saved WASplugin.p12 file to the client machine from where you access the product server.
- Import the PKCS12 file into your browser. Then, access https://your_server_address:9443/snoop.
- If you selected the Client authentication option in a previous step, the browser asks which personal certificate to use for the connection. Select the certificate, and continue connecting.
- After the browser test with direct product access is successful, test the connection through the Web server using port 9443. For example, https://your_server_address:9443/snoop.
Result
The IBM HTTP Server plug-in and the internal Web server are configured for SSL.
See Also
Secure Sockets Layer
Related Tasks
Manage digital certificates
Creating a Secure Sockets Layer repertoire configuration entry
See Also
Port number settings in WAS versions