geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <>
Subject [jira] Closed: (GERONIMO-1053) Session Bean, Finder, & Method Permissions
Date Mon, 27 Jul 2009 05:50:14 GMT


David Jencks closed GERONIMO-1053.

    Resolution: Fixed

I don't think we would have passed the tck if this was a problem.  The code involved is completely
different from that in 1.0-M5 and no one has complained recently.

> Session Bean, Finder, & Method Permissions
> ------------------------------------------
>                 Key: GERONIMO-1053
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: OpenEJB, security
>    Affects Versions: 1.0-M5
>            Reporter: Aaron Mulder
>            Priority: Blocker
> I have an EAR with a Web App, Session Bean, and CMP Entity Bean, using the M5 release.
> The user brings up a secure page on the web app and logs in.
> The web code invoked after the login calls the session bean.
> The session bean calls a finder on the entity bean, and gets this (in the session bean
method code, where it calls the finder):
> {noformat}
> Caused by: javax.ejb.TransactionRolledbackLocalException
>         at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(
>         at org.openejb.transaction.TransactionContextInterceptor.invoke(
>         at org.openejb.SystemExceptionInterceptor.invoke(
>         at org.openejb.GenericEJBContainer$DefaultSubjectInterceptor.invoke(
>         at org.openejb.GenericEJBContainer.invoke(
>         at org.openejb.proxy.EJBMethodInterceptor.intercept(
>         at org.openejb.proxy.EntityEJBLocalHome$$EnhancerByCGLIB$$afb1a239.findAll(<generated>)
>         at org.loadmagus.ejb.TestManagerBean.getAllApplications(
>         ... 48 more
> Caused by: javax.ejb.AccessLocalException: access denied (
EntityBean findAll,LocalHome,)
>         at
>         at
>         at org.openejb.ConnectionTrackingInterceptor.invoke(
>         at org.openejb.entity.EntityInstanceInterceptor.invoke(
>         at org.openejb.entity.cmp.InTxCacheInterceptor.invoke(
>         at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(
>         ... 55 more
> {noformat}
> The ejb-jar.xml for the EJBs in question has:
> {noformat}
>         <security-role>
>             <role-name>Developer</role-name>
>         </security-role>
>         <method-permission>
>             <role-name>Developer</role-name>
>             <method>
>                 <ejb-name>SessionBean</ejb-name>
>                 <method-name>*</method-name>
>             </method>
>         </method-permission>
>         <method-permission>
>             <role-name>Developer</role-name>
>             <method>
>                 <ejb-name>EntityBean</ejb-name>
>                 <method-name>*</method-name>
>             </method>
>         </method-permission>
> {noformat}
> So it's a little odd that the session bean sees a transaction rolled back exception rather
than the real security exception, but whatever.
> The real problem is that both the session bean and the entity bean are covered by identical
all-inclusive method permission blocks, so if the user got into the session bean, there should
be no reason they can't get into the entity bean.  The syntax above is specifically supported
in the ejb-jar-2_1.xsd Schema (#1; "This style is used to refer to all the methods of the
specified enterprise bean's home, component, and/or web service endpoint interfaces.")

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message