Web Services - Configure the key locator for the generator binding on the application level

 

+

Search Tips   |   Advanced Search

 

 

Overview

The key locator information for the default generator specifies which key locator implementation is used to locate the key used for signature and encryption information. The key locator information for the generator specifies which key locator implementation is used to locate the key that is used for signature validation or encryption. 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 for the generator binding on the application level:

 

Procedure

  1. Locate the encryption information configuration panel in the administrative console.

    1. Click Applications > Enterprise applications > appname.

    2. Under Related Items, click EJB Modules or Web Modules > URI_name.

    3. Under Additional Properties one can access the key information for the request generator and response generator bindings.

    4. Under Additional properties, click Key locators.

    5. Click New to create a key locator configuration, select the box next to the configuration and 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 in the Key locator name field. For example, you might specify gen_keyloc.

  2. Specify a class name for the key locator class implementation in the Key locator class name field. Key locators associated with v6.0.x applications must implement the com.ibm.wsspi.wssecurity.keyinfo.KeyLocator interface. Specify a class name according to the requirements of the application. For example, if the application requires that the key is read from a keystore file, specify the com.ibm.wsspi.wssecurity.keyinfo.KeyStoreKeyLocator implementation. WebSphere Application Server supports the following default key locator class implementations for v6.0.x applications that are available to use with the request generator or response generator:

    com.ibm.wsspi.wssecurity.keyinfo.KeyStoreKeyLocator

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

    com.ibm.wsspi.wssecurity.keyinfo.SignerCertKeyLocator

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

  3. Specify the keystore password, the keystore location, and the keystore type. Key store files contain public and private keys, root certificate authority (CA) certificates, the intermediate CA certificate, and so on. Keys retrieved from the keystore 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 key store file in the Key store path field.

    3. Select a keystore type from the Type field. The Java Cryptography Extension (JCE) used by IBM 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.

      PKCS11KS (PKCS11)

      Use this format if your keystore uses the PKCS#11 file format. Keystores using this format might contain RSA keys on cryptographic hardware or might encrypt keys that use cryptographic hardware to ensure protection.

      PKCS12KS (PKCS12)

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

      WebSphere Application Server 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. Important: Do not use the sample keystore files in a production environment. These samples are provided for testing purposes only.

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

  5. Under Additional properties, click Keys.

  6. Click New to create a key configuration, select the box next to the configuration and click Delete to delete an existing configuration, or click the name of an existing key configuration to edit its 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. For digital signatures, the key name is used by the request generator or the response generator signing information to determine which key is used to digitally sign the message.

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

    Important: Do not use the sample key files in a production environment. These samples are provided for testing purposes only.

  7. 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.

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

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

 

Result

You have configured the key locator for the generator binding at the application level.

 

What to do next

You must specify a similar key information configuration for the consumer.

 

See also


Key locator collection
Key locator configuration settings
Web services security property collection
Web services security property configuration settings

 

Related Tasks


Configuring the key locator for the consumer binding on the application level