27 Configuring the Policy and Credential Store

This chapter describes how to configure the policy and credential store to use an external LDAP server such as Oracle Internet Directory (OID).

When WebCenter Portal is first installed, the policy and credential store is configured to use a database. For production environments, your policy and credential store must be configured to use the default database or an external LDAP (either Oracle Internet Directory 11gR1 or 10.1.4.3). You should not attempt to use a file-based LDAP for HA or production environments.

Reassociating the policy and credential store with OID consists of creating a root node in the LDAP directory, and then reassociating the policy and credential store with the OID server using Fusion Middleware Control, or from the command line using WLST. Note that if you reassociate the policy and credential store to use an external LDAP-based store, the credential store and policy store must be configured to use the same LDAP server. The identity store can, however, use any of the other supported LDAP servers; it does not need to use the same LDAP server as the policy and credential stores. For troubleshooting information, see Reassociation Failure in Securing Applications with Oracle Platform Security Services.

Caution:

Before reassociating the policy store, be sure to back up the relevant configuration files:

  • jps-config.xml

  • system-jazn-data.xml

As a precaution, you should also back up the boot.properties file for the Administration Server for the domain.

This chapter includes the following topics:

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.

27.1 Creating a root Node

The first step in reassociating the policy and credential store with OID, is to create an LDIF file in the LDAP directory and add a root node under which all data is added. To create the root node, follow the steps in Prerequisites to Using an LDAP-Based Security Store in Securing Applications with Oracle Platform Security Services. After creating the file and adding the node, continue by reassociating the store using either Fusion Middleware Control or WLST.

27.2 Reassociating the Credential and Policy Store Using Fusion Middleware Control

Before reassociating the policy and credential store with Oracle Internet Directory, you must first have created the root node as described in Prerequisites to Using an LDAP-Based Security Store in Securing Applications with Oracle Platform Security Services. After creating the root node, follow the steps in Reassociating with Fusion Middleware Control in Securing Applications with Oracle Platform Security Services. If the reassociation fails, see Reassociation Failure in Securing Applications with Oracle Platform Security Services.

27.3 Reassociating the Credential and Policy Store Using WLST

Before reassociating the policy and credential store with Oracle Internet Directory, you must first have created the root node as described in Prerequisites to Using the LDAP Policy Store in Securing Applications with Oracle Platform Security Services. If the reassociation fails, see Reassociation Failure in Securing Applications with Oracle Platform Security Services.

