From: Anil S. <ani...@jb...> - 2006-05-01 22:09:21
|
User: asaldhana Date: 06/05/01 18:09:19 Modified: jbosstest Tag: Branch_4_0 build.xml Log: JBAS-2519: Provide a seperate server configuration and tests "jacc-security-external" Revision Changes Path No revision No revision 1.406.2.186 +86 -1 jbosstest/build.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: build.xml =================================================================== RCS file: /cvsroot/jboss/jbosstest/build.xml,v retrieving revision 1.406.2.185 retrieving revision 1.406.2.186 diff -u -b -r1.406.2.185 -r1.406.2.186 --- build.xml 1 May 2006 04:02:15 -0000 1.406.2.185 +++ build.xml 1 May 2006 22:09:18 -0000 1.406.2.186 @@ -12,7 +12,7 @@ <!-- ============================================================ --> -<!-- $Id: build.xml,v 1.406.2.185 2006/05/01 04:02:15 bstansberry Exp $ --> +<!-- $Id: build.xml,v 1.406.2.186 2006/05/01 22:09:18 asaldhana Exp $ --> <project default="main" name="JBoss/Testsuite" xmlns:server="http://jboss.org/ns/test/ant/server"> @@ -637,10 +637,14 @@ <include name="org/jboss/test/cmp2/relationship/*TestCase.class" /> <include name="org/jboss/test/cmp2/simple/SimpleUnitTestCase.class" /> <include name="org/jboss/test/webservice/jbws309/*TestCase.class"/> + <exclude name="org/jboss/test/jacc/test/external/*TestCase.class"/> </patternset> <patternset id="jacc.excludes"> <exclude name="**/test/jacc/test/*"/> </patternset> + <patternset id="jacc.external.includes"> + <include name="org/jboss/test/jacc/test/external/*TestCase.class"/> + </patternset> <patternset id="custom-secmgr.includes"> <include name="**/test/**/CustomSecurityManagerTestCase.class"/> </patternset> @@ -1795,6 +1799,87 @@ <wait-on-shutdown conf="jacc-securitymgr"/> </target> + <target name="tests-jacc-security-external" + description="Tests run against a jboss server with JACC configured with an + external policy provider"> + <create-config baseconf="default" newconf="jacc-security-external" newconf-src="jacc"> + <patternset> + <include name="conf/**"/> + <include name="deploy/hsqldb-ds.xml"/> + <include name="deploy/jbossweb*.sar/**"/> + <include name="deploy/jbossws.sar/**"/> + <include name="deploy/jbossws14.sar/**"/> + <include name="deploy/client-deployer-service.xml"/> + <include name="deploy/ear-deployer.xml"/> + <include name="deploy/ejb-deployer.xml"/> + <include name="deploy/jmx-invoker-service.xml"/> + <include name="deploy/jmx-console.war/**"/> + <include name="deploy/jbossjca-service.xml"/> + <include name="deploy/jboss-local-jdbc.rar"/> + <include name="deploy/mail-service.xml"/> + <include name="deploy/jms/**"/> + <include name="lib/**"/> + <include name="deploy/jboss-aop.deployer/**"/> + <include name="deploy/jboss-aop-jdk50.deployer/**"/> + <include name="deploy/ejb3-interceptors-aop.xml"/> + <include name="deploy/ejb3.deployer/**"/> + </patternset> + </create-config> + <!-- --> + <unzip dest="${jboss.dist}/server/jacc-security-external/deploy/jbossweb-tomcat55.sar"> + <fileset dir="${jboss.dist}/server/jacc-security-external/deploy/jbossweb-tomcat55.sar"> + <patternset> + <exclude name="META-INF/*"/> + </patternset> + <include name="jasper-compiler.jar" /> + <include name="jasper-compiler-jdt.jar" /> + </fileset> + </unzip> + <!-- Copy the jacc securityconstraint provider jar --> + <copy todir="${jboss.dist}/server/jacc-security-external/lib" + file="${build.lib}/jacc-securityconstraint.jar"/> + <!-- Append extra attributes to the JACCAuthorizationRealm --> + <replace file="${jboss.dist}/server/jacc-security-external/deploy/jbossweb-tomcat55.sar/server.xml"> + <replacetoken><![CDATA[JaccAuthorizationRealm"]]></replacetoken> + <replacevalue><![CDATA[JaccAuthorizationRealm" unprotectedResourceDelegation="true" securityConstraintProviderClass="org.jboss.test.security.test.CustomSecurityConstraintProvider" ]]></replacevalue> + </replace> + <!-- Replace the policy provider with the test provider --> + <replace file="${jboss.dist}/server/jacc-security-external/deploy/jacc-service.xml"> + <replacetoken><![CDATA[org.jboss.security.jacc.DelegatingPolicy]]></replacetoken> + <replacevalue><![CDATA[org.jboss.test.jacc.test.external.TestExternalPolicyProvider]]></replacevalue> + </replace> + + <server:start name="jacc-security-external"/> + + <mkdir dir="${build.reports}"/> + <mkdir dir="${build.testlog}"/> + <waitfor maxwait="60" maxwaitunit="second" + checkevery="5" checkeveryunit="second" timeoutproperty="startup.timeout"> + <http url="http://${node0}:8080/"/> + </waitfor> + <fail message="Timeout waiting for server to start" if="startup.timeout"/> + <property name="jbosstest.secure" value="true"/> + <property name="jboss.security.jacc" value="true" /> + <property name="java.security.auth.login.config" + value="${build.resources}/security/auth.conf"/> + <propertyset id="jacc-tests-props"> + <propertyref prefix="java.security.auth"/> + </propertyset> + + <propertyset id="jacc-tests-props"> + <propertyref prefix="java.security.auth"/> + <propertyref prefix="jboss.security"/> + </propertyset> + + <run-junit junit.patternset="jacc.external.includes" + junit.configuration="jacc-security-external" + junit.syspropertyset="jacc-tests-props" /> + + <stop-jboss/> + <wait-on-shutdown conf="jacc-security-external"/> + </target> + + <!-- Tests of the custom security manager plugin --> <target name="tests-custom-securitymgr" description="Tests run against a jboss server with custom security manager configured"> |