bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

B2B Security

 Previous Next Contents Index View as PDF  

Configuring the Keystore

This topic includes the following sections:

For general information about configuring WebLogic Integration B2B, see Basic Configuration Tasks in Administering B2B Integration.

 


About the Keystore

A keystore is a protected database that holds keys and certificates. If you have keys and certificates and use message encryption, digital signatures, or SSL, we recommend that you use a keystore for storing those keys and certificates and make the keystore available to applications that may need it for authentication or signing purposes, such as a B2B application. To create a keystore and make it available, you need a keystore provider, which has been introduced in the WebLogic Server 7.0 security architecture.

The WebLogic Keystore provider uses the reference Keystore implementation supplied by Sun Microsystems in the Java Development Kit. The WebLogic Keystore provider:

Keystores You Create

When you set up a WebLogic Integration domain for B2B collaborations, you configure the WebLogic Keystore provider to create the following keystores:

Steps for Creating and Configuring Keystores

Complete the following basic steps to create and configure the keystores required for your B2B collaborations:

  1. Create the B2B domain.

  2. Create the keystores and insert the server certificates and keys required by SSL.

  3. Configure the WebLogic Keystore provider.

  4. Add trading partner certificates to the keystore.

  5. Add trusted certificate authority certificates to the CA keystore.

  6. Configure the domain to use the keystores.

This topic also includes a discussion about using keystore files in a multinode cluster.

For background information about keystores, certificates, and keys, see the following:

 


Creating the Domain

We recommend that you use the BEA Configuration Wizard to create the WebLogic Integration B2B domain for which you will be configuring security. To create a WebLogic Integration domain, complete the following steps:

  1. Start the Configuration Wizard as described in Using the Configuration Wizard, available at the following URL:
    http://download.oracle.com/docs/cd/E13196_01/platform/docs70/confgwiz/index.html

  2. Complete the configuration of the WebLogic Integration domain, which can be any of the following:

    Note: Make sure you select a WebLogic Integration template for creating the new domain; do not use a WebLogic Server or a WebLogic Portal template. By using a WebLogic Integration template, you can ensure that the domain created in this step is based on the WebLogic Server 6.x security realm in compatibility mode. The new WebLogic Server 7.0 realm, based on LDAP, is not supported with WebLogic Integration. If you create a new domain by selecting a WebLogic Server template, the new domain uses the new WebLogic Server 7.0 security realm, which is based on LDAP.

  3. After you exit from the Configuration Wizard, bring the following file from the newly created custom domain into a text editor:
    DOMAIN_HOME/config.xml

    In the preceding line, DOMAIN_HOME represents the path for the directory containing the custom domain. For example, the value of DOMAIN_HOME on Windows is:

    c:\bea\user_projects\mydomain

  4. Disable the automatic deployment of the WebLogic Integration application created in the custom domain. To do so, set the Deployed attribute of the WLIapplication element in the config.xml file to false, as in the following example:
<Application Deployed="false" Name="WLIApplication"
Path="<%WLI_HOME%\lib>" TwoPhase="true">

 


Creating the Keystores and Inserting the Server Certificates

This section explains how to create the private keystores for storing the server certificates and keys required to use SSL, and the associated CA keystores for CA certificates. For a description of how to add trading partner certificates to the private keystores, see Adding Trading Partner Certificates to the Keystore.

We strongly recommend that you use SSL for trading partner authentication. If you do so, however, you should also configure SSL for each machine in your B2B domain. When you configure SSL, you need to provide a certificate and private key for the local instance of WebLogic Server. This certificate is known as the server certificate. We recommend that you store the server certificate and private key for the local server in the keystore. This section explains how to add the server certificate and private key to the keystore.

During the trading partner authentication and authorization process, the SSL layer in the relevant WebLogic Server instance uses the keystores for obtaining the following:

For instructions on configuring WebLogic Server to use SSL, see Configuring the SSL Protocol and Mutual Authentication.

Because the WebLogic Integration security service is built on WebLogic Server, only JKS-provider based keystores are currently certified for use with WebLogic Integration. To create the keystores you need for B2B collaborations, you can use either of the following utilities:

To create the keystore required for your WebLogic Integration B2B domain, complete the following steps:

  1. Open a command window.

  2. Go to the root directory of the domain. For example, on Windows:
    c:\> cd bea\user_projects\b2bdomain

  3. Obtain or create the following files:

  4. Use either the keytool or ImportPrivateKey utility to create the private keystore, inserting the server certificate(s) and private key(s).

    Note: The command for creating a keystore is the same as that for inserting a certificate and key. If the keystore does not exist when you insert a certificate and key, it is created when you enter the command.

    The ImportPrivateKey command for creating a private keystore has the following syntax:

java utils.ImportPrivateKey keystoreName keystorepass alias 
keypass certfile
keyfile

Note: When you run the ImportPrivateKey command, make sure that BEA WebLogic Platform is included in your classpath.

The following table describes the arguments available for the ImportPrivateKey utility.


 

Execute the ImportPrivateKey or keytool command for each server certificate and key you want to add to the private keystore.

  1. Create the root CA keystore. The root CA keystore is created at the time you insert the initial CA certificate (just as it is created when you create the private keystore).

    To create the root CA keystore, run the keytool command with the following arguments:

keytool -import -keystore keystoreName -trustcacerts -alias
aliasName -file cert_file -storepass keystorepw -noprompt

The following table describes the arguments available for the keytool utility.


 

  1. Repeat steps 4 and 5 for each machine in the domain, using the same filenames and relative paths.

    Note: To make sure that SSL authentication and authorization work properly, be sure that you use the same filenames and paths for the keystores, certificates, keys, and so on, on each machine.

  2. If you are deploying your B2B domain in a multinode cluster, configure the Node Manager, as explained in Managing Server Availability with Node Manager in Creating and Configuring WebLogic Server Domains, at the following URL:
    http://download.oracle.com/docs/cd/E13222_01/wls/docs70/admin_domain/nodemgr.html

 


Configuring the WebLogic Keystore Provider

To configure the WebLogic Keystore provider with the keystores you created in Creating the Keystores and Inserting the Server Certificates, complete the following steps:

  1. Start WebLogic Server in the newly-created custom domain. For example, on Windows, choose Start—>BEA WebLogic Platform7.0—>UserProjects—>domain—>servername.

  2. Start the WebLogic Server Administration Console, as described in "Starting the WebLogic Server Administration Console" in WebLogic Integration Administration and Design Tools in Starting, Stopping, and Customizing BEA WebLogic Integration.

  3. In the navigation pane on the left, choose Security—>Realms—>CompatibilityRealm—>Providers—>Key Stores.

    Figure 3-1 Choosing Keystores in the Navigation Pane


     

    The WebLogic Server Administration Console displays a window in which you can configure a new default keystore, as shown in the following figure.

    Figure 3-2 Configuring a New Default Keystore


     

  4. Click Configure a new Default Key Store.

    The General tab, in which you can configure the keystore, is displayed as shown in the following figure.

    Figure 3-3 General Tab for Configuring a Default Keystore


     

  5. On the General tab, specify pathnames for the following:

  6. Click Create.

  7. Shut down WebLogic Server and restart it.

 


Adding Trading Partner Certificates to the Keystore

To populate the keystore with trading partner certificates, complete the steps described in this section. For complete details about each trading partner certificate, see Configuring Trading Partner Certificates.

Notes: Even if your keystores are already populated with required certificates and private keys, you still need to perform the following tasks to populate the WebLogic Integration repository with the necessary information.

WebLogic Integration does not validate any of the trading partner certificates against a trusted Certificate Authority as you load them into the keystore.

  1. Enable automatic deployment of the WebLogic Integration application created in the B2B domain by setting the Deployed attribute of the WLI application element in the config.xml file to true, as in the following example:
    <Application Deployed="true" Name="WLI" Path="<%WLI_HOME%\lib>" TwoPhase="true">

  2. Start the B2B Console, as described in "Starting the B2B Console" in WebLogic Integration Administration and Design Tools in Starting, Stopping, and Customizing BEA WebLogic Integration.

This section presents the following procedures for populating the private keystore for B2B collaborations:

Adding the Certificates and Private Keys for a Local Trading Partner

A local trading partner requires the following certificates and private keys:

To add these certificates and private keys to the private keystore, complete the steps described in this section.

Note: Do not configure a server certificate for a local trading partner. Although the encryption and signature certificates are optional, the client certificate is required if you are using SSL with mutual authentication. For complete details about local trading partner certificates, see Configuring Trading Partner Certificates. For information about using server-side, or one-way authentication, which does not require the use of a client certificate, see Configuring Server-Side Authentication.

  1. In the navigation pane on the left, choose B2B—>Trading Partners.

  2. Click the name of the local trading partner for whom you are adding certificates. The General configuration tab is displayed.

    Figure 3-4 General Configuration Page for a Local Trading Partner


     

  3. Select the Certificates tab. The Certificates configuration page is displayed.

    Figure 3-5 Certificates Configuration Page for a Local Trading Partner


     

  4. Click Create a Certificate Entry. The console displays a page on which you can specify details about the certificate you are adding for your local trading partner.

    Figure 3-6 Creating a Certificate Entry for a Local Trading Partner


     

  5. For each trading partner certificate, enter the following information:

    Note: When importing a plain-text (or unprotected) private key using the B2B Console, specify the password of the private keystore in the field labeled Private Key Password.

  6. Click Add to add the certificate and private key to the WebLogic Integration repository.

  7. Select the Save Certificate to Keystore check box to add the certificate and private key to the private keystore.

Adding the Certificates for a Remote Trading Partner

A remote trading partner has the following certificates:

Note: Do not specify private keys for remote trading partner certificates. Although the encryption and signature certificates are optional, the client and server certificates are required for using mutual authentication with SSL. For complete details about remote trading partner certificates, see Configuring Trading Partner Certificates. For information about using server-side, or one-way authentication, which does not require the use of a client certificate, see Configuring Server-Side Authentication.

To add these certificates to the private keystore, complete the following steps:

  1. Start the B2B Console, if necessary.

  2. In the navigation pane on the left, choose B2B—>Trading Partners.

  3. Click the name of the remote trading partner for whom you are adding certificates. The General configuration tab is displayed.

  4. Select the Certificates tab. The Certificates configuration page is displayed.

  5. Click the Create a Certificate Entry link. The console displays a page on which you can specify details about the certificate you are adding for your remote trading partner.

    Figure 3-7 Creating a Certificate Entry for a Remote Trading Partner


     

  6. Enter the name, location, and type of each certificate you are adding for the remote trading partner.

  7. Click Add to add the certificate to the WebLogic Integration repository.

  8. Select the check box labeled Save Certificate to Keystore to add the certificate to the private keystore.

Bulk Loading and Importing Certificates into the Keystore

When you use the Bulk Loader utility (from either the B2B Console or the command line) to configure certificates in the WebLogic Integration repository, trading partner certificates are not imported into the keystore. However, the repository contains configuration information about the certificates so that it can import the certificates into the keystore during startup of the B2B engine.

Before the B2B engine can import trading partner certificates into the keystore, you must have automatic migration enabled in the startWeblogic script. To enable automatic migration, complete the following steps:

  1. Shut down the WebLogic Server instance in the B2B domain created in Creating the Domain. You can do so by executing the stopWeblogic script, which is located in the B2B domain's root directory. For example:

    In the preceding examples, DOMAIN_HOME is the root directory of the B2B domain.

  2. Add the Java system property wli.keystore.automigrate to the Java command line in the startWeblogic script, and set the property value to true, as shown in the following listing. The wli.keystore.automigrate property is shown in bold.