To reassociate the Credential and Policy Store using WLST:

  1. Start WLST as described in Running Oracle WebLogic Scripting Tool (WLST) Commands.
  2. Connect to the Administration Server for the target domain with the following command:
    connect('username>,'password', 'host_id:port')
    

    where:

    • username is the administrator account name used to access the Administration Server (for example, weblogic)

    • password is the administrator password used to access the Administration Server (for example, weblogic)

    • host_id is the server ID of the Administration Server (for example, example.com)

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

  3. Reassociate the policy and credential store using the reassociateSecurityStore command:
    reassociateSecurityStore(domain="domain_name", admin="admin_name", password="password", 
    ldapurl="ldap_uri", servertype="ldap_srvr_type", jpsroot="root_webcenter_xxxx")
    

    Where:

    • domain_name specifies the domain name where reassociation takes place.

    • admin_name specifies the administrator's user name on the LDAP server. The format is cn=usrName.

    • password specifies the password associated with the user specified for the argument admin.

    • ldap_uri specifies the URI of the LDAP server. The format is ldap://host:port, if you are using a default port, or ldaps://host:port, if you are using a secure LDAP port. The secure port must have been configured to handle an anonymous SSL connection, and it is distinct from the default (non-secure) port.

    • ldap_srvr_type specifies the kind of the target LDAP server. Specify OID for Oracle Internet Directory.

    • root_webcenter_xxxx specifies the root node in the target LDAP repository under which all data is migrated. Be sure to include the cn=. The format is cn=nodeName.

    All arguments are required. For example:

    reassociateSecurityStore(domain="myDomain", admin="cn=adminName", password="myPass", ldapurl="ldaps://myhost.example.com:3060", servertype="OID", jpsroot="cn=testNode")
    

27.4 Managing Credentials

Administrators can manage credentials for the WebCenter Portal domain credential store using Fusion Middleware Control. For more information, see Managing Credentials with Fusion Middleware Control in Securing Applications with Oracle Platform Security Services.

27.5 Managing Users and Application Roles

This section describes how you can use Fusion Middleware Control, WLST, and the runtime administration pages in WebCenter Portal to manage users and application roles.

This section contains the following subsections:

27.5.1 Granting the WebCenter Portal Administrator Role

WebCenter Portal only recognizes users in the identity store that is mapped by the first authenticator. Since the WebCenter Portal Administrator account is initially created only in the embedded LDAP server, if an external LDAP such as Oracle Internet Directory is configured as the primary authenticator for WebCenter Portal, you must also create a user in that LDAP and grant that user the WebCenter Portal Administrator role.

You can grant a user the WebCenter Portal Administrator role using Fusion Middleware Control or WLST as shown below in the sections on:

27.5.1.1 Granting the WebCenter Portal Administrator Role Using Fusion Middleware Control

This section describes how to grant the WebCenter Portal administrator role to a user account other than the default "weblogic" account.

To grant the WebCenter Portal Administrator role using Fusion Middleware Control:

  1. Log into Fusion Middleware Control and navigate to the WebCenter Portal home page.

    See Navigating to the Home Page for WebCenter Portal.

  2. From the WebCenter Portal menu, select Security and then Application Roles.

    The Application Roles page opens (see Figure 27-1).

    Figure 27-1 Application Roles Page

    Description of Figure 27-1 follows
    Description of "Figure 27-1 Application Roles Page"
  3. Search for the WebCenter Portal Administrator role:

    • In the Role Name field, enter the following internal identifier for the Administrator role, and then click the Search (arrow) icon:

      s8bba98ff_4cbb_40b8_beee_296c916a23ed#-#Administrator
      

    The search should return s8bba98ff_4cbb_40b8_beee_296c916a23ed#-#Administrator, which is the administrator role identifier.

  4. Click the administrator role identifier from the search results and click Edit.

    The Edit Application Role page opens (see Figure 27-2).

    Figure 27-2 Edit Application Role Page

    Description of Figure 27-2 follows
    Description of "Figure 27-2 Edit Application Role Page"
  5. Click Add from the Members section.

    The Add Principal dialog opens (see Figure 27-3).

    Figure 27-3 Add Principal Dialog

    Description of Figure 27-3 follows
    Description of "Figure 27-3 Add Principal Dialog"
  6. Search for the user to assign the Administrator role to.

    1. From the Type drop-down, select User.

    2. Enter search criteria in the Principal Name and/or Display Name fields to either include part of the user name and/or the initial characters of the user name.

    3. Optionally, when you select User, select the Check to enter principal name here option from the Advanced Option section, enter your search criteria in the Principal Name and/or Display Name fields.

    4. Click OK.

      The Add Principal dialog closes and the user name is added to the list of members.

  7. To remove the weblogic role from the Edit Application Role page, select the role and click Delete, then click Yes on the confirmation dialog.

  8. On the Edit Application Role page, click OK.

27.5.1.2 Granting the WebCenter Portal Administrator Role Using WLST

To grant the WebCenter Portal Administrator role to another user using WLST:

  1. Start WLST as described in Running Oracle WebLogic Scripting Tool (WLST) Commands.
  2. Connect to the WebCenter Portal 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. Grant the WebCenter Portal administrator application role to the user in Oracle Internet Directory using the grantAppRole command as shown below:
    grantAppRole(appStripe="webcenter", appRoleName="s8bba98ff_4cbb_40b8_beee_296c916a23ed#-#Administrator",
    principalClass="weblogic.security.principal.WLSUserImpl", principalName="wc_admin")
    

    Where wc_admin is the name of the administrator account to create.

  4. To test the new account, log into WebCenter Portal using the new account name.

    The Administration link should appear, and you should be able to perform all administrator operations.

  5. After granting the WebCenter Portal Administrator role to new accounts, remove this role from accounts that no longer need or require it using the WLST revokeAppRole command. For example, if WebCenter Portal was installed with a different administrator user name than weblogic, the administrator role should be given to that user and should be revoked from the default weblogic.
    revokeAppRole(appStripe="webcenter", appRoleName="s8bba98ff_4cbb_40b8_beee_296c916a23ed#-#Administrator", 
    principalClass="weblogic.security.principal.WLSUserImpl", principalName="weblogic")
    

27.5.2 Granting Application Roles

This section describes how to add users to application roles using Fusion Middleware Control and WLST commands.

This section contains the following topics:

27.5.2.1 Granting Application Roles Using Fusion Middleware Control

This section describes how to grant an application role to users using Fusion Middleware Control.

  1. Log in to Fusion Middleware Control and navigate to the home page for WebCenter Portal. For more information, see Navigating to the Home Page for WebCenter Portal.

  2. From the WebCenter Portal menu, select Security and then Application Roles.

    The Application Roles page opens (see Figure 27-1).

    Figure 27-4 Application Roles Page

    Description of Figure 27-4 follows
    Description of "Figure 27-4 Application Roles Page"
  3. In the Role Name field, enter webcenter to search for all application roles in WebCenter Portal, or enter the name of the role (for example, appConnectionManager), and then click the Search (arrow) icon: .

    If you are not sure of the name, enter a partial search term or leave the field blank to display all the application roles.

    The Application Roles page opens (see Figure 27-5).

    Figure 27-5 Application Roles Page

    Description of Figure 27-5 follows
    Description of "Figure 27-5 Application Roles Page"
  4. Select the role you want to add the user to, then click Edit (see Figure 27-6).

    For example, to add a user to the Public Role, select the row Public Role.

    Figure 27-6 Role Name Search Results

    Role Name Search Results
  5. In the Edit Application page that opens for the selected role, click Add (see Figure 27-7).

    Figure 27-7 Edit Application Role Page

    Description of Figure 27-7 follows
    Description of "Figure 27-7 Edit Application Role Page"
  6. In the Add Principal dialog that opens (see Figure 27-3), search for the user.

    1. From the Type drop-down, select User.

    2. Enter search criteria in the Principal Name and/or Display Name fields to either include part of the user name and/or the initial characters of the user name.

    3. Select the user name from the Searched Principals table, then click OK.

      The Add Principal dialog closes and the user name is added to the list of members for the application role on the Edit Application Role page (see Figure 27-8).

      Figure 27-8 User Added to Application Role

      User Added to Application Role
  7. On the Edit Application Role page, click OK.

  8. Restart the WebCenter Portal (WC_Portal) managed server.

27.5.2.2 Granting Application Roles Using WLST

Use the grantAppRole command to grant an application role to a user. For syntax and usage information, see grantAppRole in WLST Command Reference for WebLogic Server.

27.5.3 Using the Runtime Administration Pages

WebCenter Portal provides a Security tab from which an administrator can define application roles and grant application roles to users defined in the identity store. For information about managing users and application roles in WebCenter Portal, see Managing Users and Application Roles.

Caution:

The "Allow Password Change" property, which specifies whether users can change their passwords within WebCenter Portal, should be carefully controlled for corporate identity stores. WebCenter Portal administrators can set this property from the Profile Management Settings page in WebCenter Portal. For more information, see Configuring Profile.

27.6 Configuring Self-Registration By Invitation in WebCenter Portal

WebCenter Portal supports self-registration by invitation, as described in Enabling Self-Registration By Invitation-Only. The self-registration 'by-invitation' feature requires that the WebCenter Portal domain credential store contain the following password credentials:

  • map name = o.webcenter.security.selfreg

  • key= o.webcenter.security.selfreg.hmackey

  • user name = o.webcenter.security.selfreg.hmackey

To enable Allow Self-Registration Through Invitations in WebCenter Portal Administration, use Fusion Middleware Control or the WLST command createCred to create the password credentials detailed above. For example:

createCred(map="o.webcenter.security.selfreg", key="o.webcenter.security.selfreg.hmackey", type="PC", 
user="o.webcenter.security.selfreg.hmackey", password="<password>", url="<url>", port="<port>", [desc="<description>"])

For more information, see “Managing Credentials with WLST Commands in Securing Applications with Oracle Platform Security Services.

27.7 Setting the Policy Store Refresh Interval and Other Cache Settings

This section provides recommended cache settings that should be configured after installation. Although settings for cache sizes and maximum group hierarchies should be based on your specific environment, the following sections provide recommendations that you can use as a starting point. For a complete list of tuning parameters and recommended values for WebCenter Portal, see Oracle WebCenter Portal Performance Tuning in Tuning Performance.

This section includes the following topics:

27.7.1 Setting the Policy Store Refresh Interval

The authorization policies used by WebCenter Portal use an in-memory cache with a default policy refresh time of 10 minutes. When a portal is created in a multi-node high availability environment, and you need a node failure to replicate the policy data more quickly, you can shorten the policy store refresh interval by modifying the domain-level jps-config.xml file, and adding the following entry:

oracle.security.jps.ldap.policystore.refresh.interval=<time_in_milli_seconds>

This should be added to the PDP service node:

<serviceInstance provider="pdp.service.provider" name="pdp.service">

Note that the policy refresh interval should not be set to too small a value as the frequency at which the server cached policy is refreshed may impact performance.

After modifying the jps-config.xml file, restart all servers in the domain. For more information, see Refreshing the Policy Cache in Securing Applications with Oracle Platform Security Services.

27.7.2 Setting the Connection Pool Cache

This section describes the recommended settings for the connection pool cache.

To set the connection pool cache:

  1. Log into the WLS Administration Console.
  2. Select Security Realms > [realm] > Providers > [provider] > Configuration > Provider Specific.
  3. Set the connection pool cache parameters to the following recommended values:
    • Connection Pool Size = max connection users

    • Connect Timeout = 30

    • Connection Retry Limit = 1

    • Results Time Limit = 1000

    • Keep Alive Enable = true

  4. Save your changes and restart all servers in the domain.

27.7.3 Setting User Cache Settings

This section describes the recommended settings for user cache settings.

To set user cache settings:

  1. Log into the WLS Administration Console.
  2. Select Security Realms > [realm] > Providers > [provider] > Configuration > Provider Specific.
  3. Set the user cache parameters to the following recommended values:
    • Cache Enabled = true

    • Cache Size = 3200

    • Cache TTL = session timeout

    • Results Time Limit = 1000

    • Keep Alive Enable = true

  4. Save your changes and restart all servers in the domain.

27.7.4 Setting Group Cache Settings

This section describes the recommended settings for group cache settings.

To set group cache settings:

  1. Log into the WLS Administration Console.
  2. Select Security Realms > [realm] > Providers > [provider] > Performance.
  3. Set the group cache parameters to the following recommended values:
    • Enable Group Membership Lookup Hierarchy Caching = true

    • Cache Size = 3200

    • Max Group Hierarchies in Cache = 1024

    • Group Hierarchy Cache TTL = session timeout

    • Keep Alive Enable = true

  4. Save your changes and restart all servers in the domain.