3 Interoperability with Oracle Containers for Java EE (OC4J) 10g Security Environments

This chapter describes the most common Oracle Containers for Java EE (OC4J) 10g interoperability scenarios based on the following security requirements: authentication, message protection, and transport.

This chapter includes the following sections:

3.1 Overview of Interoperability with OC4J 10g Security Environments

These sections describe the interoperability scenarios and security environment configuration in OC4J 10g:

3.1.1 OC4J 10g Security Environments

These guides enable you to configure security environment in OC4J 10g:

3.1.2 OWSM 12c Policies for OC4J 10c

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.

These sections provide more information about OWSM predefined policies:

3.1.3 OC4J 10c Interoperability Scenarios

These tables tabulate the interoperability scenarios of Oracle OC4J 10 c.

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

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.


Table 3-1 OWSM 12c Service Policy and Oracle OC4J 10g Client Policy Interoperability

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

Anonymous

1.0

Yes

No

oracle/wss10_message_protection_service_policy

See Table 3–4 , " Configuring the OC4J 10g Client" on page 3‐4

Username

1.0

Yes

No

oracle/wss10_username_token_with_message_protection_service_policy

See Table 3–10, " Configuring the OC4J 10g Client" on page 3‐8

SAML

1.0

Yes

No

oracle/wss10_saml_token_with_message_protection_service_policy

See Table 3–4, " Configuring the OC4J 10g Client" on page 3‐11

Mutual Authentication

1.0

Yes

No

oracle/wss10_x509_token_with_message_protection_service_policy

See Table 3–10, " Configuring the OC4J 10g Client" on page 3‐15

Username over SSL

1.0 and 1.1

No

Yes

oracle/wss_username_token_over_ssl_service_policy

OR

oracle/wss_saml_or_username_token_over_ssl_service_policy

See Table 3–16, " Configuring the OC4J 10g Client" on page 3‐19

SAML over SSL

1.0 and 1.1

No

Yes

oracle/wss_saml_token_over_ssl_service_policy

OR

oracle/wss_saml_or_username_token_over_ssl_service_policy

See Table 3–22, " Configuring the OC4J 10g Client" on page 3‐25



Table 3-2 Oracle OC4J 10g Service Policy and OWSM 12c Client Policy Interoperability

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

Anonymous

1.0

Yes

No

See Table 3–6, " Configuring the OC4J 10g Web Service" on page 3‐5

oracle/wss10_message_protection_client_policy

Username

1.0

Yes

No

See Table 3–12, " Configuring the OC4J 10g Web Service" on page 3‐10

oracle/wss10_username_token_with_message_protection_client_policy

SAML

1.0

Yes

No

See Table 3–6, " Configuring the OC4J 10g Web Service" on page 3‐12

oracle/wss10_saml_token_with_message_protection_client_policy

Mutual Authentication

1.0

Yes

No

See Table 3–12, " Configuring the OC4J 10g Web Service" on page 3‐16

oracle/wss10_x509_token_with_message_protection_client_policy

Username over SSL

1.0 and 1.1

No

Yes

See Table 3–18, " Configuring the OC4J 10g Web Service" on page 3‐20

oracle/wss_username_token_over_ssl_client_policy

SAML over SSL

1.0 and 1.1

No

Yes

See Table 3–24, " Configuring the OC4J 10g Web Service" on page 3‐24

oracle/wss_saml_token_over_ssl_client_policy


3.2 Anonymous Authentication with Message Protection for OC4J 10g Client (WS-Security 1.0)

These sections enable you to implement anonymous authentication with message protection that conforms to the WS-Security 1.0 standard:

3.2.1 Configuring an OWSM 12c Web Service and an OC4J 10g Client (Anonymous Authentication)

These sections describe how to configure an OWSM 12c web service and an OC4J 10g client to implement anonymous authentication with message protection that conforms to the WS-Security 1.0 standard:

3.2.1.1 Configuring OWSM12c Web Service for OC4J 10g Client (Anonymous Authentication)

Follow these steps to configure the OWSM 12c Web Service:

  1. Create a web service application.

  2. Attach the following policy to the entry point of the web service: oracle/wss10_message_protection_service_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3.2.1.2 Configuring OC4J 10g Client(Anonymous Authentication)

