With @runAS I get a java.lang.SecurityException
-----------------------------------------------

         Key: EJBTHREE-131
         URL: http://jira.jboss.com/jira/browse/EJBTHREE-131
     Project: EJB 3.0
        Type: Bug
  Components: EJB3 Extensions  
    Versions: Preview 5, Preview 4    
 Environment: JBoss 4.0.1sp1 / EJB3_preview4 or EJB3_preview5
    Reporter: Fritz Muster


I have an MDB where I set an @runAs-Annotation:

@RunAs("TestRole")

Within the MDB I call some other Statless-Sessionbeans, that have set an 
@MethodPermissions that includes the TestRole.

Anyway I get a Security Exception:

09:41:29,711 ERROR [AuthenticationInterceptor] Authentication exception, 
principal=[roles=[TestRole],principal=anonymous]
09:41:29,711 INFO  [STDOUT] java.lang.SecurityException: Authentication 
exception, principal=[roles=[TestRole],principal=anonymous]
09:41:29,711 INFO  [STDOUT]     at 
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:68)
09:41:29,711 INFO  [STDOUT]     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
09:41:29,711 INFO  [STDOUT]     at 
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:90)
09:41:29,711 INFO  [STDOUT]     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:135)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:63)
09:41:29,721 INFO  [STDOUT]     at $Proxy130.update(Unknown Source)
09:41:29,721 INFO  [STDOUT]     at 
*.*.*.*.UpdaterMDB.onMessage(UpdaterMDB.java:41)
09:41:29,721 INFO  [STDOUT]     at 
sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
09:41:29,721 INFO  [STDOUT]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
09:41:29,721 INFO  [STDOUT]     at 
java.lang.reflect.Method.invoke(Method.java:585)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:77)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aspects.tx.TxSupport.invokeInCallerTx(TxSupport.java:171)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aspects.tx.TxSupport$Required.serverInvoke(TxSupport.java:443)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aspects.tx.TxInterceptor.internalInvoke(TxInterceptor.java:112)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aspects.tx.TxInterceptor.invoke(TxInterceptor.java:60)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:36)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aspects.security.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:51)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.ejb3.mdb.MDB.localInvoke(MDB.java:708)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.ejb3.mdb.MDB$MessageListenerImpl.onMessage(MDB.java:904)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.mq.SpySession.run(SpySession.java:351)
09:41:29,721 INFO  [STDOUT]     at 
org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
09:41:29,721 INFO  [STDOUT]     at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
09:41:29,721 INFO  [STDOUT]     at java.lang.Thread.run(Thread.java:595)


schoetz


-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to