Hello All,
I am unable to get request.getUserPrincipal() or request.getRemoteUser() after successful external authentication. I would greatly appreciate if you could let me know of any configuration on tomcat server to be looked at to get the user principal. Below is the implementation details: I have a sample app deployed on Tomcat v6.0.33. J2EE Policy Agent 3.0.3 is also installed on the same server. I have configured to have external authentication using the J2EE agent and accomplished using OpenAM Enterprise Server. The tomcat container is protected using this authentication implementation. When I try the sample app URL, I am redirected to the OpenAM server where the user is authentication and redirected back to the application. Using the request object, I am able to get all the user information like uid, givenname, sn, cn etc. but request.getUserPrincipal() or request. getRemoteUser() is null. I tried adding the following code to web.xml either on the application or tomcat container itself, still I am unable to get the user principal. I would greatly appreciate if you could let me know of any configuration I should be looking at on tomcat server. Thanks in advance. <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> <security-constraint> <display-name>Example Security Constraint</display-name> <web-resource-collection> <web-resource-name>Entire Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> </security-constraint> Thanks Yogesh