Keystore configurations

Use keystore configurations to define how the runtime for WebSphere Application Server loads and manages keystore types for Secure Sockets Layer (SSL) configurations.

By default, the java.security.Security.getAlgorithms("KeyStore") attribute does not display a predefined list of keystore types in the administrative console. Instead, WebSphere Application Server retrieves all of the KeyStore types that can be referenced by the java.security.KeyStore object, including hardware cryptographic, z/OS platform, i5/OS platform, IBM Java Cryptography Extension (IBMJCE), and Java-based content management system (CMS)-provider keystores. If you specify a keystore provider in the java.security file or add it to the provider list programmatically, WebSphere Application Sever also retrieves custom keystores. The retrieval list depends upon the java.security configuration for that platform and process.

IBMJCE file-based keystores (JCEKS, JKS, and PKCS12)

A typical IBMJCE file-based keystore configuration is shown in the following sample code:
<keyStores xmi:id="KeyStore_1" name="NodeDefaultKeyStore" 
password="{xor}349dkckdd=" provider="IBMJCE"
location="${USER_INSTALL_ROOT}/config/cells/myhostNode01Cell
/nodes/myhostNode01/key.p12" type="PKCS12" fileBased="true" 
hostList="" initializeAtStartup="true" readOnly="false" 
managementScope="ManagementScope_1"/>
For more information about default keystore configurations, see Default self-signed certificate configuration.
Table 1 describes the attributes that are used in the sample code.
Table 1. keystore configurations
Attribute name Default Description
xmi:id Varies A value that issued to reference the keystore from another area in the configuration, for example, from an SSL configuration. Make this value unique within the security.xml file.
name For JSSE keystore: CellDefaultKeyStore. For JSSE truststore: CellDefaultTrustStore. A name that is used to identify the keystore by sight. The name can determine if the keystore is a default keystore based upon whether the name ends with DefaultKeyStore or DefaultTrustStore.
password The default keystore password is WebAS. It is recommended that this be changed as soon as possible. See Updating default key store passwords using scripting for more information. The password that is used to access the keystore name is also the default that is used to store keys within the keystore.
provider The default provider is IBMJCE. The Java provider that implements the type attribute (for example, PKCS12 type). The provider can be left unspecified and the first provider that implements the keystore type specified is used.
location The default varies, but typically references a key.p12 file or a trust.p12 file in the node or cell directories of the configuration repository. These files are PKCS12 type keystores. The keystore location reference. If the keystore is file-based, the location can reference any path in the file system of the node where the keystore is located. However, if the location is outside of the configuration repository, and you want to manage the keystore remotely from the administrative console or from the wsadamin utility, then specify the hostList attribute that contains the host name of the node where it resides.
type The default Java crypto device keystore type is PKCS12. This type specifies the keystore. Valid types can be those returned by the java.security.Security.getAlgorithms("KeyStore") attribute. These types include the following keystore types, and availability depends on the process and platform java.security configuration:
  • JKS
  • JCEKS
  • PKCS12
  • PKCS11 (Java crypto device)
  • CMSKS
  • IBMi5OSKeyStore
  • JCERACFKS
  • JCECCAKS keystores (replacing JCE4758KS) - (z/OS crypto device)
fileBased The default is true. This option is required for default keystores. It indicates a file-system keystore so you can use a FileInputStream or FileOutputStream for loading and storing the keystore.
hostList The hostList attribute is used to specify a remote hostname so that the keystore can be remotely managed. There are no remotely managed keystores by default. All default keystores are managed locally in the configuration repository and synchronized out to each of the nodes. The option manages a keystore remotely. You can set the host name of a valid node for a keystore. When you use either the administrative console or the wsadmin utility to manage certificates for this keystore, an MBean call is made to the node where the keystore exists for the approved operation. You can specify multiple hosts, although synchronization of the keystore operations are not guaranteed. For example, one of the hosts that is listed might be down when a specific operation is performed. Therefore, use multiple hosts in this list.
initializeAtStartup The default is true. This option informs the runtime to initialize the keystore during startup. This option can be important for hardware cryptographic device acceleration.
readOnly The default is false. This option informs the configuration that you cannot write to this keystore. That is, certain update operations on the keystore cannot be attempted and are not allowed. An example of a read-only keystore type is JCERACFKS on the z/OS platform. This type is read-only from the WebSphere certificate management standpoint, but you can also update it using the keystore management facility for RACF.
managementScope The default scope is the node scope for a base Application Server environment and the cell scope for a Network Deployment environment. This option references a particular management scope in which you can see this keystore. For example, if a hardware cryptographic device is physically located on a specific node, then create the keystore from a link to that node in the topology view under Security > Security Communications > SSL configurations. You can also use management scope to isolate a keystore reference. In some cases, you might need to allow only a specific application server to reference the keystore; the management scope is for that specific server.

