yes by default Tomcat (dont know about Resin) stores the principals in the session (strangely using Session.setNote() so actually its not available through HttpSession ) but JBoss instead doesnt store the principals and instead stores the credentials in the session it then delegates to the JbossSecurityMgrRealm which delegates to the JBoss security manager which uses the credentials to authenticate and stores the principals in its own cache.
Subsequent checked requests are always sent to the JBoss security manager which looks it up in its own cache. hence the principals are only available when it bothers to reauthenticate in a checked URI. And those are only ever stored in the request not in the session. So if you want to track a user on unchecked pages you have to do it yourself the way i see it you could 1) Have a filter that takes the sees if you have a request.getUserPrincipal() and if so stores it in the session too. if a request does not have a request.getUserPrincipal() looks in the session and gets the principal and then does a request.setUserPrincipal() (Note this wont help you if the user calls EJB methods that have security.. you would also have to set the security association) 2) Write a custom tomcat authenticator. 3) Make all pages checked pages in the web.xml but have public accessable pages accessible to a "guest" role View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840432#3840432 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840432 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
