7 Interoperability with Oracle Service Bus 10g Security Environments

This chapter describes interoperability of Oracle Web Services Manager (OWSM) with Oracle Service Bus 10g security environments.

This chapter includes the following sections:

7.1 Overview of Interoperability with Oracle Service Bus 10g Security Environments

In Oracle Service Bus 10g, you attach policies to configure your security environment for inbound and outbound requests. Oracle Service Bus uses the underlying WebLogic security framework as building blocks for its security services. For information about configuring and attaching policies, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html.

Note:

Ensure that you have downloaded and applied the TYBN and U37Z patches released for Oracle Service Bus 10.3 using the patch tool.

With OWSM 12c, you attach policies to web service endpoints. Each policy consists of one or more assertions, defined at the domain-level, that define the security requirements. A set of predefined policies and assertions are provided out-of-the-box.

Table 7-1 and Table 7-2 summarize the most common Oracle Service Bus 10g interoperability scenarios based on the following security requirements: authentication, message protection, and transport.

For more information about:

Note:

In the following scenarios, ensure that you are using a keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

In addition, ensure that the keys use the proper extensions, including DigitalSignature, Non_repudiation, Key_Encipherment, and Data_Encipherment.

Table 7-1 OWSM 12g Service Policy and Oracle Service Bus 10g Client Policy Interoperability

Identity Token WS-Security Version Message Protection Transport Security Service Policy Client Policy

Username

1.0

Yes

No

oracle/wss10_username_token_with_message_protection_service_policy

Encrypt.xml

Sign.xml

SAML

1.0

Yes

No

oracle/wss10_saml_token_with_message_protection_service_policy

Encrypt.xml

Sign.xml

SAML or Username

1.0 and 1.1

No

Yes

oracle/wss_saml_or_username_token_over_ssl_service_policy

Auth.xml

Mutual Authentication

1.0

Yes

No

oracle/wss10_x509_token_with_message_protection_service_policy

Encrypt.xml

Sign.xml


Table 7-2 Oracle Service Bus 10g Service Policy and OWSM 12c Client Policy Interoperability

Identity Token WS-Security Version Message Protection Transport Security Service Policy Client Policy

Username

1.0

Yes

No

Encrypt.xml

Sign.xml

oracle/wss10_username_token_with_message_protection_client_policy

SAML

1.0

Yes

 

Encrypt.xml

Sign.xml

oracle/wss10_saml_token_with_message_protection_client_policy

Mutual Authentication

1.0

Yes

No

Encrypt.xml

Sign.xml

oracle/wss10_x509_token_with_message_protection_client_policy


7.2 Username Token with Message Protection (WS-Security 1.0)

This section describes how to implement username token with message protection that conforms to the WS-Security 1.0 standard, in the following interoperability scenarios:

  • OWSM 12c web service with Oracle Service Bus 10g client

  • Oracle Service Bus 10g web service with OWSM 12c client

For either scenario, you must perform prerequisite tasks for the WebLogic Server on which Oracle Service Bus is running. See Table 7-3, "Configuration Prerequisites for Interoperability"

Instructions for the supported scenarios are:

Table 7-3 Configuration Prerequisites for Interoperability

Task Description More Information

1

Copy the default-keystore.jks and trust.jks files to your domain directory.The default-keystore.jks is used to store public and private keys for SOAP messages within the WebLogic Domain. The trust.jks is used to store private keys, digital certificates, and trusted certificate authority certificates that are used to establish and verify identity and trust in the WebLogic Server environment.

"Configuring Keystores for Message Protection" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

2

Invoke the WebLogic Administration Console.

"Accessing Oracle WebLogic Administration Console" in Administering Web Services

3

Configure the Custom Identity and Custom Trust keystores.

"Configure keystores" in Oracle WebLogic Server Administration Console Online Help

4

Configure SSL.

"Set up SSL" in Oracle WebLogic Server Administration Console Online Help

5

Specify the private key alias, as required. For example: oratest.

--

6

Configure a credential mapping provider.

Create a PKICredentialMapper and configure it as follows (leave all other values set to the defaults):

  • Keystore Provider: N/A

  • Keystore Type: jks

  • Keystore File Name: default_keystore.jks

  • Keystore Pass Phrase: <password>

  • Confirm Keystore Pass Phrase: <password>

"Configure Credential Mapping Providers" in Oracle WebLogic Server Administration Console Online Help

7

Restart Oracle WebLogic Server.

--

9

Invoke the OSB Console. For example:

http://<host name>:<port number>/sbconsole

--

10

Create a ServiceKeyProvider.

--

11

Specify Encryption Key and Digital Signature Key, as required.

You must use different keys on the OWSM and Oracle Service Bus servers. You can use the same key for encryption and signing, if desired.

--


7.2.1 Configuring an OWSM 12c Web Service and an Oracle Service Bus 10g Client

The following instructions tell how to configure an OWSM 12c web service and an Oracle Service Bus 10g client to implement username token with message protection that conforms to the WS-Security 1.0 standard:

Table 7-4 Configuring the OWSM 12c Web Service

Task Description More Information

1

Clone the following policy: wss10_username_token_with_message_protection_service_policy.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

2

Edit the policy settings, as follows:

  1. Set Encryption Key Reference Mechanism to issuerserial.

  2. Set Algorithm Suite to Basic128Rsa15 to match the algorithm suite used for Oracle Service Bus.

  3. Enable the Include Timestamp configuration setting.

  4. Set Is Encrypted to false for the Username token element only.

--

3

Attach the policy to the web service.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager


Table 7-5 Configuring the Oracle Service Bus 10g Client

Task Description More Information

1

Clone the Encrypt.xml and Sign.xml policy files.

For example, copy the files to myEncrypt.xml and mySign.xml. It is not recommended to edit the predefined policy files directly.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

"Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html

2

Edit the encryption algorithm in myEncrypt.xml file to prevent encryption compliance failure, as follows:

<wssp:Target>
   <wssp:EncryptionAlgorithm 
     URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
   <wssp:MessageParts
     Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">
      wsp:Body()
   </wssp:MessageParts>
</wssp:Target>

--

3

Edit the mySign.xml policy file attached to the Oracle Service Bus business service request only to sign the Username token by including the following target:

<wssp:Target>
   <wssp:DigestAlgorithm URI=
    "http://www.w3.org/2000/09/xmldsig#sha1" />
   <wssp:MessageParts Dialect=
    "http://www.bea.com/wls90/security/policy/wsee#part">
      wls:SecurityHeader(wsse:UsernameToken)
   </wssp:MessageParts>
</wssp:Target>

--

4

Edit the mySign.xml policy file attached to the Oracle Service Bus business service response only to specify that the security token is unsigned:

<wssp:Integrity SignToken="false"> 

Also, for SOA clients only, comment out the target for system headers, as shown:

<!-- wssp:Target>
  <wssp:DigestAlgorithm 
   URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts 
   Dialect="http://www.bea.com/wls90/security/policy/wsee#part">
   wls:SystemHeaders()
  </wssp:MessageParts>
</wssp:Target -->

--

5

Invoke the web service method from the client.

--


7.2.2 Configuring an Oracle Service Bus 10g Web Service and an OWSM 12c Client

The following instructions tell how to configure an Oracle Service Bus 10g web service and an OWSM 12c client to implement username token with message protection that conforms to the WS-Security 1.0 standard:

Table 7-6 Configuring the Oracle Service Bus 10g Web Service

Task Description

1

Clone the Encrypt.xml and Sign.xml policy files.

For example, copy the files to myEncrypt.xml and mySign.xml. It is not recommended to edit the predefined policy files directly.

2

Edit the encryption algorithm in the myEncrypt.xml file to prevent encryption compliance failure, as follows:

<wssp:Target>
   <wssp:EncryptionAlgorithm 
     URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
   <wssp:MessageParts
     Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">
      wsp:Body()
   </wssp:MessageParts>
</wssp:Target>

For more information, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html.

3

Edit the mySign.xml policy file attached to the proxy service request only to specify that the security token is unsigned:

<wssp:Integrity SignToken="false"> 

Also, for SOA clients only, comment out the target for system headers, as shown:

<!-- wssp:Target>
  <wssp:DigestAlgorithm 
   URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts 
   Dialect="http://www.bea.com/wls90/security/policy/wsee#part">
   wls:SystemHeaders()
  </wssp:MessageParts>
</wssp:Target -->

4

Create a web service application that invokes the Oracle Service Bus routing service.


Table 7-7 Configuring the OWSM 12c Client

Task Description More Information

1

Clone the following policy: wss10_username_token_with_message_protection_client_policy.

Edit the policy settings, as follows:

  1. Set Encryption Key Reference Mechanism to issuerserial.

  2. Set Recipient Encryption Key Reference Mechanism to issuerserial.

  3. Set Algorithm Suite to Basic128Rsa15 to match the algorithm suite used for Oracle Service Bus.

  4. Disable the Include Timestamp configuration setting.

  5. Set Is Encrypted to false.

  6. Leave the default configuration set for message signing and encryption.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

2

Attach the policy to the web service client.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3

Invoke the web service from the client.

--


7.3 SAML Token (Sender Vouches) with Message Protection (WS-Security 1.0)

This section describes how to implement SAML token (sender vouches) with message protection that conforms to the WS-Security 1.0 standard, in the following interoperability scenarios:

  • OWSM 12c Web Service with Oracle Service Bus 10g Client

  • Oracle Service Bus 10g Web Service with OWSM 12c Client

For either scenario, you must first perform prerequisite tasks for the WebLogic Server on which Oracle Service Bus is running, as described in Table 7-8, "Configuration Prerequisites for Interoperability"

Instructions for the supported scenarios are:

Table 7-8 Configuration Prerequisites for Interoperability

Task Description More Information

1

Copy the default-keystore.jks and trust.jks files to your domain directory.

The default-keystore.jks is used to store public and private keys for SOAP messages within the WebLogic Domain. The trust.jks is used to store private keys, digital certificates, and trusted certificate authority certificates that are used to establish and verify identity and trust in the WebLogic Server environment.

"Configuring Keystores for Message Protection" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

2

Invoke the WebLogic Administration Console.

"Accessing Oracle WebLogic Administration Console" in Administering Web Services

3

Create a SAMLIdentityAsserterV2 authentication provider.

"Configuring Authentication and Identity Assertion providers" in Oracle WebLogic Server Administration Console Online Help

4

Restart WebLogic Server to add the new provider to the Administration Server's Runtime MBean server.

--

5

Select the authentication provider created in step 3.

--

6

Create and configure a SAML asserting party.

Configure the SAML asserting party as follows (leave other values set to the defaults):

  • Profile: WSS/Sender-Vouches

  • Target URL: <OSB Proxy Service Endpoint URI>

  • Issuer URI: www.oracle.com

Select the Enabled checkbox and click Save.

"SAML Identity Asserter V2: Create an Asserting Party" and "SAML Identity Asserter V2: Asserting Party: Configuration" in Oracle WebLogic Server Administration Console Online Help

7

Create a SamlCredentialMapperV2 credential mapping provider.

Select SamlCredentialMapperV2 from the drop-down list and name the credential mapper, for example, UC2_SamlCredentialMapperV2.

"Configure Credential Mapping Providers" in Oracle WebLogic Server Administration Console Online Help

8

Restart WebLogic Server.

--

9

Configure the credential mapper as follows (leave other values set to the defaults):

  • Issuer URI: www.oracle.com

    Note: This value is specified in the policy file.

  • Name Qualifier: oracle.com

--

10

Create and configure a SAML relying party.

Configure the SAML relying party as follows (leave other values set to the defaults):

  • Profile: WSS/Sender-Vouches

  • Target URL: <OWSM 12c Web Service>

  • Description: <your_description>

Select the Enabled checkbox and click Save.

"SAML Credential Mapping Provider V2: Create a Relying Party" and "SAML Credential Mapping Provider V2: Relying Party: Configuration" in Oracle WebLogic Server Administration Console Online Help

11

Restart WebLogic Server.

--


7.3.1 Configuring an OWSM 12c Web Service and an Oracle Service Bus 10g Client

The following instructions tell how to configure an OWSM 12c web service and an Oracle Service Bus 10g client to implement SAML token (sender vouches) with message protection that conforms to the WS-Security 1.0 standard:

Table 7-9 Configuring the OWSM 12c Web Service

Task Description More Information

1

Clone the following policy: oracle/wss10_saml_token_with_message_protection_service_policy.

  1. Set Encryption Key Reference Mechanism to issuerserial.

  2. Set Algorithm Suite to Basic128Rsa15 to match the algorithm suite used for Oracle Service Bus.

  3. Set Is Encrypted to false for the Username token element only.

  4. Leave the default configuration set for message signing and encryption.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

2

Attach the policy to the web service.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager


Table 7-10 Configuring the Oracle Service Bus 10g Client

Task Description

1

Clone the Encrypt.xml and Sign.xml policy files.

For example, to myEncrypt.xml and mySign.xml. It is not recommended to edit the predefined policy files directly.

2

Edit the encryption algorithm in the myEncrypt.xml file to prevent encryption compliance failure, as follows:

<wssp:Target>
   <wssp:EncryptionAlgorithm 
     URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
   <wssp:MessageParts
     Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">
      wsp:Body()
   </wssp:MessageParts>
</wssp:Target>

For more information, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html.

3

Edit the mySign.xml file attached to the Oracle Service Bus business service request only to sign the SAML assertion by including the following target:

<wssp:Target>
   <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
   <wssp:MessageParts Dialect=
    "http://www.bea.com/wls90/security/policy/wsee#part">
      wls:SecurityHeader(wsse:Assertion)
   </wssp:MessageParts>
</wssp:Target>

4

Edit the mySign.xml file attached to the Oracle Service Bus business service response only to specify that the security token is unsigned, as follows:

<wssp:Integrity SignToken="false">

Also, for SOA clients only, comment out the target for system headers, as shown:

<!-- wssp:Target>
  <wssp:DigestAlgorithm 
   URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts 
   Dialect="http://www.bea.com/wls90/security/policy/wsee#part">
   wls:SystemHeaders()
  </wssp:MessageParts>
</wssp:Target -->

5

Use the custom SAML policy file shown in Example 7-1.

6

Invoke the web service from the client.


Example 7-1 Custom SAML Policy

<?xml version="1.0"?>
<wsp:Policy
   xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
   xmlns:wssp="http://www.bea.com/wls90/security/policy"
   xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
   xmlns:wls="http://www.bea.com/wls90/security/policy/wsee#part"
   wsu:Id="custom_saml">
   <wssp:Identity xmlns:wssp="http://www.bea.com/wls90/security/policy">
      <wssp:SupportedTokens>
         <wssp:SecurityToken  
          TokenType=
"http://docs.oasis-open.org/wss/2004/01/oasis-2004-01-saml-token-profile-1.0#SAMLAssertionID">
            <wssp:Claims>
               <wssp:ConfirmationMethod>
                  sender-vouches
               </wssp:ConfirmationMethod>
            </wssp:Claims>
         </wssp:SecurityToken>
      </wssp:SupportedTokens>
   </wssp:Identity>
   </wsp:Policy>

7.3.2 Configuring an Oracle Service Bus 10g Web Service and an OWSM 12c Client

The following instructions tell how to configure an Oracle Service Bus 10g web service and an OWSM 12c client to implement SAML token (sender vouches) with message protection that conforms to the WS-Security 1.0 standard:

Table 7-11 Configuring the Oracle Service Bus 10g Web Service

Task Description

1

Clone the Encrypt.xml and Sign.xml policy files.

For example, to myEncrypt.xml and mySign.xml. It is not recommended to edit the predefined policy files directly.

2

Edit the encryption algorithm in the myEncrypt.xml policy file to prevent encryption compliance failure, as follows:

<wssp:Target>
   <wssp:EncryptionAlgorithm 
     URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
   <wssp:MessageParts
     Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">
      wsp:Body()
   </wssp:MessageParts>
</wssp:Target>

For more information, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html.

3

Edit the mySign.xml policy file attached to the proxy service request only to specify that the security token is unsigned:

<wssp:Integrity SignToken="false"> 

Also, for SOA clients only, comment out the target for system headers, as shown:

<!-- wssp:Target>
  <wssp:DigestAlgorithm 
   URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts 
   Dialect="http://www.bea.com/wls90/security/policy/wsee#part">
   wls:SystemHeaders()
  </wssp:MessageParts>
</wssp:Target -->

4

Use the custom SAML policy file shown in Example 7-1.


Table 7-12 Configuring the OWSM 12c Client

Task Description More Information

1

Clone the following policy: wss10_saml_token_with_message_protection_client_policy.

Edit the policy settings, as follows:

  1. Set Encryption Key Reference Mechanism to issuerserial.

  2. Set Recipient Encryption Key Reference Mechanism to issuerserial.

  3. Set Algorithm Suite to Basic128Rsa15 to match the algorithm suite used for Oracle Service Bus.

  4. Disable the Include Timestamp configuration setting.

  5. Leave the default configuration set for message signing and encryption.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

2

Attach the policy to the web service client.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3

Invoke the web service from the client.

--


7.4 SAML or Username Token Over SSL

This section describes how to implement the SAML or username token over SSL policy, in the following interoperability scenario:

  • Oracle Service Bus 10g client and OWSM 12c web service

Note:

The interoperability scenario described in this section also applies to the SAML Token Over SSL and Username Token Over SSL policies.

For either scenario, you must first perform prerequisite tasks for the WebLogic Server on which Oracle Service Bus is running, as described in the following sections:

Configuration instructions for the supported scenarios are in the following section:

Table 7-13 SAML Prerequisites for Interoperability

Task Description More Information

1

Create a SamlCredentialMapperV2 credential mapping provider.

Select SamlCredentialMapperV2 from the drop-down list and name the credential mapper; for example, UC2_SamlCredentialMapperV2.

"Configure Credential Mapping Providers" in Oracle WebLogic Server Administration Console Online Help

2

Restart WebLogic Server.

--

3

Configure the credential mapper as follows (leave other values set to the defaults):

  • Issuer URI: www.oracle.com

    Note: This value is specified in the policy file.

  • Name Qualifier: oracle.com

--

4

Create and configure a SAML relying party.

Configure the SAML relying party as follows (leave other values set to the defaults):

  • Profile: WSS/Sender-Vouches

  • Target URL: <OWSM 12c Web Service>

  • Description: <your_description>

Select the Enabled checkbox and click Save.

"SAML Credential Mapping Provider V2: Create a Relying Party" and "SAML Credential Mapping Provider V2: Relying Party: Configuration" in Oracle WebLogic Server Administration Console Online Help

5

Restart WebLogic Server.

--


7.4.1 Configuring an OWSM 12c Web Service and an Oracle Service Bus 10g Client

The following instructions tell how to configure an OWSM 12c web service and an Oracle Service Bus 10g client to implement the SAML or username token over SSL policy:

Table 7-14 Configuring the OWSM 12c Web Service

Task Description More Information

1

Configure the server for two-way SSL.

  • If the service policy is Username Token Over SSL, set Two Way Client Cert Behavior to "Client Certs Requested and Not Enforced."

  • If the service policy is SAML Token Over SSL, set Two Way Client Cert Behavior to "Client Certs Requested and Enforced."

"Configuring SSL on WebLogic Server (Two-Way)" in Securing Web Services and Managing Policies with Oracle Web Services Manager

2

Clone the following policy: wss_saml_or_username_token_over_ssl_service_policy.

  • For wss_username_token_over_ssl_service_policy, disable the Create Element and Nonce configuration settings.

  • For wss_saml_token_over_ssl_service_policy, disable the Include Timestamp configuration setting.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3

Use JDeveloper to create a simple SOA composite.

--

4

Attach the copy of the wss_saml_or_username_token_over_ssl_service_policy policy to the composite and deploy it.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager


Table 7-15 Configuring the Oracle Service Bus 10g Client

Task Description More Information

1

Configure the server for two-way SSL:

  • If the client policy is the equivalent of Username Token Over SSL, then set Two Way Client Cert Behavior to "Client Certs Requested and Not Enforced."

  • If the client policy is the equivalent of SAML Token Over SSL, then set Two Way Client Cert Behavior to "Client Certs Requested and Enforced."

"Configuring SSL on WebLogic Server (Two-Way)" in Securing Web Services and Managing Policies with Oracle Web Services Manager

2

In the Oracle Service Bus console, import the WSDL for the relying party. Make sure that there is no policy attached. (Policy assertions are not allowed on this service.)

--

3

For SAML token, create a business service.

  1. Attach the policy shown in Example 7-1, "Custom SAML Policy" to the request.

  2. Change the WSDL from HTTP to HTTPS.

