Author: jim.ma
Date: 2009-12-04 03:47:35 -0500 (Fri, 04 Dec 2009)
New Revision: 11192
Added:
stack/cxf/trunk/modules/testsuite/src/test/resources/securityMgr/jboss-5.1.0.GA/client.policy
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2692]:Added client.policy and security manager args line for surefire plugin
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2009-12-03 17:15:29 UTC (rev 11191)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2009-12-04 08:47:35 UTC (rev 11192)
@@ -445,6 +445,7 @@
<properties>
<jboss.version>5.1.0.GA</jboss.version>
<jbossws.integration.target>jboss510</jbossws.integration.target>
+ <!--security.manager.args>-Djava.home=${java.home}
-Djboss.home=${jboss510.home} -Dtarget.dir=${project.build.directory}
-Djava.security.debug=failure -Djava.security.manager
-Djava.security.policy==${basedir}/../src/test/resources/securityMgr/jboss-${jboss.version}/client.policy
-DM2_REPO=${settings.localRepository}</security.manager.args-->
</properties>
<dependencies>
<dependency>
@@ -467,6 +468,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
+
<configuration>
<!--
http://jira.codehaus.org/browse/MCOMPILER-72 -->
<testExcludeFile>../test-excludes-jboss510.txt</testExcludeFile>
@@ -475,7 +477,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.jvm.args} ${surefire.jvm.management.args}
-Djava.endorsed.dirs=${jboss510.home}/lib/endorsed</argLine>
+ <argLine>${surefire.jvm.args} ${surefire.jvm.management.args}
-Djava.endorsed.dirs=${jboss510.home}/lib/endorsed
${security.manager.args}</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
Added:
stack/cxf/trunk/modules/testsuite/src/test/resources/securityMgr/jboss-5.1.0.GA/client.policy
===================================================================
---
stack/cxf/trunk/modules/testsuite/src/test/resources/securityMgr/jboss-5.1.0.GA/client.policy
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/src/test/resources/securityMgr/jboss-5.1.0.GA/client.policy 2009-12-04
08:47:35 UTC (rev 11192)
@@ -0,0 +1,62 @@
+// Permissions for jbossws cxf test suite
+
+// Trusted core Java code
+grant codeBase "file:${java.home}/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+//for javac
+grant codeBase "file:${java.home}/../lib" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${java.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+
+//trust all jars in m2_repo
+grant codeBase "file:${M2_REPO}/-" {
+ permission java.security.AllPermission;
+};
+
+grant {
+ //allow surefire to read compiled class in target dir, WSConsumerTestCase javac needs
execute permission
+ permission java.io.FilePermission "<<ALL FILES>>", "execute,
read";
+ permission java.util.PropertyPermission "*", "read,write";
+ permission java.util.logging.LoggingPermission "control";
+ //for test
+ permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+ permission java.lang.RuntimePermission "accessDeclaredMembers";
+ permission java.net.SocketPermission "*", "connect,resolve";
+ permission java.lang.RuntimePermission "createClassLoader";
+ permission java.lang.RuntimePermission "setContextClassLoader";
+ //AsymmetricBindingClientTestCase
+ permission java.security.SecurityPermission "insertProvider.BC";
+ permission java.security.SecurityPermission "putProviderProperty.BC";
+ permission java.lang.RuntimePermission "getClassLoader";
+
+ permission java.lang.RuntimePermission "accessClassInPackage.*";
+ permission java.io.SerializablePermission "enableSubstitution";
+ permission javax.xml.ws.WebServicePermission "publishEndpoint";
+ permission java.lang.RuntimePermission "getenv.*";
+
+ permission java.io.FilePermission "${java.home}/-", "execute";
+
+ permission java.io.FilePermission "${jboss.home}/bin/-",
"execute";
+
+ permission java.net.SocketPermission "*","accept,listen,resolve";
+ permission java.security.SecurityPermission "getPolicy";
+
+ permission java.io.FilePermission "${target.dir}/-",
"write,delete";
+
+ //WSConsumerTestCase
+ permission java.io.FilePermission "./-", "write,delete";
+
+ permission java.io.FilePermission "/tmp/-", "write,delete";
+ permission java.lang.RuntimePermission "shutdownHooks";
+ permission java.lang.RuntimePermission "getProtectionDomain";
+};
+
+
+
+