Implementing WSM Policies in OSB

Note that, before Oracle Web Services Manager 11g can be implemented to secure OSB services, certain pre-configuration steps must be done. These steps are:

Note that the following sections assume that this configuration has been successfully completed.

Expanding on the example described in the previous section, Implementing WSM Policies in Composites, we will demonstrate how a WSM username client policy can be attached to the OSB Business Service consuming the PurchaseOrderEBS composite, and subsequently how to secure the OSB Proxy Service fronting the same business service.

Configuring the policy in a Business Service

Sometimes, it is necessary to call the SOA composites from OSB for which WSM security policies have been applied. In these scenarios, it is easy to comply with such policies by attaching the equivalent client policy of the server policy appliedto the target composite. In the following example, we will show how to attach the wss_username_token_client_policy to an OSB Business Service that consumes an SOA composite that has been secured with the wss_saml_or_username_token_service_policy.

Tip

Although it is possible to attach WSM policies using the Eclipse IDE, in this example we will show how policies can be attached at runtime using the OSB console.

  1. Log in to the OSB console using the WebLogic user and URL: http://<osb managed server url>:<osb managed server port>/sbconsole
  2. On the top right-hand side of the screen, under the Change Center section, Create a new session:
    Configuring the policy in a Business Service
  3. Under the Operations menu, click on Resource Browser:
    Configuring the policy in a Business Service
  4. Under the Service section located on the right-hand side of the screen, click on the Business Services link, and then on the central page click for the business service to which the policy will be applied:
    Configuring the policy in a Business Service
  5. Click on the Policies tab. Ensure that the option From OWSM Policy Store under OWSM Policies is selected, and then click on the Add button:
    Configuring the policy in a Business Service
  6. Search for the policy you wish to be attached. In our example, we searched using wildcards (*) for any WSM policy that contained the text username in the policy name. Once a policy has been selected click on Submit:
    Configuring the policy in a Business Service
  7. Ensure that the selected policy appears under the Service Level Policies section. Then click on Update:
    Configuring the policy in a Business Service
  8. Click on the Security tab. In the csf-key field, enter the name of the key used when configuring WSM to work for OSB. Then click on Update:
    Configuring the policy in a Business Service

    Tip

    This section assumes that WSM has been configured to work with OSB. For information on how to do this you may refer to:

    Section 50.2 Setting Up and Using Oracle Web Services Manager with Oracle Service Bus of the Developers Guide for OSB:

    http://docs.oracle.com/cd/E28280_01/dev.1111/e15866/owsm.htm#CHDDEAJG

    Section Configuring Keystores for Message Protection of the OFM Security and Administrator's Guide for Web Services:

    http://docs.oracle.com/cd/E28280_01/web.1111/b32511/setup_config.htm#BAJJHHII

  9. Finally activate all changes made by clicking on the Activate button located on the top right-hand side, under the Change Center section.
    Configuring the policy in a Business Service

The implementation of WSM Client Policies allows OSB Business Service to comply (without any extra coding) with policies implemented in target services. In this example, the WSM Username Client Policy allows the OSB Business Service to invoke an SOA Composite that is secured using the WSM SAML or Username Service Policy. The application of this policy does not require any complex mappings or coding, in order to include the username token into the SOAP header of the message.

Configuring the policy in an OSB Proxy Service

The next step is to implement a second line of defense, by applying a WSM security policy to the OSB Proxy Service. This will add an additional layer of security, therefore ensuring that any calls coming from the DMZ (for example, the API Gateway) are from the trusted parties.

  1. Log in to the OSB console using the WebLogic user and the URL: http://<osb managed server url>:<osb managed server port>/sbconsole.
  2. On the top right-hand side of the screen under the Change Center section, Create a new session.
  3. Under the Operations menu click on Resource Browser.
  4. Under the Service section located on the right-hand side of the screen, click on the Proxy Services link and then on the center page and click on the proxy service to apply the policy to:
    Configuring the policy in an OSB Proxy Service
  5. Click on the Policies tab. Ensure that the option From OWSM Policy Store under OWSM Policies is selected, and then click on the Add button:
    Configuring the policy in an OSB Proxy Service
  6. Search for the policy you wish to be attached. In our example, we searched using wildcards (*) for any WSM policy that contained the text username in the policy name. Once a policy has been selected click on Submit:
    Configuring the policy in an OSB Proxy Service

    Tip

    In this case, we are attaching a service policy instead of a client policy.

  7. Ensure that the selected policy appears under the Service Level Policies section. Then click on Update:
    Configuring the policy in an OSB Proxy Service
  8. Activate all changes made by clicking on the Active button located on the top right-hand side under the Change Center section.
  9. Test the proxy service using SoapUI or a similar tool. The following example shows that, by making an invocation to the proxy service using a non-existent username in the WS-Security username token that OSB responds with a SOAP fault:
    Configuring the policy in an OSB Proxy Service
  10. The next example demonstrates that by sending an existing username, we get a successful SOAP response from OSB:
    Configuring the policy in an OSB Proxy Service

    Tip

    In order for the OSB to send a successful response, the WSM service policies attached to both the Proxy Service as well as the composite endpoint must have resulted in a successful evaluation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset