Entries in Application "web.xml" to activate the Agent

I have often been asked by customers and partners on what exactly needs to go into the application web.xml, to activate the policy agent.

Typically, developers just install the OpenSSO Policy Agent on an application container and expect that the application is protected by the agent 'auto-magically'. For a J2EE agent protecting an application on a J2EE container, here is what needs to go into the web.xml.

<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>

Restart the application container once these changes are made and the Policy Agent will be activated.

Note: The above entries suffice when you have the agent configured in "SSO Only" mode. 
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

webshesh

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today