Follow these steps to configure the OC4J 10g Client:

  1. Create a client proxy for the web service using Oracle JDeveloper.

    For more information, see "Developing and Securing Web Services" in Developing Applications with Oracle JDeveloper.

  2. Use the Oracle JDeveloper wizard to secure the proxy by right-clicking on the proxy project and selecting Secure Proxy.

  3. Click Authentication in the Proxy Editor navigation bar and set the following options:

    1. Select No Authentication.

  4. Click Inbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Verify Inbound Signed Request Body.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

    4. Select all options under Acceptable Signature Algorithms.

  5. Click Outbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Sign Outbound Messages.

    2. Select Add Timestamp to Outbound Messages and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  6. Click Inbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Decrypt Inbound Message Content.

    2. Select all options under Acceptable Signature Algorithms.

  7. Click Outbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Encrypt Outbound Messages.

    2. Set the Algorithm to AES-128.

  8. Click Keystore Options in the Proxy Editor navigation bar and configure the keystore properties, as required.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Click OK to close the wizard.

  10. In the Structure pane, click <appname>Binding_Stub.xml and edit the file as described in "Editing the <appname>Binding_Stub.xml File".

  11. Invoke the web service method from the client.

3.2.1.3 Editing <appname>Binding_Stub.xml File(Anonymous Authentication)

Follow these steps to edit the <appname>Binding_Stub.xml File:

  1. Provide the keystore password and sign and encryption key passwords.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
    utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify the key transport algorithm, as follows:

    <outbound><encrypt>
    <keytransport-method>RSA-OAEP-MGF1P</keytransport-method>
    ...
    

3.2.2 Configuring an OC4J 10g Web Service and an OWSM 12c Client(Anonymous Authentication)

These sections instruct you to configure an OC4J 10g web service and an OWSM 12c client to implement anonymous authentication with message protection that conforms to the WS-Security 1.0 standard:

3.2.2.1 Configuring OC4J 10g Web Service(Anonymous Authentication)

Follow these steps to configure the OC4J 10g Web Service:

  1. Create and deploy a web service application.

  2. Use Application Server Control to secure the deployed web service.

  3. Click Authentication tab and ensure that no options are selected.

  4. Click Integrity tab of the Inbound Policies page and set the following options:

    1. Select Require Message Body to Be Signed.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  5. Click Integrity tab of the Outbound Policies page and set the following options:

    1. Select Sign Body Element of Message.

    2. Set the Signature Method to RSA-SHA1.

    3. Select Add Timestamp and Creation Time Required in Timestamp.

    4. Enter the Expiration Time (in seconds).

  6. Click Confidentiality tab of the Inbound Policies page and set the following options:

    1. Select Require Encryption of Message Body.

  7. Click Confidentiality tab of the Outbound Policies page and set the following options:

    1. Select Encrypt Body Element of Message.

    2. Set the Encryption Method to AES-128.

    3. Set the public key to encrypt.

  8. Configure the keystore properties and identity certificates.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Edit the wsmgmt.xml deployment descriptor file, as described in Table 3–8, " Editing the wsmgmt.xml File".

3.2.2.2 Configuring OWSM 12c Client for OC4J 10g web service (Anonymous Authentication)

Follow these steps to configure the OWSM 12c Client:

  1. Create a client proxy for the OC4J 10g web service.

  2. Attach the following policy: oracle/wss10_message_protection_client_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  3. Configure the policy.

    For more information, see "oracle/wss10_username_token_with_message_protection_client_policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  4. Invoke the web service method from the client.

3.2.2.3 Editing wsmgmt.xml File for OC4J 10g (Anonymous Authentication)

Follow these steps to edit the wsmgmt.xml File:

  1. Locate the wsmgmt.xml File under ORACLE_HOME/j2ee/oc4j_instance/config.

    Tip:

    The wsmgmt.xml file is an instance-level configuration file, which holds the entire security configuration for the web services deployed in an OC4J instance.

    For more information, see "Understanding the Web Services Management Schema" in Oracle® Application Server Advanced Web Services Developer's Guide

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify the key transport algorithm, as follows:

    <outbound><encrypt>
    <keytransport-method>RSA-OAEP-MGF1P</keytransport-method>
    ...
    

3.3 Username Token with Message Protection for OC4J 10g Client(WS-Security 1.0)

These sections enable you to implement username token with message protection that conforms to the WS-Security 1.0 standard:

3.3.1 Configuring an OWSM 12c Web Service and an OC4J 10g Client (Username Token with Message Protection)

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

3.3.1.1 Configuring OWSM 12c Web Service (Username token with Message Protection)

Follow these steps to configure the OWSM 12c Web Service:

  1. Create an OWSM 12c web service.

  2. Attach the following policy to the web service: oracle/wss10_username_token_with_message_protection_service_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3.3.1.2 Configuring OC4J 10g Client (Username token with Message Protection)

