26 Configuring Security for Portlet Producers

Configure WebCenter Portal to handle security for WSRP and JPDK portlet producers.

Permissions: To perform the tasks in this chapter, you must be granted the WebLogic Server Admin role through the Oracle WebLogic Server Administration Console. Users with the Monitor or Operator roles can view security information but cannot make changes.

See also Understanding Administrative Operations, Roles, and Tools.

Topics:

Parent topic: Administering Security

Securing a WSRP Producer

The following sections describe how to secure access to JSR-168 standards-based WSRP portlets from WebCenter Portal:

Deploying the Producer

Before you configure the producer for WS-Security, you must first deploy your standards-compliant portlet producer to an Oracle WebLogic managed server by performing the steps described in Deploying Portlet Producer Applications.

Attaching a Policy to the Producer Endpoint

This section describes how to attach a security policy to a WSRP producer endpoint. The following policies are supported for WSRP producers:

To attach a policy to a producer endpoint

  1. Open Fusion Middleware Control and log into the target domain.

    For information on logging into Fusion Middleware Control, see Starting Enterprise Manager Fusion Middleware Control.

  2. In the Navigation pane, expand the Application Deployments node, and click the producer to attach a policy to.

  3. From the Application Deployment menu, select Web Services.

    The Web Services Summary page for the producer displays.

  4. Open the Web Service Endpoint tab and click the endpoint to which to attach a policy.

    The WSM Policy Subject Configuration page displays ( see Figure 26-1 ).

    Figure 26-1 WSM Policy Subject Configuration

    Attaching policy to a Web Service

    Note: Only the markup service ports should be secured (WSRP_V2_Markup_Service and WSRP_V1_Markup_Service).

    The Web Service Endpoints page for the producer displays.

  5. Open the Policies tab to display the currently attached policies for the producer.

  6. Click Attach/Detach to add or remove a policy.

    The Attach/Detach Policies page is shown listing the available policies and their descriptions.

  7. Under Available Policies, select Category and Security as the policy category to search, and click the Search icon to list the security policies.

  8. Select the policies to attach and click Attach. Use the Ctrl key to select multiple policies.

    The policies appear in the list under Attached Policies.

  9. When finished adding polices to attach to the producer endpoint, click OK.

Setting Up the Keystores

The steps to create and configure keystores for a WSRP producer depend on the topology of your WebCenter Portal environment, and are covered in the following sections:

Refer to these sections for more complete instructions for setting up the keystores, and other WS-Security aspects of configuring WSRP producers.

Securing a PDK-Java Producer

A shared key can be defined for message integrity protection and should be used with SSL. The steps to store a shared key as a password credential are:

Note: Using a shared key provides only message integrity protection. For complete message protection SSL is required. For more information on securing PDK-Java portlets using SSL, see Securing the WebCenter Portal Connection to Portlet Producers with SSL.

Defining a Shared Key as a Password Credential

You can define a shared key as a password credential in the credential store of the administration server instance using either Fusion Middleware Control or WLST commands, as described in the following subsections:

Defining a Shared Key Using Fusion Middleware ControlFusion Middleware Control

To define a shared key using Fusion Middleware Control:

  1. Log into Fusion Middleware Control.

  2. In the Navigation pane, expand the WebLogic Domain node and click the target domain (for example, WC_Domain).

  3. From the WebLogic Domain menu, select Security, then Credentials.

    The Credentials pane displays.

  4. Click Create Map and enter PDK as the Map Name and click OK.

  5. Click Create Key and select the map (PDK) you just created.

  6. Enter a User Name (this value is not used so it could be anything), a Key in the form pdk.*service_id*.sharedKey (where *service_id* is the name of the producer), and a 10 to 20 hexadecimal digit Password and click OK.

    The new key is displayed in the Credential pane.

Defining a Shared Key Using WLST

You can also define a shared key using WLST as described in the following steps:

  1. Start WLST as shown in Running Oracle WebLogic Scripting Tool (WLST) Commands, and connect to the Administration Server instance for the target domain.

  2. Connect to the Administration Server for the target domain with the following command:

    connect('user_name','password, 'host_id:port')
    

    Where:

    • user_name is the name of the user account with which to access the Administration Server (for example, weblogic)

    • password is the password with which to access the Administration Server

    • host_id is the host ID of the Administration Server

    • port is the port number of the Administration Server (for example, 7001).

  3. Add a shared key credential for a producer to the credential store using the WLST createCred command:

    createCred(map='PDK', key='pdk.service_id.sharedKey.user_name', user='user_name', password='password')
    

    Where:

    • service_id is the name of the producer to create the key for (for example, provider1)

    • user_name is the name of the user. This value is not used so it could be anything.

    • password is a 10 to 20 hexadecimal digit value.

    For example:

    createCred(map='PDK', key='pdk.provider1.sharedKey', user='sharedKey', password='1234567890abc')
    

    Note: After creating a credential, you can use the WLST updateCred command with the same parameters as above to update it.

  4. Restart the producer.

    Web producers pick up properties the first time they handle a request (for example, a browser test page request or when they are first registered), so producers should be restarted once a shared key credential has been set up.

Registering an Oracle PDK-Java Producer with a Shared Key

Registering a PDK-Java producer is described in Registering an Oracle PDK-Java Portlet Producer. When you register an Oracle PDK-Java producer with a shared key, you must be sure to also do the following: