This content has been marked as final.
Show 1 reply
-
1. Re: Testing secured EJB on JBoss AS 7.1.1 with RunAsIdentity
grossetieg Sep 21, 2012 4:46 PM (in response to grossetieg)With some debug, I found a workaround :
final JBossSecurityContext securityContext = new JBossSecurityContext("other"); SecurityContextAssociation.setSecurityContext(securityContext); securityContext.setIncomingRunAs(new RunAsIdentity("ADMIN", "admin"));
The security context was null so I had to create and set one. I also had to manually set the IncomingRunAs on the security context because the propagation wasn't trigger (SecurityContextInterceptor) and as a consequence the IncomingRunAs (CallerPrincipal) wasn't fill with the RunAsIdentity (OutgoingRunAs) ?
Hope it can help
Guillaume.