Follow these steps to configure the OC4J 10g Client:

  1. Create a client proxy for the web service (above) using Oracle JDeveloper.

    For more information, see "Developing and Securing Web Services" in Developing Applications with Oracle JDeveloper.

  2. Specify the username and password in the client proxy, as follows:

    port.setUsername(<username>)
    port.setPassword(<password>)
    
  3. Use the Oracle JDeveloper wizard to secure the proxy by right-clicking on the proxy project and selecting Secure Proxy.

  4. Click Authentication in the Proxy Editor navigation bar and set the following options:

    1. Select Use Username to Authenticate.

    2. Deselect Add Nonce and Add Creation Time.

  5. Click Inbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Verify Inbound Signed Request Body.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

    4. Select all options under Acceptable Signature Algorithms.

  6. Click Outbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Sign Outbound Messages.

    2. Select Add Timestamp to Outbound Messages and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  7. Click Inbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Decrypt Inbound Message Content.

    2. Select all options under Acceptable Signature Algorithms.

  8. Click Outbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Encrypt Outbound Messages.

    2. Set the Algorithm to AES-128.

  9. Click Keystore Options in the Proxy Editor navigation bar and configure the keystore properties, as required.

    Tip:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  10. Click OK to close the wizard.

  11. In the Structure pane, click <appname>Binding_Stub.xml and edit the file, as described in "Editing the <appname>Binding_Stub.xml File".

  12. Invoke the web service.

3.3.1.3 Editing <appname>Binding_Stub.xml File (Username token with Message Protection)

Follow these steps to edit the <appname>Binding_Stub.xml File:

  1. Provide the keystore password and sign and encryption key passwords.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp" />
    ...
    
  3. In the outbound signature, specify that the timestamp and UsernameToken should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
    utility-1.0.xsd" local-part="Timestamp"/>
     <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -secext-1.0.xsd" local-part="UsernameToken"/>
    ...
    
  4. In the outbound encryption, specify the key transport algorithm, as follows:

    <outbound><encrypt>
    <keytransport-method>RSA-OAEP-MGF1P</keytransport-method>
    ...
    
  5. In the outbound encryption, specify that the UsernameToken should be encrypted, as follows:

    <outbound>/<encrypt>/<tbe-elements>
    <tbe-element local-part="UsernameToken"
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -secext-1.0.xsd" mode="CONTENT"/>
    ...
    

3.3.2 Configuring an OC4J 10g Web Service and an OWSM 12c Client(Username Token with Message Protection)

These sections enable you to configure an OC4J 10g web service and an OWSM 12c client to implement username token with message protection that conforms to the WS-Security 1.0 standard:

3.3.2.1 Configuring OC4J 10g Web Service (Username Token with Message Protection)

Follow these steps to configure the OC4J 10g Web Service:

  1. Create and deploy a JAX-RPC web service on OC4J.

  2. Use Application Server Control to secure the deployed web service.

  3. Click Authentication tab and set the following options:

    1. Select Use Username/Password Authentication.

    2. Set Password to Plain Text.

  4. Click Integrity tab in Inbound Policies page and set the following options:

    1. Select Require Message Body to Be Signed.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  5. Click Integrity tab in Outbound Policies page and set the following options:

    1. Select Sign Body Element of Message.

    2. Set the Signature Method to RSA-SHA1.

    3. Select Add Timestamp and Creation Time Required in Timestamp.

    4. Enter the Expiration Time (in seconds).

  6. Click Confidentiality tab in the Inbound Policies page and set the following options:

    1. Select Require Encryption of Message Body.

  7. Click Confidentiality tab in the Outbound Policies page and set the following options:

    1. Select Encrypt Body Element of Message.

    2. Set the Encryption Method to AES-128.

    3. Set the public key to encrypt.

  8. Configure the keystore properties and identity certificates.

    Tip:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Edit the wsmgmt.xml deployment descriptor file, as described in Table 3–14, " Editing the wsmgmt.xml File".

3.3.2.2 Configuring OWSM 12c Client for OC4J 10g (Username Token with Message Protection)

Follow these steps to configure the OWSM 12c Client:

  1. Create a client proxy for the OC4J 10g web service.

  2. Attach the following policy: oracle/wss10_username_token_with_message_protection_client_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  3. Configure the policy.

    For more information, see "oracle/wss10_username_token_with_message_protection_client_policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  4. Invoke the web service method from the client.

3.3.2.3 Configuring the wsmgmt.xml File (Username Token with Message Protection)

Follow these steps to edit the wsmgmt.xml File:

  1. Find the wsmgmt.xml file under ORACLE_HOME/j2ee/oc4j_instance/config/.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify that the UsernameToken should be encrypted, as follows:

    <outbound>/<encrypt>/<tbe-elements>
    <tbe-element local-part="UsernameToken"
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -secext-1.0.xsd" mode="CONTENT"/>
    ...
    

