[jboss-user] [Security & JAAS/JBoss] - subject lookup

stefan.a.marty do-not-reply at jboss.com
Fri Dec 19 05:51:21 EST 2008


Hello

I try to get the subject to store an additional principal containing UserId for audit purposes (subquestion: Is that a good idea). Unfortunately I get always another subject instance so I can't persist the UserId.

this are my lookup trials:

Subject subject = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container");

Subject subject = (Subject) ic.lookup("java:jaas/tmsec/subject");

I always get a subject contained principals with correct username and roles.

Has somebody an idea if the lookup has to be done different or if possibly something is missing somewhere else?

I use jboss-4.2.3.GA

Thanks in advance 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197580#4197580

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197580



More information about the jboss-user mailing list