Sun OpenSSO Enterprise Policy Agent 3.0 Guide for Oracle WebLogic Server/Portal 10

Required Post-Installation Tasks for the WebLogic Server/Portal 10 Policy Agent

Setting the Java Options on IBM AIX Systems

Perform this task applies only if the WebLogic Server 10 agent is deployed on an IBM AIX system.

ProcedureTo Set the Java Options on IBM AIX Systems

  1. Using a text editor, open the domain-directory/bin/setDomainEnv.sh file for the WebLogic Server 10 instance:

  2. In the setDomainEnv.sh file, find these lines:

    JAVA_OPTIONS="${JAVA_OPTIONS}"
    export JAVA_OPTIONS
  3. Change the first line to:

    JAVA_OPTIONS="-DamKeyGenDescriptor.provider=IBMJCE
    -DamCryptoDescriptor.provider=IBMJCE
    -DamRandomGenProvider=IBMJCE ${JAVA_OPTIONS}"
  4. Save the setDomainEnv.sh file and restart the WebLogic Server 10 instance.

Configuring a WebLogic Server 10 Instance With the Agent classpath and Java Options

This section applies to WebLogic Server 10 only. For instructions specific to WebLogic Portal 10, see Post-Installation Tasks for the WebLogic Server/Portal 10 Agent on WebLogic Portal 10.

During the agent installation, the installer creates the following environment variable script in domain-directory:

where:

The agent environment variable script is called during the server's startup sequence and sets the classpath and Java options for the agent.

ProcedureTo Configure a WebLogic Server 10 Instance With the Agent classpath and Java Options

  1. Using a text editor, edit the following WebLogic Server 10 instance startup script, depending on your platform:

    • Solaris and Linux systems: domain-directory/bin/startWebLogic.sh

    • Windows systems: domain-directory\bin\startWebLogic.cmd

    domain-directory represents the domain name associated with the WebLogic Server 10 instance.

  2. Add the path of the agent environment variable script to the WebLogic Server 10 startup script:

    • Solaris and Linux systems: After the line, . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*, add the path:


      . domain-directory/setAgentEnv_${SERVER_NAME}.sh

      For example, for a domain directory named base_domain:


      . /usr/local/bea/user_projects/domains/base_domain/setAgentEnv_${SERVER_NAME}.sh

      Therefore, the startup script would then contain these two lines:


      . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
      . /usr/local/bea/user_projects/domains/base_domain/setAgentEnv_${SERVER_NAME}.sh
    • Windows systems: After the line, call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*, add the path:

      call "domain-directory\setAgentEnv_%SERVER_NAME%.cmd"

      For example, for a domain directory named base_domain:

      call "C:\bea\user_projects\domains\base_domain\setAgentEnv_%SERVER_NAME%.cmd"

      Therefore, the startup script would then contain these two lines:

      call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*
      call "C:\bea\user_projects\domains\base_domain\setAgentEnv_%SERVER_NAME%.cmd"

    The ${SERVER_NAME} or %SERVER_NAME% variable represents the WebLogic Server 10 instance and is dynamically replaced when the script is executed.

  3. Restart the WebLogic Server 10 instance.

Deploying the Agent Application

This section applies to both WebLogic Server 10 and WebLogic Portal 10. The agent application (agentapp.war) is a housekeeping application used by the agent for notifications and other functions such as cross domain single sign-on (CDSSO) support.

ProcedureTo Deploy the Agent Application

Before You Begin

This application is bundled with the weblogic_v10_agent_3.zip distribution file and is available as a WAR file in the following location after you unzip the file:

PolicyAgent-base/etc/agentapp.war

  1. Deploy the agent application on the WebLogic Server/Portal 10 container using the WebLogic Server/Portal 10 administration console or deployment command.

    You must use the same deployment URI that you specified for the “Agent Protected Application Server URL” prompt during the agent installation.

    For example, if you entered http://agenthost:port/agentapp as the “Agent Protected Application Server URL”, then use this same URI to deploy the agentapp.war file in the WebLogic Server/Portal 10 container.

Configuring the Agent Authentication Provider for the WebLogic Server/Portal 10Agent

This section applies only to WebLogic Server 10. For instructions specific to WebLogic Portal 10, see Post-Installation Tasks for the WebLogic Server/Portal 10 Agent on WebLogic Portal 10.

Using the security service provider API provided by WebLogic Server 10, the agent plugs its custom security authenticator into the container. Once the Agent Authenticator is configured, all requests call it. You need to set the Agent Authenticator only once per WebLogic Server 10 domain.