3.4 SAML Token (Sender Vouches) with Message Protection for OC4J 10g Client(WS-Security 1.0)

These sections enable you to implement SAML token sender vouches with message protection that conforms to the WS-Security 1.0 standard:

3.4.1 Configuring an OWSM 12c Web Service and an OC4J 10g Client (SAML Token with Message Protection)

These sections enable you to configure an OWSM 12c web service and an OC4J 10g client to implement SAML token sender vouches with message protection that conforms to the WS-Security 1.0 standard:

3.4.1.1 Configuring OWSM 12c Web Service (SAML Token with Message Protection)

Follow these steps to configure the OWSM 12c Web Service:

  1. Create an OWSM 12c web service.

  2. Attach the following policy to the web service: oracle/wss10_saml_token__with_message_protection_service_policy

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3.4.1.2 Configuring OC4J 10g client (SAML Token with Message Protection)

Follow these steps to configure the OC4J 10g client:

  1. Create a client proxy for the web service (above) using Oracle JDeveloper.

    For more information, see Developing and Securing Web Services" in Developing Applications with Oracle JDeveloper.

  2. Use the Oracle JDeveloper wizard to secure the proxy by right-clicking on the proxy project and selecting Secure Proxy.

  3. Click Authentication in the Proxy Editor navigation bar and set the following options:

    1. Select Use SAML Token.

    2. Click SAML Details.

    3. Select Sender Vouches Confirmation and Use Signature.

    4. Enter the username that needs to be propagated as the Default Subject Name.

    5. Enter www.oracle.com as the Default Issuer Name.

  4. Click Inbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Verify Inbound Signed Request Body.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

    4. Select all options under Acceptable Signature Algorithms.

  5. Click Outbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Sign Outbound Messages.

    2. Select Add Timestamp to Outbound Messages and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  6. Click Inbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Decrypt Inbound Message Content.

    2. Select all options under Acceptable Signature Algorithms.

  7. Click Outbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Encrypt Outbound Messages.

    2. Set the Algorithm to AES-128.

  8. Click Keystore Options in the Proxy Editor navigation bar and configure the keystore properties, as required.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Click OK to close the wizard.

  10. In the Structure pane, click <appname>Binding_Stub.xml and edit the file, as described in "Editing the <appname>Binding_Stub.xml File".

  11. Invoke the web service method.

3.4.1.3 Editing <appname>Binding_Stub.xml File (SAML Token with Message Protection)

Follow these steps to edit the <appname>Binding_Stub.xml File:

  1. Provide the keystore password and sign and encryption key passwords.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp" />
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify the key transport algorithm, as follows:

    <outbound><encrypt>
    <keytransport-method>RSA-OAEP-MGF1P</keytransport-method>
    ...
    

3.4.2 Configuring an OC4J 10g Web Service and an OWSM 12c Client(SAML Token with Message Protection)

These sections enable you to configure an OC4J 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:

3.4.2.1 Configuring OC4J 10g Web Service(SAML Token with Message Protection)

Follow these steps to configure the OC4J 10g Web Service:

  1. Create and deploy a JAX-RPC web service on OC4J.

  2. Use the Application Server Control to secure the deployed web service.

  3. Click Authentication in navigation bar and set the following options:

    1. Select Use SAML Authentication.

    2. Select Accept Sender Vouches.

    3. Deselect Verify Signature.

  4. Click Inbound Integrity in the navigation bar and set the following option:

    1. Select Require Message Body To Be Signed.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  5. Click Outbound Integrity in the navigation bar and select the following options:

    1. Select Sign Body Element of Message.

    2. Set the Signature Method to RSA-SHA1.

    3. Select Add Timestamp and Creation Time Required in Timestamp.

    4. Enter the Expiration Time (in seconds).

  6. Click Inbound Confidentiality in the navigation bar and set the following option:

    1. Deselect Require Encryption of Message Body.

  7. Click Outbound Confidentiality in the navigation bar and set the following option:

    1. Select Encrypt Body Element of Message.

    2. Set the Encryption Method to AES-128.

    3. Set the public key to encrypt.

  8. Configure the keystore properties and identity certificates.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Edit the wsmgmt.xml deployment descriptor file, as described in Table 3–20, " Editing the wsmgmt.xml File".

  10. Invoke the web service.

3.4.2.2 Configuring OWSM 12c Client (SAML Token with Message Protection)

Follow these steps to configure the OWSM 12c Client:

  1. Create a client proxy for the OC4J 10g web service.

  2. Attach the following policy: oracle/wss10_saml_token_with_message_protection_client_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  3. Configure the policy.

    For more information, see "oracle/wss10_saml_token_with_message_protection_client_policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  4. Invoke the web service method from the client.

