Configuring the key locator on the server or cell level

The key locator information for the default generator bindings specifies which key locator implementation is used to locate the key that is used for signature and encryption information if these bindings are not defined at the application level. The key locator information for the default consumer bindings specifies which key locator implementation is used to locate the key that is used for signature validation or decryption if these bindings are not defined at the application level. WebSphere® Application Server provides default values for the bindings. However, modify the defaults for a production environment.

Complete the following steps to configure the key locator on the server or cell level:

  1. Access the default bindings for the server level.

    1. Click Servers > Application servers > server_name.

    2. Under Security, click Web services: Default bindings for Web services security.

  2. Under Additional properties, click Key locator. You can configure the key locator configurations for both the default generator and the default consumer in this location.

  3. Click New to create a key locator configuration, click Delete to delete an existing configuration, or click the name of an existing key locator configuration to edit its settings. If you are creating a new configuration, enter a unique name for the key locator configuration in the Key locator name field. For example, you might specify sig_klocator.

  4. Specify a name for the key locator class implementation in the Key locator class name field. The key locators that are associated with Version 6 applications must implement the com.ibm.wsspi.wssecurity.keyinfo.KeyLocator interface. WAS provides the following default key locator class implementations for Version 6 applications:

    com.ibm.wsspi.wssecurity.keyinfo.KeyStoreLeyLocator

    This implementation locates and obtains the key from a specified keystore file.

    com.ibm.wsspi.wssecurity.keyinfo.SignerCertKeyLocator

    This implementation uses the public key from the certificate of the signer. This class implementation is used by the response generator.

    com.ibm.wsspi.wssecurity.keyinfo.X509TokenKeyLocator

    This implementation uses the X.509 security token from the sender message for digital signature validation and encryption. This class implementation is used by the request consumer and the response consumer.

    For example, you might specify the com.ibm.wsspi.wssecurity.keyinfo.KeyStoreLeyLocator implementation if you need the configuration to be the key locator for signing information.

  5. Specify the keystore password, the keystore location, and the keystore type. Keystore files contain public and private keys, root certificate authority (CA) certificates, the intermediate CA certificate, and so on. Keys that are retrieved from the keystore file are used to sign and validate or encrypt and decrypt messages or message parts. If you specified the com.ibm.wsspi.wssecurity.keyinfo.KeyStoreKeyLocator implementation for the key locator class implementation, specify a key store password, location, and type.

    1. Specify a password in the Key store password field. This password is used to access the keystore file.

    2. Specify the location of the keystore file in the Key store path field.

    3. Select a keystore type from the Key store type field. The Java™ Cryptography Extension (JCE) that is used supports the following key store types:

      JKS

      Use this option if you are not using Java Cryptography Extensions (JCE) and if your keystore file uses the Java Keystore (JKS) format.

      JCEKS

      Use this option if you are using Java Cryptography Extensions.

      PKCS11

      Use this format if your keystore file uses the PKCS#11 file format. Keystore files that use this format might contain Rivest Shamir Adleman (RSA) keys on cryptographic hardware or might encrypt keys that use cryptographic hardware to ensure protection.

      PKCS12

      Use this option if your keystore file uses the PKCS#12 file format.

      WAS provides some sample keystore files in the ${USER_INSTALL_ROOT}/etc/ws-security/samples directory. For example, you might use the enc-receiver.jceks keystore file for encryption keys. The password for this file is storepass and the type is JCEKS.

      Attention: Do not use these keystore files in a production environment. These samples are provided for testing purposes only.

  6. Click OK and Save to save the configuration.

  7. Under Additional properties, click Keys.

  8. Click New to create a key configuration, click Delete to delete an existing configuration, or click the name of an existing key configuration to edit the settings. This entry specifies the name of the key object within the keystore file. If you are creating a new configuration, enter a unique name in the Key name field.

    You must use a fully qualified distinguished name for the key name. For example, you might use CN=Bob,O=IBM,C=US.

  9. Specify an alias in the Key alias field. The key alias is used by the key locator to search for key objects in the keystore file.

  10. Specify a password in the Key password field. The password is used to access the key object within the keystore file.

  11. Click OK and then click Save to save the configuration.

You have configured the key locator for the server or cell level.

Configure the key information for the default generator and the default consumer bindings that reference this key locator.