1 Reply Latest reply on Dec 19, 2008 9:28 AM by stefan.a.marty

    subject lookup

    stefan.a.marty

      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