3.4.2.3 Editing wsmgmt.xml File (SAML Token with Message Protection)

Follow these steps to edit the wsmgmt.xml File:

  1. Find the wsmgmt.xml file in ORACLE_HOME/j2ee/oc4j_instance/config.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify that the UsernameToken should be encrypted, as follows:

    <outbound>/<encrypt>/<tbe-elements>
    <tbe-element local-part="UsernameToken"
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -secext-1.0.xsd" mode="CONTENT"/>
    ...
    

3.5 Mutual Authentication with Message Protection for OC4J 10g Client (WS-Security 1.0)

These sections enable you to implement mutual authentication with message protection that conforms to the WS-Security 1.0 standard:

3.5.1 Configuring an OWSM 12c Web Service and an OC4J 10g Client (Mutual Authentication with Message Protection)

These sections enable you to configure an OWSM 12c web service and an OC4J 10g client to implement mutual authentication with message protection that conforms to the WS-Security 1.0 standard:

3.5.1.1 Configuring OWSM 12c Web Service (Mutual Authentication with Message Protection)

Follow these steps to configure the OWSM 12c Web Service:

  1. Create a web service application.

  2. Attach the following policy to the web service: oracle/wss10_x509_token_with_message_protection_service_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3.5.1.2 Configuring OC4J 10g Client (Mutual Authentication with Message Protection)

Follow these steps to configure the OC4J 10g Client:

  1. Create a client proxy for the web service (above) using Oracle JDeveloper.

    For more information, see Developing and Securing Web Services" in Developing Applications with Oracle JDeveloper.

  2. Use the Oracle JDeveloper wizard to secure the proxy by right-clicking on the proxy project and selecting Secure Proxy.

  3. Click Authentication in the Proxy Editor navigation bar and set the following options:

    1. Select Use X509 To Authenticate.

  4. Click Inbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Verify Inbound Signed Request Body.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

    4. Select all options under Acceptable Signature Algorithms.

  5. Click Outbound Integrity in the Proxy Editor navigation bar and set the following options:

    1. Select Sign Outbound Messages.

    2. Select Add Timestamp to Outbound Messages and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  6. Click Inbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Decrypt Inbound Message Content.

    2. Select all options under Acceptable Signature Algorithms.

  7. Click Outbound Confidentiality in the Proxy Editor navigation bar and set the following options:

    1. Select Encrypt Outbound Messages.

    2. Set the Algorithm to AES-128.

  8. Click Keystore Options in the Proxy Editor navigation bar and configure the keystore properties, as required.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Click OK to close the wizard.

  10. In the Structure pane, click <appname>Binding_Stub.xml and edit the file, as describe in "Editing the <appname>Binding_Stub.xml File".

  11. Invoke the web service.

3.5.1.3 Editing <appname>Binding_Stub.xml file (Mutual Authentication with Message Protection)

Follow these steps to edit the <appname>Binding_Stub.xml file:

  1. Provide the keystore password and sign and encryption key passwords.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp" />
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify the key transport algorithm, as follows:

    <outbound><encrypt>
    <keytransport-method>RSA-OAEP-MGF1P</keytransport-method>
    ...
    

3.5.2 Configuring an OC4J 10g Web Service and an OWSM 12c Client (Mutual Authentication with Message Protection)

These section enable you to configure an OC4J 10g web service and an OWSM 12c client to implement mutual authentication with message protection that conforms to the WS-Security 1.0 standard:

3.5.2.1 Configuring OC4J 10g Web Service (Mutual Authentication with Message Protection)

Follow these steps to configure the OC4J 10g Web Service:

  1. Create and deploy a JAX-RPC web service on OC4J.

  2. Use the Application Server Control to secure the deployed web service.

  3. Click Authentication tab and set the following options:

    1. Select Use X509 Certificate Authentication.

  4. Click Integrity tab of the Inbound Policies page and set the following options:

    1. Select Require Message Body to Be Signed.

    2. Select Verify Timestamp and Creation Time Required in Timestamp.

    3. Enter the Expiration Time (in seconds).

  5. Click Integrity tab of the Outbound Policies page and set the following options:

    1. Select Sign Body Element of Message.

    2. Set the Signature Method to RSA-SHA1.

    3. Select Add Timestamp and Creation Time Required in Timestamp.

    4. Enter the Expiration Time (in seconds).

  6. Click Confidentiality tab of the Inbound Policies page and set the following options:

    1. Select Require Encryption of Message Body.

  7. Click Confidentiality tab of the Outbound Policies page and set the following options:

    1. Select Encrypt Body Element of Message.

    2. Set the Encryption Method to AES-128.

    3. Set the public key to encrypt.

  8. Configure the keystore properties and identity certificates.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  9. Edit the wsmgmt.xml deployment descriptor file, as described in Table 3–26, " Editing the wsmgmt.xml File".