--

4

For username token, create a business service.

  1. Attach the auth.xml policy to the request.

  2. Change the WSDL from HTTP to HTTPS.

--

5

Create a proxy service, and create a route to the business service.

In HTTP Transport Configuration, set Authentication to "basic."

On the Security page, associate the Service key provider. This is needed for Oracle Service Bus to send the client cert to SOA.

--

6

Run the proxy service from the Oracle Service Bus console with the username and password.

--


7.5 Mutual Authentication with Message Protection (WS-Security 1.0)

This section describes how to implement mutual authentication with message protection that conforms to the WS-Security 1.0 standard, in the following interoperability scenarios:

  • OWSM 12c web service with Oracle Service Bus 10g client

  • Oracle Service Bus 10g web service with OWSM 12c client

For either scenario, you must first perform prerequisite tasks, as described in the following:

Configuration instructions for the supported scenarios are in the following sections:

Table 7-16 Configuration Prerequisites for the Oracle WebLogic Server

Task Description More Information

1

Copy the default-keystore.jks and trust.jks files to your domain directory.

The default-keystore.jks is used to store public and private keys for SOAP messages within the WebLogic Domain. The trust.jks is used to store private keys, digital certificates, and trusted certificate authority certificates that are used to establish and verify identity and trust in the Oracle WebLogic Server environment.

"Configuring Keystores for Message Protection" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

2

Invoke the WebLogic Administration Console.

"Accessing Oracle WebLogic Administration Console" in Administering Web Services

3

Configure the Custom Identity and Custom Trust keystores.

"Configure keystores" in Oracle WebLogic Server Administration Console Online Help

4

Configure SSL.

Specify the private key alias, as required. For example: oratest.

"Set up SSL" in Oracle WebLogic Server Administration Console Online Help

5

Configure a credential mapping provider.

"Configure Credential Mapping Providers" in Oracle WebLogic Server Administration Console Online Help

6

Create a PKICredentialMapper and configure it as follows (leave all other values set to the defaults):

  • Keystore Provider: N/A

  • Keystore Type: jks

  • Keystore File Name: default_keystore.jks

  • Keystore Pass Phrase: <password>

  • Confirm Keystore Pass Phrase: <password>

--

7

Select the Authentication tab and configure as follows:

  • Click DefaultIdentityAsserter and add X.509 to Chosen active types

  • Click Provider Specific and configure the following:

    • Default User Name Mapper Attribute Type: CN

    • Active Types: X.509

    • Use Default User Name Mapper: True

"Configure Authentication and Identity Assertion providers" in Oracle WebLogic Server Administration Console Online Help

8

Configure a token handler to specify that a client invoking a message-secured web service uses an X.509 certificate to establish their identity. In WebLogic Administration Console, navigate to the Web Service Security page of the domain and configure the inbound and outbound messages as follows:

Note: Only username token with message protection or mutual authentication with message protection is available at any given time. Once you enable mutual authentication with message protection, username authentication will fail.

  • Click _SERVICE_BUS_INBOUND_WEB_SERVICE_SECURITY_MBEAN_ and select the Token Handler tab.

  • Click X.509 token handler and configure the following:

    • Name: UseX509ForIdentity

    • Value: True

  • Perform the same steps for the outbound Oracle Service Bus MBean: _SERVICE_BUS_OUTBOUND_WEB_SERVICE_SECURITY_MBEAN_

--

9

If the users are not added, add the Common Name (CN) user specified in the certificate.

"Create users" in Oracle WebLogic Server Administration Console Online Help.

10

Restart Oracle WebLogic Server.

--


Table 7-17 Configuration Prerequisites for OWSM

Task Description More Information

1

Configure authentication.

Select the Authentication tab and configure as follows:

  • Click DefaultIdentityAsserter and add X.509 to Chosen active types

  • Click Provider Specific and configure the following:

    • Default User Name Mapper Attribute Type: CN

    • Active Types: X.509

    • Use Default User Name Mapper: True

"Configure Authentication and Identity Assertion providers" in Oracle WebLogic Server Administration Console Online Help

2

If the users are not added, add the Common Name (CN) user specified in the certificate.

"Create users" in Oracle WebLogic Server Administration Console Online Help

