[jboss-cvs] JBossAS SVN: r65202 - in trunk/ejb3: src/resources/test and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 6 17:09:08 EDT 2007


Author: anil.saldhana at jboss.com
Date: 2007-09-06 17:09:08 -0400 (Thu, 06 Sep 2007)
New Revision: 65202

Added:
   trunk/ejb3/src/resources/test/security-spec/
   trunk/ejb3/src/resources/test/security-spec/META-INF/
   trunk/ejb3/src/resources/test/security-spec/META-INF/jboss-service.xml
   trunk/ejb3/src/resources/test/security-spec/META-INF/spec-test-config.xml
   trunk/ejb3/src/resources/test/security-spec/tst.keystore
Removed:
   trunk/ejb3/src/resources/test/security/security-spec.sar
Modified:
   trunk/ejb3/build-test.xml
   trunk/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java
Log:
clean up the resources for the EJBSpecUnitTestCase

Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml	2007-09-06 21:07:21 UTC (rev 65201)
+++ trunk/ejb3/build-test.xml	2007-09-06 21:09:08 UTC (rev 65202)
@@ -2995,6 +2995,14 @@
 
       <mkdir dir="${build.lib}"/>
 
+      <jar jarfile="${build.lib}/security-spec.sar">
+        <metainf dir="${resources}/test/security-spec/META-INF" />
+        <fileset dir="${resources}/test/security">
+           <include name="users.properties" />
+           <include name="roles.properties" />
+        </fileset>
+      </jar>
+
       <jar jarfile="${build.lib}/security.jar">
          <fileset dir="${build.classes}">
             <include name="org/jboss/ejb3/test/security/*.class"/>
@@ -3005,7 +3013,6 @@
          <fileset dir="${resources}/test/security">
             <include name="users.properties"/>
             <include name="roles.properties"/>
-            <include name="security-spec.sar"/>
          </fileset>
       	<fileset dir="${resources}/test/security">
       	    <include name="META-INF/ejb-jar.xml"/>

Deleted: trunk/ejb3/src/resources/test/security/security-spec.sar
===================================================================
(Binary files differ)

Added: trunk/ejb3/src/resources/test/security-spec/META-INF/jboss-service.xml
===================================================================
--- trunk/ejb3/src/resources/test/security-spec/META-INF/jboss-service.xml	                        (rev 0)
+++ trunk/ejb3/src/resources/test/security-spec/META-INF/jboss-service.xml	2007-09-06 21:09:08 UTC (rev 65202)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <!-- The custom JAAS login configuration service that installs 
+       a Configuration capable of dynamically updating the
+       config settings
+   -->
+   <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+         name="jboss.security.tests:service=SecuritySpecLoginConfig">
+      <attribute name="AuthConfig">META-INF/spec-test-config.xml</attribute>
+      <depends optional-attribute-name="LoginConfigService">
+         jboss.security:service=XMLLoginConfig
+      </depends>
+      <depends optional-attribute-name="SecurityManagerService">
+         jboss.security:service=JaasSecurityManager
+      </depends>
+   </mbean>
+
+   <!-- A JaasSecurityDomain setup to test that changes to the security
+   layer do not affect the ability to use this subclass of JaasSecurityManager
+   -->
+   <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
+      name="jboss.security:service=JaasSecurityDomain,domain=spec-test-domain">
+      <constructor>
+         <arg type="java.lang.String" value="spec-test-domain"/>
+      </constructor>
+      <attribute name="KeyStoreURL">resource:tst.keystore</attribute>
+      <attribute name="KeyStorePass">unit-tests</attribute>
+      <attribute name="Salt">abcdefgh</attribute>
+      <attribute name="IterationCount">13</attribute>
+   </mbean>
+
+</server>

Added: trunk/ejb3/src/resources/test/security-spec/META-INF/spec-test-config.xml
===================================================================
--- trunk/ejb3/src/resources/test/security-spec/META-INF/spec-test-config.xml	                        (rev 0)
+++ trunk/ejb3/src/resources/test/security-spec/META-INF/spec-test-config.xml	2007-09-06 21:09:08 UTC (rev 65202)
@@ -0,0 +1,36 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+      "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The JAAS login configuration file for the java:/jaas/spec-test
+security domain used by the security-spec test case
+-->
+<policy>
+
+    <application-policy name = "spec-test">
+       <authentication>
+          <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+             flag = "required">
+             <module-option name = "unauthenticatedIdentity">anonymous</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+   <application-policy name = "spec-test-domain">
+      <authentication>
+         <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+            flag = "required">
+            <module-option name = "unauthenticatedIdentity">anonymous</module-option>
+         </login-module>
+      </authentication>
+   </application-policy>
+   <application-policy name = "spec-test-domain2">
+      <authentication>
+         <login-module code = "org.jboss.ejb3.test.security.UsersRoles2LoginModule"
+            flag = "required">
+         </login-module>
+      </authentication>
+   </application-policy>
+
+</policy>

Added: trunk/ejb3/src/resources/test/security-spec/tst.keystore
===================================================================
(Binary files differ)


Property changes on: trunk/ejb3/src/resources/test/security-spec/tst.keystore
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java	2007-09-06 21:07:21 UTC (rev 65201)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/security/unit/EJBSpecUnitTestCase.java	2007-09-06 21:09:08 UTC (rev 65202)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.security.unit;
 
 import java.util.HashSet;
-import javax.ejb.EJBException;
+
 import javax.jms.Message;
 import javax.jms.Queue;
 import javax.jms.QueueConnection;
@@ -37,6 +37,9 @@
 import javax.naming.InitialContext;
 import javax.security.auth.login.Configuration;
 import javax.security.auth.login.LoginContext;
+
+import junit.framework.Test;
+
 import org.jboss.ejb3.test.security.AppCallbackHandler;
 import org.jboss.ejb3.test.security.CalledSession;
 import org.jboss.ejb3.test.security.SecurityContext;
@@ -48,7 +51,6 @@
 import org.jboss.security.auth.login.XMLLoginConfigImpl;
 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
 import org.jboss.test.JBossTestCase;
-import junit.framework.Test;
 
 
 /** Test of EJB spec conformace using the security-spec.jar
@@ -610,7 +612,7 @@
 {
    try {
       Configuration.setConfiguration(new XMLLoginConfigImpl());
-      return getDeploySetup(EJBSpecUnitTestCase.class, "security.jar");
+      return getDeploySetup(EJBSpecUnitTestCase.class, "security.jar,security-spec.sar");
    }
    catch (Exception e)
    {




More information about the jboss-cvs-commits mailing list