3.5.2.2 Configuring OWSM 12c Client (Mutual Authentication with Message Protection)

Follow these steps to configure the OWSM 12c Client:

  1. Create a client proxy to the OC4J 10g web service.

  2. Attach the following policy: oracle/wss10_x509_token_with_message_protection_client_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  3. Configure the policy.

    For more information, see "oracle/wss10_x509_token_with_message_protection_client_policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  4. Invoke the web service.

3.5.2.3 Editing wsmgmt.xml File (Mutual Authentication with Message Protection)

Follow these steps to edit the wsmgmt.xml file:

  1. Find the wsmgmt.xml file under ORACLE_HOME/j2ee/oc4j_instance/config/.

  2. In the inbound signature, specify the following:

    <inbound><verify-signature><tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  3. In the outbound signature, specify that the timestamp should be signed, as follows:

    <outbound>/<signature>/<tbs-elements>
    <tbs-element
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -utility-1.0.xsd" local-part="Timestamp"/>
    ...
    
  4. In the outbound encryption, specify that the UsernameToken should be encrypted, as follows:

    <outbound>/<encrypt>/<tbe-elements>
    <tbe-element local-part="UsernameToken"
    name-space="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
    -secext-1.0.xsd" mode="CONTENT"/>
    ...
    

3.6 Username Token Over SSL for OC4J 10g Client

These interoperability scenarios enable you to implement username token over SSL:

For information about:

3.6.1 Configuring an OWSM 12c Web Service and an OC4J 10g Client (Username Token Over SSL)

These sections enable you to configure an OWSM 12c web service and an OC4J 10g client to implement username token over SSL:

3.6.1.1 Configuring OWSM 12c Web Service for OC4J Client (Username Token Over SSL)

To configure the OWSM 12c Web Service, perform the following steps:

  1. Configure the server for SSL.

    For more information, see "Configuring Transport-Level Security (SSL)" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  2. Attach one of the following policies to the web service:

    oracle/wss_username_token_over_ssl_service_policy

    oracle/wss_username_or_saml_token_over_ssl_service_policy

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3.6.1.2 Configuring OC4J 10g Client (Username Token Over SSL)