3

Restart Oracle WebLogic Server.

--


7.5.1 Configuring an OWSM 12c Web Service and an Oracle Service Bus 10g Client

The following instructions tell how to configure an OWSM 12c web service and Oracle Service Bus 10g client to implement mutual authentication with message protection that conform to the WS-Security 1.0 standard:

Table 7-18 Configuring the OWSM 12c Web Service

Task Description More Information

1

Create and deploy a SOA composite.

 

2

Clone the following policy: wss10_x509_token_with_message_protection_service_policy.

Edit the policy settings, as follows:

  1. Set Encryption Key Reference Mechanism to issuerserial.

  2. Set Algorithm Suite to Basic128Rsa15 to match the algorithm suite used for Oracle Service Bus.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3

Attach the policy to the web service.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager


Table 7-19 Configuring Oracle Service Bus 10g Client

Task Description

1

Create an Oracle Service Bus business service.

2

Clone the Encrypt.xml and Sign.xml policy files.

For example, copy the files to myEncrypt.xml and mySign.xml. It is not recommended to edit the predefined policy files directly.

3

Attach the X.509 policy shown in Example 7-2, to the Oracle Service Bus business service request.

4

Attach the Sign.xml policy file to the Oracle Service Bus business service request.

5

Edit the myEncrypt.xml policy, as shown in Example 7-3, and attach it to the Oracle Service Bus business service request.

For more information, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html.

6

Edit the mySign.xml policy file attached to the Oracle Service Bus business service response to specify that the security token is unsigned:

<wssp:Integrity SignToken="false"> 

Also, for SOA clients only, comment out the target for system headers, as shown in Example 7-4:

7

Attach the myEncrypt.xml policy file from Step 6 to the Oracle Service Bus business service response.

8

Create a ServiceKeyProvider.

9

Specify Encryption Key and Digital Signature Key, as required.

You must use different keys on the OWSM and Oracle Service Bus servers. You can use the same key for encryption and signing, if desired.

10

Create a proxy service, and create a route to the business service.

On the Security page, associate the Service key provider. This is needed for Oracle Service Bus to send the client certificate to SOA.

11

Run the proxy service from the Oracle Service Bus console.


Example 7-2 X.509 Policy

<wsp:Policy
  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
  xmlns:wssp="http://www.bea.com/wls90/security/policy"
  xmlns:s0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  s0:Id="X509Auth">
        <wssp:Identity xmlns:wssp="http://www.bea.com/wls90/security/policy">
            <wssp:SupportedTokens>
                <wssp:SecurityToken TokenType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
            </wssp:SupportedTokens>
        </wssp:Identity>
</wsp:Policy>

Example 7-3 myEncrypt.xml Policy

<?xml version="1.0"?>
<wsp:Policy
 xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
 xmlns:wssp="http://www.bea.com/wls90/security/policy"
 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
 xmlns:wls="http://www.bea.com/wls90/security/policy/wsee#part"
 wsu:Id="X509Encrypt"> 
  <wssp:Confidentiality>
    <wssp:KeyWrappingAlgorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
    <wssp:Target>
      <wssp:EncryptionAlgorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>    
      <wssp:MessageParts Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body()</wssp:MessageParts>
    </wssp:Target>
    <wssp:KeyInfo/>
  </wssp:Confidentiality>
</wsp:Policy>

Example 7-4 mySign Policy

  <?xml version="1.0"?>
<wsp:Policy
  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
  xmlns:wssp="http://www.bea.com/wls90/security/policy"
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
utility-1.0.xsd"
  xmlns:wls="http://www.bea.com/wls90/security/policy/wsee#part"
  wsu:Id="X509Sign">
  <wssp:Integrity SignToken="false">
    <wssp:SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <wssp:CanonicalizationAlgorithm
 URI="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    <!--wssp:Target>
      <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
      <wssp:MessageParts
 Dialect="http://www.bea.com/wls90/security/policy/wsee#part">
        wls:SystemHeaders()
      </wssp:MessageParts>
    </wssp:Target-->
    <wssp:Target>
      <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
      <wssp:MessageParts
 Dialect="http://www.bea.com/wls90/security/policy/wsee#part">
        wls:SecurityHeader(wsu:Timestamp)
      </wssp:MessageParts>
    </wssp:Target>
    <wssp:Target>
      <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
      <wssp:MessageParts
 Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">
      wsp:Body()
      </wssp:MessageParts>
    </wssp:Target>
   </wssp:Integrity>
  <wssp:MessageAge/>
