geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r736874 - in /geronimo/server/trunk: plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/
Date Fri, 23 Jan 2009 00:52:38 GMT
Author: djencks
Date: Thu Jan 22 16:52:37 2009
New Revision: 736874

URL: http://svn.apache.org/viewvc?rev=736874&view=rev
Log:
GERONIMO-4521 Prevent deployment of an ejb app with security constraints when there is no
corresponding geronimo security configuration

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
    geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java?rev=736874&r1=736873&r2=736874&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Thu Jan 22 16:52:37 2009
@@ -65,6 +65,8 @@
 import org.apache.openejb.jee.SecurityIdentity;
 import org.apache.openejb.jee.SessionBean;
 import org.apache.openejb.jee.SessionType;
+import org.apache.openejb.jee.AssemblyDescriptor;
+import org.apache.openejb.jee.MethodPermission;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.xbean.finder.ClassFinder;
 import org.apache.xmlbeans.XmlObject;
@@ -174,6 +176,10 @@
     }
 
     public ComponentPermissions buildComponentPermissions() throws DeploymentException {
+        List<MethodPermission> methodPermissions = ejbModule.getEjbJar().getAssemblyDescriptor().getMethodPermission();
+        if (earContext.getSecurityConfiguration() == null && methodPermissions.size()
> 0) {
+            throw new DeploymentException("Ejb app has method permissions but no security
configuration supplied in geronimo plan");
+        }
         ComponentPermissions componentPermissions = new ComponentPermissions(new Permissions(),
new Permissions(), new HashMap<String, PermissionCollection>());
         for (EnterpriseBean enterpriseBean : ejbModule.getEjbJar().getEnterpriseBeans())
{
             addSecurityData(enterpriseBean, componentPermissions);

Modified: geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml?rev=736874&r1=736873&r2=736874&view=diff
==============================================================================
--- geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml
(original)
+++ geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml
Thu Jan 22 16:52:37 2009
@@ -79,6 +79,7 @@
         </entity>
     </enterprise-beans>
     <assembly-descriptor>
+        <!--
         <method-permission>
             <unchecked/>
             <method>
@@ -107,6 +108,7 @@
                 <method-name>*</method-name>
             </method>
         </method-permission>
+        -->
         <container-transaction>
             <description>Transaction attributes for 'SimpleStatelessSession' methods</description>
             <method>



Mime
View raw message