12 Custom WS-Policies

This chapter describes how to create, locate, edit, and delete Custom WS-Policy resources using the Oracle Service Bus Administration Console.

Note:

In future releases of Oracle Service Bus, Oracle Web Services Manager policies will replace WLS 9.2 policies. While this version of Oracle Service Bus continues to support WLS 9.2 policies, you should consider using Oracle Web Services Manager policies for new service creation to prepare for the eventual deprecation of WLS 9.2 policy support. For more information, see "Securing Oracle Service Bus with Oracle Web Services Manager" in the Oracle Fusion Middleware Developer's Guide for Oracle Service Bus.

Web Services Policy Framework (WS-Policy) is an extensible XML-based framework that extends the configuration of a Web Service with domain specific security assertions and specifies the security requirements, expectations, and capabilities of the Web Service. In Oracle Service Bus, one of the primary uses of WS-Policy is configuring message-level security in proxy services and business services.

12.1 Using Oracle Service Bus WS-Policies

Oracle Service Bus includes three simple WS-Policy files that you can use to require clients to authorize, digitally encrypt, or digitally sign SOAP messages: Auth.xml, Encrypt.xml, and Sign.xml. Oracle recommends that unless you have specific security needs, you use these pre-packaged files as often as possible.

For more information about using these policies, see "Using WS-Policy in Oracle Service Bus Proxy and Business Services" in the Oracle Fusion Middleware Developer's Guide for Oracle Service Bus.

12.1.1 Using Custom WS-Policies

If the Oracle Service Bus WS-Policy statements do not meet your security needs, you can write your own WS-Policies (custom WS-Policies), import them to Oracle Service Bus, and refer to them from the WSDL. (The Oracle Service Bus WS-Policy statements are read-only.)

12.2 Locating Custom WS-Policies

The Summary of WS-Policies page lists the custom Web Service Policies (WS-Policies) that you have added to the current Oracle Service Bus domain. The Oracle Service Bus Administration Console does not display the Oracle Service Bus WS-Policies, which are pre-packaged and available to all Oracle Service Bus domains.

  1. Do either of the following:

    • Select Project Explorer to display the Projects View Page or the Project/Folder View page. Then navigate through projects and folders to find the WS-Policy.

    • Select Resource Browser > WS-Policies. The Summary of WS-Policies page displays the information shown in Table 12-1. For a more detailed description of the properties, see Section 12.2, "Locating Custom WS-Policies."

  2. To search for a custom WS-Policy, enter part or all of the WS-Policy name in the Name field. You can also enter part or all of the WS-Policy project name and folder in the Path fields. Click Search.

    Click View All to remove the search filters and display all WS-Policies.

Table 12-1 WS-Policy Information

Property Description

WS-Policy Name

The unique name assigned to the WS-Policy. Click the name to see the View WS-Policy Details page. See Section 12.4, "Editing Custom WS-Policies."

Path

The project name and the name of the folder in which the WS-Policy resides. Click on the name to see the project or folder that contains this resource. See Section 4.1.1, "Qualifying Resource Names Using Projects and Folders."

Options

Contains a Delete icon. If a business service or proxy service has been configured to use a WS-Policy, a Deletion Warning icon indicates that you can delete the WS-Policy with a warning confirmation. This might result in conflicts due to unresolved references from the service to the deleted WS-Policy. See Section 12.5, "Deleting Custom WS-Policies."


12.3 Adding Custom WS-Policies

You can either import an XML file that contains your WS-Policy or write the WS-Policy directly in the Oracle Service Bus Administration Console.

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Select Project Explorer, then select a project or folder in which to add the WS-Policy. The Project/Folder View page is displayed.

  3. From the Create Resource list, select WS-Policy from under Interface to display the Create a New WS-Policy page.

  4. In the Resource Name field, enter a unique name for this WS-Policy.

    Follow the Section 2.3, "Resource Naming Restrictions" for naming guidance.

  5. In the Resource Description field, enter a description of this WS-Policy.

  6. In the Policy field, do one of the following:

    • Click Browse to locate and import an XML file that contains your custom WS-Policy.

    • Enter text for the new WS-Policy.

    • Copy and paste text from an existing WS-Policy into this field.

  7. Click Save. The WS-Policy is saved in the current session.

  8. To end the session and deploy the configuration to the run time, click Activate under Change Center.

12.4 Editing Custom WS-Policies

Use the View WS-Policy Details page to view and change details of a specific custom Web Service Policy (WS-Policy). The Oracle Service Bus Administration Console does not display the Oracle Service Bus WS-Policies, which are read-only.

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Locate the WS-Policy, as described in Section 12.2, "Locating Custom WS-Policies."

  3. Click the WS-Policy name. The View WS-Policy Details page displays the information shown in Table 12-2.

    Table 12-2 WS-Policy Details

    Property Description

    Last Modified By

    The user who created this WS-Policy or imported it into the configuration.

    Last Modified On

    The date and time that the user created this WS-Policy or imported it into the configuration. Click the date and time link to view the change history of this resource. See Section 4.23, "View Change History Page."

    References

    The number of objects that this WS-Policy references. If such references exist, click the numeric link to view a list of the objects. See Section 4.22, "Viewing References to Resources."

    Referenced by

    The number of objects that reference this WS-Policy. If such references exist, click the numeric link to view a list of the objects. See Section 4.22, "Viewing References to Resources."

    Description

    A description of this WS-Policy, if one exists.

    Policy

    The text for this WS-Policy.


  4. To make a change to the fields, click Edit. See Section 12.3, "Adding Custom WS-Policies" for descriptions of the fields.

    You cannot change the Resource Name field.

  5. Click Save to commit the updates in the current session.

  6. To end the session and deploy the configuration to the run time, click Activate under Change Center.

12.5 Deleting Custom WS-Policies

If any business service or proxy service is configured to use the WS-Policy, remove the WS-Policy from the business service or proxy service.

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Select Resource Browser > WS-Policies.

  3. Click the Delete icon in the Options field of the WS-Policy you want to delete.

    The WS-Policy is deleted in the current session. If a business service or proxy service has been configured to use a WS-Policy, a Deletion Warning icon indicates that you can delete the WS-Policy with a warning confirmation. This might result in conflicts due to unresolved references from the service to the deleted WS-Policy.

  4. To end the session and deploy the configuration to the run time, click Activate under Change Center.