%JAVA_HOME%\bin\java %DB_JVMARGS% -Xmx256m -classpath %WLISERVERCP%
-Dbea.home=%BEA_HOME% -Dwli.bpm.server.evaluator.supportsNull=false
-Dweblogic.Domain=mydomain -Dweblogic.Name=myserver
-Dweblogic.management.username= -Dweblogic.management.password=
-Dweblogic.ProductionModeEnabled=true -Dweblogic.management.discover=false
-Djava.security.policy==%WL_HOME%\lib\weblogic.policy weblogic.Server
-Dwli.keystore.automigrate=true

  1. Save your changes.

When WebLogic Server is restarted in the domain, the certificates and keys are imported.

Removing Certificates and Private Keys from the Keystore

When you remove a certificate, and, if applicable, a private key, using the B2B Console, references to that certificate and private key are removed from the WebLogic Integration repository. You can also remove the certificates and their associated keys from the private keystore at the same time.

To remove a certificate, complete the following steps:

  1. Start the B2B Console, if necessary.

  2. In the navigation pane on the left, choose B2B—>Trading Partners.

  3. Click the name of the trading partner for whom you are removing a certificate and private key. The General configuration tab is displayed.

  4. Select the Certificates tab. The Certificates configuration page is displayed.

    Figure 3-8 Removing a Certificate from the Keystore


     

  5. Choose the type of certificate you want to remove.

  6. Select the alias for the certificate in the list box.

  7. Click Remove to remove the certificate and, if applicable, private key, from the WebLogic Integration repository.

  8. To remove the certificate and private key from the keystore, as well as from the repository, make sure the box labeled Remove Certificate from Keystore is checked, and click Remove.

 


Configuring the Domain to Use the Keystore

To configure your B2B domain to use the keystores you have created, you need to modify the startWeblogic script that resides in the root directory for your domain. To modify this script, complete the following steps:

  1. Go to the root directory for the domain, as shown in the following examples.

    In the preceding pathnames, domain represents the name of your B2B domain.

  2. In a text editor, open the startWebLogic.cmd script (for Windows) or the startWebLogic.sh script (for UNIX).

  3. Locate the line on which the java command is issued to start WebLogic Server, as shown in the following example.
%JAVA_HOME%\bin\java %DB_JVMARGS% -Xmx256m -classpath %WLISERVERCP%
-Dbea.home=%BEA_HOME% -Dwli.bpm.server.evaluator.supportsNull=false
-Dweblogic.Domain=mydomain -Dweblogic.Name=myserver
-Dweblogic.management.username= -Dweblogic.management.password=
-Dweblogic.ProductionModeEnabled=true -Dweblogic.management.discover=false
-Djava.security.policy==%WL_HOME%\lib\weblogic.policy weblogic.Server

  1. To this java command, add the system property that specifies the private key passwords for the signature and message encryption certificates, using the following syntax:
    -DKey.certificate-name.password=key_password * 

    In the preceding syntax:

  2. Also to this java command, add the system properties that specify the passwords for the private keystore and the root CA keystore, using the following syntax:
    -Dwli.privateKeystore.password=keystore_pass
    -Dwli.caKeystore.password=caKeystore_pass

    In the preceding syntax:

Note: We recommend that you set passwords in environment variables, rather than hard-coding the passwords into scripts such as startWeblogic. When environment variables are used, scripts can obtain the values for passwords from the environments in which the scripts run.

 


Using the Keystore in a Multinode Cluster

If you are deploying your B2B domain on a multinode cluster, you need to do the following:

  1. Replicate the private and root CA keystores on each machine in the cluster. These keystores must be in the same relative location on every machine.

  2. Make sure that the server certificate is stored in the same relative location on every machine. To meet the requirements of SSL support, the server certificate location must be identified in the domain's config.xml file.

  3. Configure the private and root CA keystores with the WebLogic Keystore provider on the administration server, as described in Configuring the WebLogic Keystore Provider.

  4. Make sure that the server certificate is configured on the administration server, as described in Configuring the SSL Protocol and Mutual Authentication.

As each managed server in the domain is started, with the help of the administration server, the WebLogic Keystore provider configuration is automatically propagated to it.

For more information about managing B2B security in a multinode cluster, see Deploying BEA WebLogic Integration Solutions.

 

Back to Top Previous Next