0 Replies Latest reply on Aug 11, 2002 12:12 AM by Rick Cole

    JAAS Subject.doAs

    Rick Cole Newbie

      Has anyone successfully been able to use the Subject.doAs() method to make calls to privileged code? I want to use JAAS to change security principals and execute code as another principal. I can do this if I simply login as a principal using JAAS. Then all other beans I make calls to, execute as the new principal. However, I want to write code that is also portable to weblogic 6.1 and it is required under weblogic to use the Subject.doAs method. When I attempt to make a doAs() call under JBoss, passing in a PrivilegedAction (or PrivilegedExceptionAction), I get an exception in the AccessController.doPrivileged call. Since the call is a native one, I get no stack trace, but I get a message stating:
      unable to instantiate Subject-based policy
      Has anyone else seen this behavior? Thanks!

      Rick