Greetings,

I have an EJB1 which accesses to an EJB2 (entity) secured. 

By default, without setting any authentication by JAAS in EJB1, I got this exception 
due the missing authentication from EJB1,  when I try to make findByPrimaryKey:

  | javax.ejb.TransactionRolledbackLocalException: checkSecurityAssociation; 
CausedByException is:
  |     Authentication exception, principal=null; CausedByException is:
  |     checkSecurityAssociation; CausedByException is:
  |     Authentication exception, principal=null
  |     
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:204)
  |     
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
  |     org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
  |     org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
  |     org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
  |     
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
  |     org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
  |     org.jboss.ejb.Container.invoke(Container.java:723)
  |     
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:359)
  |     org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:44)
  | 
However, I want to open access to EJB1, so I tried 2 alternatives:

1) I set the <run-as>element in the EJB1 ejb-jar.xml with a role which is allowed in 
the EJB2:

  | <run-as>
  |                <description>permission to execute with role</description>
  |                <role-name>slr-user</role-name>
  | </run-as>
  | 

2) I unchecked the permission in the finder method by primary key in EJB2 ejb-jar.xml:

  |    <method-permission >
  |       <description>Permission for findByPK method</description>
  |       <unchecked/>
  |       <method >
  |          <ejb-name>Db</ejb-name>
  |          <method-name>findByPrimaryKey</method-name>
  |       </method>
  |    </method-permission>
  | 

However, in both cases I'm still getting the same exception. What is missing here?

Regards,
Pedro Salazar.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840656#3840656

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840656


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to