Follow these steps to configure the OC4J 10g Client:

  1. Create a client proxy for the web service (above) using Oracle JDeveloper.

    Note:

    Ensure that the web service endpoint references the URL with HTTPS and SSL port configured on Oracle WebLogic Server.

    For more information, see Developing and Securing Web Services" in Developing Applications with Oracle JDeveloper.

  2. Add the following code excerpt to initialize two-way SSL (at the beginning of the client proxy code):

    HostnameVerifier hv = new HostnameVerifier()
    httpsURLConnection.setDefaultHostnameVerifier(hv);
    System.setProperty("javax.net.ssl.trustStore","<trust_store>");
    System.setProperty("javax.net.ssl.trustStorePassword","<trust_store
    _password>");
    System.setProperty("javax.net.ssl.keyStore","<key_store>");
    System.setProperty("javax.net.ssl.keyStorePassword","<key_store_password>");
    System.setProperty("javax.net.ssl.keyStoreType","JKS");
    
  3. Use the Oracle JDeveloper wizard to secure the proxy by right-clicking on the proxy project and selecting Secure Proxy.

  4. Click Authentication in the Proxy Editor navigation bar and set the following options:

    1. Select Use Username to Authenticate.

    2. Deselect Add Nonce and Add Creation Time.

  5. Click Inbound Integrity in the Proxy Editor navigation bar and deselect all options.

  6. Click Outbound Integrity in the Proxy Editor navigation bar and deselect all options.

  7. Click Inbound Confidentiality in the Proxy Editor navigation bar and deselect all options.

  8. Click Outbound Confidentiality in the Proxy Editor navigation bar and deselect all options.

  9. Click Keystore Options in the Proxy Editor navigation bar and configure the keystore properties, as required.

    Note:

    Ensure that you are using keystore with v3 certificates. By default, the JDK 1.5 keytool generates keystores with v1 certificates.

  10. Click OK to close the wizard.

  11. In the Structure pane, click <appname>Binding_Stub.xml and edit the file. as described in "Editing the <appname>Binding_Stub.xml File".

  12. Invoke the web service.

3.6.1.3 Editing <appname>Binding_Stub.xml File (Username Token Over SSL)

Follow these steps to edit the <appname>Binding_Stub.xml file:

  1. Provide the keystore password and sign and encryption key passwords.

  2. In the outbound signature, specify that the timestamp should be signed, as follows (and remove all other tags):

    <outbound>
       <signature>
          <add-timestamp created="true" expiry="<Expiry_Time>"/> 
       </signature>
    ...
    

3.6.2 Configuring an OC4J 10g Web Service and an OWSM 12c Client (Username Token Over SSL)

These sections enable you to configure an OC4J 10g web service and an OWSM 12c client to implement username token over SSL:

3.6.2.1 Configuring OC4J 10g Web Service (Username Token Over SSL)

Follow these steps to configure the OC4J 10g Web Service:

  1. Configure the server for SSL.

    For more information, see http://download.oracle.com/docs/cd/B14099_19/web.1012/b14013/configssl.htm

  2. Use the Application Server Control to secure the deployed web service.

  3. Click Authentication tab and set the following options:

    1. Select Use Username/Password Authentication.

  4. Click Integrity tab of the Inbound Policies page and deselect all options.

  5. Click Integrity tab of the Outbound Policies page and deselect all options.

  6. Click Confidentiality tab of the Inbound Policies page and deselect all options.

  7. Click Confidentiality tab of the Outbound Policies page and deselect all options.

  8. Edit the wsmgmt.xml deployment descriptor file, as described in Table 3–32, " Editing the wsmgmt.xml File".

3.6.2.2 Configuring OWSM 12c Client for OC4J 10g Web Service( (Username Token Over SSL)

To configure the OWSM 12c client, perform the following steps:

  1. Create a client proxy to the OC4J 10g web service using clientgen.

    Note:

    Ensure that the web service endpoint references the URL with HTTPS and SSL port configured on Oracle WebLogic Server.

  2. Add the following code excerpt to initialize two-way SSL (at the beginning of the client proxy code):

    HostnameVerifier hv = new HostnameVerifier()
    httpsURLConnection.setDefaultHostnameVerifier(hv);
    System.setProperty("javax.net.ssl.trustStore","<trust_store>");
    System.setProperty("javax.net.ssl.trustStorePassword","<trust_store
    _password>");
    System.setProperty("javax.net.ssl.keyStore","<key_store>");
    System.setProperty("javax.net.ssl.keyStorePassword","<key_store_password>");
    System.setProperty("javax.net.ssl.keyStoreType","JKS");
    
  3. Attach the following policy: oracle/wss_username_token_over_ssl_client_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  4. Configure the policy.

    For more information, see "oracle/wss_username_token_over_ssl_client_policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  5. Invoke the web service.

3.6.2.3 Editing wsmgmt.xml File (Username Token Over SSL)

Follow these steps to

  1. Find the wsmgmt.xml file under ORACLE_HOME/j2ee/oc4j_instance/config/.

  2. In the outbound signature, specify that the timestamp should be signed, as follows (and remove all other tags):

    <outbound>
       <signature>
          <add-timestamp created="true" expiry="<Expiry_Time>"/> 
       </signature>
    ...
    

3.7 SAML Token (Sender Vouches) Over SSL for OC4J 10g Client(WS-Security 1.0)

These interoperability scenarios enable you to implement SAML token (sender vouches) over SSL that conforms to the WS-Security 1.0 standard:

For information about:

3.7.1 Configuring an OWSM 12c Web Service and an OC4J 10g Client (SAML Token Sender Vouches Over SSL)

These instructions enable you to configure an OWSM 12c web service and an OC4J 10g client to implement SAML token (sender vouches) over SSL that conforms to the WS-Security 1.0 standard:

3.7.1.1 Configuring OWSM 12c Web Service for OC4J 10g Client (SAML Token Sender Vouches Over SSL)

Follow these steps to configure the OWSM 12c Web Service:

  1. Configure the server for two-way SSL.

    For more information, see "Configuring SSL on WebLogic Server (Two-Way)" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

  2. Attach the following policy to the web service:

    oracle/wss_saml_token_over_ssl_service_policy

    oracle/wss_username_or_saml_token_over_ssl_service_policy

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

3.7.1.2 Configuring OC4J 10g Client (SAML Token Sender Vouches Over SSL)

Follow these steps to configure the OC4J 10g client:

  1. Configure the server for two-way SSL.

    For more information, see http://download.oracle.com/docs/cd/B14099_19/web.1012/b14013/configssl.htm

  2. Create a client proxy for the web service (above) using Oracle JDeveloper.

    Note:

    Ensure that the web service endpoint references the URL with HTTPS and SSL port configured on Oracle WebLogic Server.

    For more information, see Developing and Securing Web Services" in Developing Applications with Oracle JDeveloper.

  3. Add the following code excerpt to initialize two-way SSL (at the beginning of the client proxy code):

    HostnameVerifier hv = new HostnameVerifier()
    httpsURLConnection.setDefaultHostnameVerifier(hv);
    System.setProperty("javax.net.ssl.trustStore","<trust_store>");
    System.setProperty("javax.net.ssl.trustStorePassword","<trust_store
    _password>");
    System.setProperty("javax.net.ssl.keyStore","<key_store>");
    System.setProperty("javax.net.ssl.keyStorePassword","<key_store_password>");
    System.setProperty("javax.net.ssl.keyStoreType","JKS");
    
  4. Use the Oracle JDeveloper wizard to secure the proxy by right-clicking on the proxy project and selecting Secure Proxy.

  5. Click Authentication in the Proxy Editor navigation bar and set the following options:

    1. Select Use SAML Token.

    2. Click SAML Details.

    3. Select Sender Vouches Confirmation.

    4. Enter a valid username as the Default Subject Name.

  6. Click Inbound Integrity in the Proxy Editor navigation bar and set the following option:

    1. Deselect Verify Inbound Signed Message Body.

  7. Click Outbound Integrity in the Proxy Editor navigation bar and deselect all options.

  8. Click Inbound Confidentiality in the Proxy Editor navigation bar and set the following option:

    1. Deselect Decrypt Inbound Message Content.

  9. Click Outbound Confidentiality in the Proxy Editor navigation bar and set the following option:

    1. Deselect Encrypt Outbound Message.

  10. Provide required information for the keystore to be used.

  11. Click OK to close the wizard.

  12. In the Structure pane, click <appname>Binding_Stub.xml and edit the file, as described in "Editing the <appname>Binding_Stub.xml File".

  13. Invoke the web service.

3.7.1.3 Editing <appname>Binding_Stub.xml File (SAML Token Sender Vouches Over SSL)

Follow these steps to edit the <appname>Binding_Stub.xml file, perform the following steps:

  1. Provide the keystore password and sign and encryption key passwords.

  2. In the outbound signature, specify that the timestamp should be signed, as follows (and remove all other tags):

    <outbound>
       <signature>
          <add-timestamp created="true" expiry="<Expiry_Time>"/> 
       </signature>
    ...
    

3.7.2 Configuring an OC4J 10g Web Service and an OWSM 12c Client(SAML Token Sender Vouches Over SSL)

These instructions enable you to configure an OC4J 10g web service and an OWSM 12c client to implement SAML token (sender vouches) over SSL that conforms to the WS-Security 1.0 standard:

3.7.2.1 Configuring OC4J 10g Web Service (SAML Token Sender Vouches Over SSL)

Follow these steps to configure the OC4J 10g Web Service:

  1. Configure the server for two-way SSL.

    For more information, see http://download.oracle.com/docs/cd/B14099_19/web.1012/b14013/configssl.htm

  2. Use the Application Server Control to secure the deployed web service.

  3. Click Authentication in navigation bar and set the following options:

    1. Select Use SAML Authentication.

    2. Select Accept Sender Vouches.

    3. Deselect Verify Signature.

  4. Click Integrity tab of the Inbound Policies page and deselect all options.

  5. Click Integrity tab of the Outbound Policies page and deselect all options.

  6. Click Confidentiality tab of the Inbound Policies page and deselect all options.

  7. Click Confidentiality tab of the Outbound Policies page and deselect all options.

  8. Edit the wsmgmt.xml deployment descriptor file, as described in Table 3–38, " Edit the wsmgmt.xml File".

3.7.2.2 Configuring OWSM 12c Client (SAML Token Sender Vouches Over SSL)

Follow these steps to configure the OWSM 12c Client:

  1. Configure the server for two-way SSL.

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

  2. Create a client proxy to the OC4J 10g web service.

    For more information, see Ensure that the web service endpoint references the URL with HTTPS and SSL port configured on Oracle WebLogic Server.

  3. Attach the following policy: oracle/wss_saml_token_over_ssl_client_policy.

    For more information, see "Attaching Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  4. Configure the policy.

    For more information, see "oracle/wss_saml_token_over_ssl_client_policy" in Securing Web Services and Managing Policies with Oracle Web Services Manager

  5. Invoke the web service.

3.7.2.3 Editing wsmgmt.xml File (SAML Token Sender Vouches Over SSL)

Follow these steps to edit the wsmgmt.xml file:

  1. Find the wsmgmt.xml file under ORACLE_HOME/j2ee/oc4j_instance/config/,.

  2. In the outbound signature, specify that the timestamp should be signed, as follows (and remove all other tags):

    <outbound>
       <signature>
          <add-timestamp created="true" expiry="<Expiry_Time>"/> 
       </signature>
    ...