z/OS keystores [z/OS]

WebSphere Application Server supports IBMJCE file-based keystores, Java Cryptography Extension Key Stores (JCEKS), Java Key Stores (JKS), and Public Key Cryptography Standards 12 (PKCS12), and z/OS-specific RACF (JCERACFKS) keystores. The IBMJCE file-based keystore support on z/OS is fully compatible with and similar to the support on the distributed platform. The JCERACFKS keystore uses keys and certificates that are stored and managed in RACF.

The IBMJCECCA provider extends and replaces the IBMJCE4758 provider from earlier releases. At this time, the IBMJCECCA provider and the IBMJCE4758 provider are functionally equivalent. The IBMJCECCA provider supports four keystores: JCECCAKS (JCE4758KS) and JCECCARACFKS (JCE4758RACFKS). The JCECCAKS keystore uses keys that are stored in the z/OS hardware and managed by ICSF. The JCECCARACFKS keystore handles certificates managed and stored in RACF keyrings, and the keys are stored in the z/OS hardware. The JCE4758KS and JCE4758RACFKS keystores are included for downward compatibility and are deprecated. The JCECCAKS keystore extends and replaces the JCE4758KS keystore. The JCECCARACFKS keystore extends and replaces the JCE4758RACFKS keystore.

The z/OS platform offers these keystores types that can be used for WebSphere Application Server on z/OS:
  • JCECCAKS keystores (replacing JCE4758KS) use keys that are stored in the z/OS hardware and keys that are managed in ICSF.
  • JCERACFKS keystores are a Resource Access Control Facility (RACF)-based keystores that are used to support keys and certificates that are contained in a RACF keystore. Key material stored in ICSF is not supported with this keystore type.
  • JCECCARACFKS (extending and replacing JCE4758RACFKS) keystores are RACF-based keystores that are used to support certificates that are contained in a RACF keystore along with keys stored in z/OS hardware. The ICSF option with RACF RACDCERT must be specified.
Note: The keystore type, JCERACFKS for the IBMJCE provider and JCECCARACFKS for the IBMJCECCA provider, are only available on the z/OS platform where SAF is available.
Note: In WebSphere Application Server, you can use the administrative console to extract a personal certificate into HFS as a Base64-encoded ASCII data type or as a Binary DER data type. However, if the keystore type of the SSL configuration is JCERACFKS , a 0 bytes file is created in HFS.

An IBMJCE provider can only support the JCERACFKS keystore in the set of z/OS-specific keystores that are listed previously. The IBMJCE provider cannot use the JCECCAKS or JCECCARACFKS keystore material since it is specific to the hardware.

An IBMJCECCA provider can support software key materials for the JCERACFKS, JKS, and JCEKS keystores, and take advantage of the hardware acceleration.

A new keystore class, JceRACFKeyStore, has been added to the IBMJCE and IBMJCECCA providers. Use this class when you retrieve certificates and keys from a keyring because this keystore allows WebSphere Application Server to read from a keyring. However, if the server attempts to write data to the keyring, an IOException is thrown. While the RACFInputStream works with any keystore, it is possible that data stored in RACF could be inadvertently written to an Hierarchical File System (HFS) file if the server uses a keystore other than the JceRACFKeyStore class.

