[JBoss JIRA] Created: (EJBTHREE-913) java.lang.IllegalStateException in SessionContext::getCallerPrincipal()
by Mihail Druzinin (JIRA)
java.lang.IllegalStateException in SessionContext::getCallerPrincipal()
-----------------------------------------------------------------------
Key: EJBTHREE-913
URL: http://jira.jboss.com/jira/browse/EJBTHREE-913
Project: EJB 3.0
Issue Type: Bug
Components: Security
Affects Versions: EJB 3.0 RC9 - FD
Environment: AS: jboss-4.0.5 (ejb3 Version EJB 3.0 RC7 - FD and EJB3 RC9 Patch 1)
OS: Windows, GentooLinux
Reporter: Mihail Druzinin
>From HttpServlet I execute methods from stateless been.
All methods executed correctly with authorization.
When in method I try sessionContext.getCallerPrincipal(), then throws
java.lang.IllegalStateException: No valid security context for the caller identity
After see in jboss security module I find that in org.jboss.security.SecurityAssociation getCallerPrincipal()
when used RunAsIdentity, it getted not from top of RunAsIdentity stack, but "for the active run-as the previous caller has assumed":
Principal thePrincipal = peekRunAsIdentity(1); (SecurityAssociation.java:216).
After fixed that string to: Principal thePrincipal = peekRunAsIdentity(0), all start work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months