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