geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r736877 - in /geronimo/server/branches/2.1: 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:56:32 GMT
Author: djencks
Date: Thu Jan 22 16:56:32 2009
New Revision: 736877

URL: http://svn.apache.org/viewvc?rev=736877&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/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
    geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml

Modified: geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java?rev=736877&r1=736876&r2=736877&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
(original)
+++ geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Thu Jan 22 16:56:32 2009
@@ -62,6 +62,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;
@@ -168,6 +170,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/branches/2.1/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/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml?rev=736877&r1=736876&r2=736877&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml
(original)
+++ geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-ejb-j2ee_1.4/src/main/resources/META-INF/ejb-jar.xml
Thu Jan 22 16:56:32 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