For more information about WebLogic Server 10 security providers, see http://e-docs.bea.com/wls/docs100/dvspisec/intro.html.

Add the authentication provider using the WebLogic Server 10 Administration Console.

ProcedureTo Configure the Agent Authentication Provider for WebLogic Server 10

  1. Log in to the WebLogic Server 10 Administration Console.

  2. In the left pane, under Domain Structure and under the host name of the server you are configuring, click Security realms.

  3. In the right pane, click the name of the realm you are configuring.

  4. Click Providers.

  5. Click the Authentication tab.

  6. In the left pane, click Lock & Edit.

  7. In the right pane, click New.

  8. Specify Type as AgentAuthenticator.

  9. Specify Name with a name of your choice.

  10. Click OK.

  11. Click the newly created policy agent authentication provider.

  12. Change the control flag value to OPTIONAL.

  13. Click Save.

  14. Click Providers.

    The Authentication Providers Table appears.

  15. Click Default Authenticator.

  16. Change the control flag to OPTIONAL.

  17. Click Save.

  18. In the left pane, click Activate changes.

  19. Restart the WebLogic Server 10 instance for the changes to take effect.

Default Security Realm

If you create a new security realm instead of using the default security realm to configure the agent, ensure that the control flag value for the Agent Authenticator and any additional authentication providers are set to OPTIONAL.

Adding a WebLogic Administrator to the Bypass List for the WebLogic Server/Portal 10 Agent

This section applies to both WebLogic Server 10 and WebLogic Portal 10. After you complete this task, the WebLogic administrator you add can bypass the authentication process for the OpenSSO Enterprise realm.

ProcedureTo Add a WebLogic Administrator to the Bypass List for the WebLogic Server/Portal 10 Agent

  1. Login to the OpenSSO Enterprise Console as amadmin.

  2. Under Access Control, realm-name, Agents, and J2EE, click the name of the agent profile you want to update.

    The Console displays the Edit page for the agent profile.

  3. Click Miscellaneous and then Bypass Principal List.

  4. Enter the WebLogic administrator name in New Value and click Add.

  5. Click Save.

Using the ssoadm Utility

If you prefer to set this option using ssoadm, set the com.sun.identity.agents.config.bypass.principal property. This property is hot-swappable, so you do not need to restart the WebLogic Server/Portal 10 container after you set the property.

Installing the Agent Filter for the WebLogic Server/Portal 10 Agent

This section applies to both WebLogic Server 10 and WebLogic Portal 10. Install the agent filter by modifying the deployment descriptor of each application that you want to protect.

ProcedureTo Install the Agent Filter

  1. Ensure that the application you want to protect is not currently deployed on WebLogic Server/Portal 10.

    If the application is deployed, undeploy it before continuing.

  2. Backup the application's web.xml file before modifying the descriptors.

    The backup copy can be useful if you need to uninstall the agent.

  3. Edit the application's descriptors in the web.xml file as follows:

    1. Set the <DOCTYPE> element as shown in the following example:


      <!DOCTYPE web-app version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 

      Note: WebLogic Server/Portal 10 supports the Java Servlet specification version 2.4. Version 2.4 is fully backward compatible with version 2.3. Therefore, all existing servlets should work without modification or recompilation.

    2. Add the <filter> elements to the deployment descriptor.

      Specify the agent filter as the first <filter> element and the agent filter mapping as the first <filter-mapping> element. For example:


      <web-app>
      ...
          <filter>
              <filter-name>Agent</filter-name>
              <filter-class> com.sun.identity.agents.filter.AmAgentFilter </filter-class>
          </filter>
          <filter-mapping>
              <filter-name>Agent</filter-name>
              <url-pattern>/*</url-pattern>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>ERROR</dispatcher>
          </filter-mapping>
      ...
      </web-app>
  4. Deploy (or redeploy) the application on WebLogic Server/Portal 10.

    The agent filter is added to the application.

Next Steps

You can also protect an application with J2EE declarative security. To learn more about protecting your application with J2EE declarative security, consider deploying the sample application. For information, see Deploying the Policy Agent Sample Application.


Note –

Ensure that role-to-principal mappings in container specific deployment descriptors are replaced with OpenSSO Enterprise roles or principals. To retrieve OpenSSO Enterprise roles or principals, use the OpenSSO Enterprise Console to browse the user profile. For more information, see Mapping OpenSSO Enterprise Roles to Principal Names.