-
Bug
-
Resolution: Done
-
Major
-
7.0.1.GA
-
None
It seems that the security context is not always correctly propagated from web container to EJB container when using a JASPIC security domain (custom JASPI SAM).
We have developed a simple security module to validate if a JASPI SAM could help us integrate web applications that are deployed on our JBoss instances with our IDP over a custom protocol.
When accessing a protected web page which is in turn calling an EJB that has some security defined on a method that is called (@RolesAllowed("admin")):
1. for the first call: the user is authenticated, he is attributed the correct roles and can access the JSP and the EJB without any problems.
2. for subsequent calls, the user is authenticated, has the correct roles to access the JSP, but when calling the EJB, a stack trace is thown with error message "WFLYEJB0034: EJB Invocation failed on component PrincipalDumper for method public void be.smals.PrincipalDumper.logPrincipal(): javax.ejb.EJBAccessException: WFLYSEC0027: Invalid User"
This seems to be very similar to the problem described in https://issues.jboss.org/browse/WFLY-4626.
The included source code is simply using HTTP request parameters to pass the credentials to the JASPI login module. It is clear that this is only for prototyping / testing purposes.
2016-09-08 13:46:43,602 ERROR [org.jboss.as.ejb3.invocation] (default task-12) WFLYEJB0034: EJB Invocation failed on component PrincipalDumper for method public void be.smals.PrincipalDumper.logPrincipal(): javax.ejb.EJBAccessException: WFLYSEC0027: Invalid User
at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:69)
at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:49)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:97)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
- clones
-
JBEAP-6403 (7.1.0) When JASPIC's register session is used, Subject not propagated to EJB
-
- Closed
-