</wsp:Policy>

7.5.2 Configuring an Oracle Service Bus 10g Web Service and an OWSM 12c Client

The following instructions tell how to configure an Oracle Service Bus 10g web service and an OWSM 12c client to implement mutual authentication with message protection that conform to the WS-Security 1.0 standard:

Table 7-20 Configuring the Oracle Service Bus 10g Web Service

Task Description

1

Create a Oracle Service Bus proxy service.

2

Clone the Encrypt.xml and Sign.xml policy files.

For example, to myEncrypt.xml and mySign.xml. It is not recommended to edit the predefined policy files directly.

3

Attach the X.509 policy to the proxy service request. as shown in Example 7-2, "X.509 Policy".

4

Edit the mySign.xml policy file attached to the proxy service request and comment out the target for system headers and timestamp, as shown in Example 7-5, "mySign.xml Policy".

For more information, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in Oracle Service Bus Security Guide at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html.

5

Edit the encryption algorithm in the myEncrypt.xml file attached to the proxy service request as shown in Example 7-6, "myEncrypt.xml".

6

Attach mySign.xml and myEncrypt.xml policy files from the previous steps to the proxy service response.

7

Create a Service Key Provider.


Example 7-5 mySign.xml Policy

<?xml version="1.0"?>
<wsp:Policy
  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
  xmlns:wssp="http://www.bea.com/wls90/security/policy"
  xmlns:s0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  s0:Id="X509SignRequest">
  <wssp:Integrity
 xmlns:wls="http://www.bea.com/wls90/security/policy/wsee#part"
 xmlns:wssp="http://www.bea.com/wls90/security/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
utility-1.0.xsd">
  <wssp:SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  <wssp:CanonicalizationAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
 />
  <!-- wssp:Target>
  <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts Dialect="http://www.bea.com/wls90/security/policy/wsee#part">wls:SystemHeaders
()</wssp:MessageParts>
  </wssp:Target -->
  <!-- wssp:Target>
  <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts
Dialect="http://www.bea.com/wls90/security/policy/wsee#part">wls:SecurityHeader
(wsu:Timestamp)</wssp:MessageParts>
  </wssp:Target -->
  <wssp:Target>
  <wssp:DigestAlgorithm URI="http://www.w3.org/2000/09/xmldsig#sha1" />
  <wssp:MessageParts Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body()</wssp:MessageParts>
  </wssp:Target>
</wsp:Policy>

Example 7-6 myEncrypt.xml

<?xml version="1.0"?>
<wsp:Policy
 xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
 xmlns:wssp="http://www.bea.com/wls90/security/policy"
 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
 xmlns:wls="http://www.bea.com/wls90/security/policy/wsee#part"
 wsu:Id="X509Encrypt"> 
  <wssp:Confidentiality>
    <wssp:KeyWrappingAlgorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
    <wssp:Target>
      <wssp:EncryptionAlgorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>    
      <wssp:MessageParts Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body()</wssp:MessageParts>
    </wssp:Target>
    <wssp:KeyInfo/>
  </wssp:Confidentiality>
 
</wsp:Policy>

Table 7-21 Configuring the OWSM 12c Client

Task Description More Information

1

Clone the following policy: wss10_x509_token_with_message_protection_client_policy.

In Fusion Middleware Control, edit the policy settings, as follows:

  1. Set Encryption Key Reference Mechanism to issuerserial.

  2. Set Recipient Encryption Key Reference Mechanism to issuerserial.

  3. Set Algorithm Suite to Basic128Rsa15 to match the algorithm suite used for Oracle Service Bus.

  4. Disable the Include Timestamp configuration setting.

"Cloning a Web Service Policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

2

In Fusion Middleware Control, specify keystore.recipient.alias in the client configuration. Ensure that the keystore.recipient.alias keys specified for the client exist as trusted certificate entry in the trust store configured for the web service.

--

3

Attach the policy to the web service client.

"Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

4

Invoke the web service from the client.

--