ejbActivate is not call with the run-as roll established as it should be so this is a bug.

--
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx

Sternagel Annegret (MPI/ADB) wrote:

Hello,

I'm facing a problem which I think may be a bug in jboss.
I'm using jboss 2.4.10 on Windows 2000
Java Version: Sun 1.4.1_02

A Stateful SessionBean BeanA creates another Stateful SessionBean BeanB.
BeanA has method permission set for role "Administrator" and the "runAs"
attribute set to "InternalAdmin"
BeanB has method permission set for role "InternalAdmin"
This works fine during normal usage,
but after passivation the activation fails with the error:

Could not activate; nested exception is: java.rmi.ServerException: Could not get EJBObject; nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested
exception is: javax.transaction.TransactionRolledbackException: checkSecurityAssociation;
nested exception is: java.lang.SecurityException: Insufficient method permissions,
principal=Admin, method=getEJBObject, requiredRoles=[InternalAdmin],
principalRoles=[Administrator];


I think the problem occurs on BeanB.
Why is the method getEJBObject accessed by Administrator, BeanA should acess
BeanB as "InternalAdmin" ?
Any ideas ?

Annegret



Configuration:
       <session>
         <ejb-name>BeanA</ejb-name>
         <home>test.BeanAHome</home>
         <remote>test.BeanA</remote>
         <ejb-class>test.BeanABean</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>
         <security-identity>
           <run-as>
             <role-name>InternalAdmin</role-name>
           </run-as>
         </security-identity>
       </session>
      <session>
         <ejb-name>BeanB</ejb-name>
         <home>test.BeanBHome</home>
         <remote>test.BeanB</remote>
         <ejb-class>test.BeanBBean</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>
       </session>

       <method-permission>
         <role-name>Administrator</role-name>
         <method>
           <ejb-name>BeanA</ejb-name>
           <method-name>*</method-name>
         </method>
      </method-permission>
       <method-permission>
         <role-name>InternalAdmin</role-name>
         <method>
           <ejb-name>BeanB</ejb-name>
           <method-name>*</method-name>
         </method>
      </method-permission>




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to