RACFInputStream can access keys and certificates that are stored in a Service Authorization Facility (SAF) keyring implementation using either of the following methods:
  • Use RACFInputStream directly to pass in a newly-created instance to the JceRACFKeyStore class
  • Use URLStreamHandler to call RACFInputStream, then pass the instance to the JceRACFKeyStore class
For more information, see RACF keyring setup.

All JAVA RACF services, including the JceRACFKeyStore and RACFInputStream, use the R_datalib (IRRSDL00) service to retrieve certificates from RACF. However, to use this service, you must obtain authorization for R_datalib before you use any JAVA RACF classes. For more information on how to setup the necessary authorizations, see OS/390 Security Server Callable Services guide.

CMS keystores

You can set some provider-specific attributes in CMS keystores.

[z/OS] [AIX HP-UX Linux Solaris Windows] If the CMSKS provider supports the createStashFileForCMS attribute, and you set the attribute to true for CMSKS keystores, WebSphere Application Server creates an .sth file in the keystore location that is referenced by the attribute. The .sth extension is appended to the keystore name. For example, if the CMSKS keystore is available for a plug-in configuration and you set createStashFileForCMS to true, the stash file that is represented in the following sample code is created in the ${USER_INSTALL_ROOT}\profiles\AppSrv01/config/cells/myhostCell01/nodes/myhostNode01/servers/webserver1/plugin-key.sth path.
<keyStores xmi:id="KeyStore_1132071489571" name="CMSKeyStore" 
password="{xor}HRYNFAtrbxEwOzpvbhw6MzM=" provider="IBMCMSProvider" 
location="${USER_INSTALL_ROOT}\profiles\AppSrv01/config/cells/myhostCell01
/nodes/myhostNode01/servers/webserver1/plugin-key.kdb" type="CMSKS"
fileBased="true" createStashFileForCMS="true"
managementScope="ManagementScope_1132071489569"/>
When you create a CMS keystore, the CMS provider is IBMi5OSJSSEProvider, and the CMS type is IBMi5OSKeyStore, as shown in the following sample code:
<keyStores xmi:id="KeyStore_1132071489571" name="CMSKeyStore" 
password="{xor}HRYNFAtrbxEwOzpvbhw6MzM=" provider="IBMi5OSJSSEProvider" 
location="${USER_INSTALL_ROOT}\profiles\AppSrv01/config/cells/myhostCell01
/nodes/myhostNode01/servers/webserver1/plugin-key.kdb" type="IBMi5OSKeyStore"
fileBased="true" createStashFileForCMS="true" 
managementScope="ManagementScope_1132071489569"/>
[iSeries] Note: The i5/OS keystore type IBMi5OSKeyStore does not recognize or generate .sth password stash files. Instead it keeps an internal record of the password for the .kdb keystore file where it is created. If the .kdb file is moved, the password is no longer associated with the keystore. In that case, the Digital Certificate Manager (DCM) must be used to recreate the internal record of the password for the .kdb key store file. For more information, see Recreating the .kdb keystore internal password record.

Hardware cryptographic keystores

For cryptographic device configuration, see Key management for cryptographic uses and Configuring a hardware cryptographic keystore.

You can add a slot either as the custom property, com.ibm.ssl.keyStoreSlot, or as the configuration attribute, slot="0". The custom property is read before the attribute for backwards compatibility.

In certain environments, you can use the hardware cryptographic card for hardware acceleration. Either set the useForAcceleration attribute to true or set the com.ibm.ssl.keyStoreUseForAcceleration custom property. When you set the attribute to true, you are not required to configure a password. However, you cannot use the device to store keys. For more information on configuring a hardware cryptographic keystore, see Configuring hardware cryptographic keystore configurations.




Related concepts
Secure communications using Secure Sockets Layer
Related tasks
[iSeries] Recreating the .kdb keystore internal password record
Concept topic    

Terms of Use | Feedback

Last updated: Feb 19, 2011 5:25:36 AM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v610web&product=was-nd-mp&topic=csec_sslkeystoreconfs
File name: csec_sslkeystoreconfs.html