Sun Java System Access Manager Policy Agent 2.2 Guide for JBoss Application Server 4.0

ProcedureTo Install the Agent Filter for the Deployed Application on Agent for JBoss Application Server 4.0

  1. Ensure that the application is not currently deployed on JBoss Application Server 4.0.

    If the application is currently deployed, remove it before continuing.

  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.xml file as follows:

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

      <!DOCTYPE web-app version="2.4"

      JBoss Application Server 4.0 supports the Java Servlet Specification version 2.4. Note that Servlet API version 2.4 is fully backward compatible with version 2.3. Therefore, all existing servlets should work without modification or recompilation.

    2. Add the following filter element in the web.xml file:

      <filter-class> com.sun.identity.agents.filter.AmAgentFilter </filter-class>
    3. Modify the jboss-web.xml and jboss.xml files for the deployed application.

      Specify the value of the security-domain element as AMRealm. For example:


    If you want to specify a different value for the realm, set the security-domain element to that value in the jboss-web.xml and jboss.xml files.

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. Visit 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 JBoss Application Server 4.0.

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.