Sun Java System Access Manager Policy Agent 2.2 Guide for Oracle Application Server 10g

ProcedureTo Install the Agent Filter for the Deployed Application on Agent for Oracle Application Server 10g

The following steps explain how to install the agent filter for an application you want the agent to protect.

  1. Ensure that the application is not currently deployed on Oracle Application Server 10g.

    If it is currently deployed, remove it before proceeding any further.

  2. Create the necessary backups before proceeding to modify these descriptors.

    Since you will modify the deployment descriptor in the next step, creating backup files at this point is important.

  3. Edit the application's WEB-INF/web.xml descriptor as required:

    You must change the <DOCTYPE> element and you must add filter elements to the web.xml descriptor.

    The <DOCTYPE> element of the web.xml descriptor must be changed to reflect that the deployment is, at minimum, a servlet 2.3 compliant deployment descriptor.

    The filters were introduced in Servlet Specification 2.3. For more information about this specification visit the following web page: http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html

    1. Edit the <DOCTYPE> element of the web.xml descriptor as required.

      The following is an example of how the <DOCTYPE> element should appear after editing:


      <!DOCTYPE web-app PUBLIC
      "-//Sun Microsystems, Inc.//DTD Web Application2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd"> 
    2. Add the required filter elements to the web.xml descriptor at the first filter definition.

      The following example demonstrates the <filter> elements to be added:


      <web-app>
      ...
      <filter>
      <filter-name>Agent</filter-name>
      <display-name>Agent</display-name>
      <filter-class>
      com.sun.identity.agents.filter.AmAgentFilter
      </filter-class>
      </filter>
      <filter-mapping>
      <filter-name>Agent</filter-name>
      <url-pattern>/*</url-pattern>
      </filter-mapping>
      ...
      <web-app>
Next Steps

You have the option of protecting your application with J2EE declarative security. For more information, seeEnabling Web-Tier Declarative Security in J2EE Agents.

Furthermore, you can learn more about protecting your application with J2EE declarative security by deploying the sample application. Change directories to the PolicyAgentBase/sampleapp directory to learn how to build and deploy an application. The sampleapp application is by no means a full fledged J2EE application. Rather it is a simple application that provides you with a quick reference to application specific deployment descriptors and various deployment modes of a J2EE agent. Once you successfully deploy sampleapp and test all of its features, you can use it as a reference to other applications that will be protected by the J2EE agent.

Once the web.xml deployment descriptor is modified to reflect the new <DOCTYPE> and <filter> elements, the agent filter is added to the application. You can now redeploy your application on Oracle Application Server 10g.


Note –

Ensure that role-to-principal mappings in container specific deployment descriptors are replaced with Access Manager roles or principals. You can retrieve Access Manager roles or principals for Access Manager 7 by issuing the agentadmin --getUuid command. For more information on the agentadmin --getUuid command, see agentadmin --getUuid.

You can also retrieve the universal ID for the user (UUID) using Access Manager 7 Console to browse the user profile.