JBoss Remoting SVN: r3906 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-05 02:55:40 -0400 (Sat, 05 Apr 2008)
New Revision: 3906
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-920: Elaborated echo messages for http.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-04-05 06:49:11 UTC (rev 3905)
+++ remoting2/branches/2.x/build.xml 2008-04-05 06:55:40 UTC (rev 3906)
@@ -1044,6 +1044,7 @@
<target name="tests.functional.main.core" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
<mkdir dir="${output.tests.tmp}"/>
+ <echo>bisocket/rmi/socket: ${metadata}</echo>
<junit
printsummary="true" fork="yes" includeantruntime="true"
tempdir="${output.tests.tmp}" maxmemory="1024m">
@@ -1286,7 +1287,7 @@
<target name="tests.functional.main.http.core" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
<mkdir dir="${output.tests.tmp}"/>
- <echo>http with ${version}</echo>
+ <echo>http with ${version}: ${metadata}</echo>
<junit
printsummary="true" fork="yes" includeantruntime="true"
tempdir="${output.tests.tmp}" maxmemory="1024m">
18 years
JBoss Remoting SVN: r3905 - remoting2/branches/2.x/src/main/org/jboss/remoting/callback.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-05 02:49:11 -0400 (Sat, 05 Apr 2008)
New Revision: 3905
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java
Log:
JBREM-934: Put new FileInputStream() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java 2008-04-05 05:26:02 UTC (rev 3904)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java 2008-04-05 06:49:11 UTC (rev 3905)
@@ -360,7 +360,23 @@
// of the list is automatically ordered by the OS and all file names are numeric by time.
String separator = SystemUtility.getSystemProperty("file.separator");
objectFilePath = filePath + separator + objectFileList[0];
- inFile = new FileInputStream(objectFilePath);
+
+ try
+ {
+ final String finalObjectFilePath = objectFilePath;
+ inFile = (FileInputStream)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws FileNotFoundException
+ {
+ return new FileInputStream(finalObjectFilePath);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (IOException) e.getCause();
+ }
+
in = SerializationStreamFactory.getManagerInstance(serializationType).createRegularInput(inFile);
try
18 years
JBoss Remoting SVN: r3904 - remoting2/branches/2.x/src/etc.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-05 01:26:02 -0400 (Sat, 05 Apr 2008)
New Revision: 3904
Modified:
remoting2/branches/2.x/src/etc/remoting.security.policy.tests
Log:
JBREM-920, JBREM-934: (1) Added permissions for CallbackStore;(2) replaced '/' with ${/} in file paths.
Modified: remoting2/branches/2.x/src/etc/remoting.security.policy.tests
===================================================================
--- remoting2/branches/2.x/src/etc/remoting.security.policy.tests 2008-04-05 05:24:32 UTC (rev 3903)
+++ remoting2/branches/2.x/src/etc/remoting.security.policy.tests 2008-04-05 05:26:02 UTC (rev 3904)
@@ -6,9 +6,12 @@
//******************************************************************
grant codeBase "file:${build.home}/output/classes/-"
{
- // Permission to read the test keystore
- permission java.io.FilePermission "${build.home}/output/tests/classes/-", "read";
+ // Permission to read test keystores
+ permission java.io.FilePermission "${build.home}${/}output${/}tests${/}classes${/}-", "read";
+ // Permission for org.jboss.remoting.callback.CallbackStore
+ permission java.io.FilePermission "${build.home}${/}output${/}tests${/}classes${/}-", "read, write, delete";
+
// org.jboss.test.remoting.detection.metadata.MetadataTestCase
permission javax.management.MBeanPermission "org.jboss.test.remoting.detection.metadata.MetadataTestCase$TestNetworkRegistry#-[remoting:type=NetworkRegistry]", "isInstanceOf";
@@ -26,7 +29,7 @@
//***************************************************
grant codeBase "file:${build.home}/output/tests/classes/-"
{
- permission java.io.FilePermission "${build.home}/output/tests/classes/org/jboss/test/remoting/classloader/race/test.jar", "read";
+ permission java.io.FilePermission "${build.home}${/}output${/}tests${/}classes${/}org${/}jboss${/}test${/}remoting${/}classloader${/}race${/}test.jar", "read";
// Used by the descendents of org.jboss.test.remoting.shutdown.ShutdownTestParent.
permission java.io.FilePermission "<<ALL FILES>>", "execute";
18 years
JBoss Remoting SVN: r3903 - remoting2/branches/2.x/src/etc.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-05 01:24:32 -0400 (Sat, 05 Apr 2008)
New Revision: 3903
Modified:
remoting2/branches/2.x/src/etc/remoting.security.policy.core
Log:
JBREM-920, JBREM-934: (1) Added java.io.FilePermission "*", "read, write"; for Identity;(2) replaced '/' with ${/} in file paths.
Modified: remoting2/branches/2.x/src/etc/remoting.security.policy.core
===================================================================
--- remoting2/branches/2.x/src/etc/remoting.security.policy.core 2008-04-04 22:58:55 UTC (rev 3902)
+++ remoting2/branches/2.x/src/etc/remoting.security.policy.core 2008-04-05 05:24:32 UTC (rev 3903)
@@ -40,7 +40,7 @@
// This permission might need to be changed, depending on where the CallbackStore
// is configured to exist, according to system property "jboss.server.data.dir".
// The default location is <current directory>/data.
- permission java.io.FilePermission "./data", "read, write, delete";
+ permission java.io.FilePermission ".${/}data", "read, write, delete";
// Permission for org.jboss.remoting.ident.Identity to create and read "jboss.identity" file.
// This permission might need to be changed, depending on the directory in which the
@@ -50,7 +50,7 @@
// 2. the "jboss.identity.dir" system property, if that property exists, or
// 3. the current directory.
permission java.io.FilePermission ".", "read, write";
-// permission java.io.FilePermission "-", "read, write";
+ permission java.io.FilePermission "*", "read, write";
/////////////////////////////////////////////////////////////////////////////////////////////
@@ -198,10 +198,10 @@
/////////////////////////////////////////////////////////////////////////////////////////////
// TODO - We should use a version of JBoss logging + log4j that does this stuff in privileged blocks
- permission java.io.FilePermission "${build.home}/src/etc/log4j.properties", "read";
- permission java.io.FilePermission "${build.home}/src/etc/log4j.xml", "read";
- permission java.io.FilePermission "${build.home}/lib/apache-log4j/lib/log4j.jar", "read";
- permission java.io.FilePermission "${build.home}/output/classes/-", "read";
+ permission java.io.FilePermission "${build.home}${/}src${/}etc${/}log4j.properties", "read";
+ permission java.io.FilePermission "${build.home}${/}src${/}etc${/}log4j.xml", "read";
+ permission java.io.FilePermission "${build.home}${/}lib${/}apache-log4j${/}lib${/}log4j.jar", "read";
+ permission java.io.FilePermission "${build.home}${/}output${/}classes${/}-", "read";
permission java.lang.RuntimePermission "accessClassInPackage.*";
permission java.util.PropertyPermission "org.jboss.logging.Logger.pluginClass", "read";
permission java.util.PropertyPermission "log4j.defaultInitOverride", "read";
18 years
JBoss Remoting SVN: r3902 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-04 18:58:55 -0400 (Fri, 04 Apr 2008)
New Revision: 3902
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-920, JBREM-934: (1) Creates security policy files; (2) created strict security suite.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-04-04 22:47:48 UTC (rev 3901)
+++ remoting2/branches/2.x/build.xml 2008-04-04 22:58:55 UTC (rev 3902)
@@ -29,13 +29,6 @@
<property name="compile.source" value="${ant.java.version}"/>
<property name="compile.target" value="${ant.java.version}"/>
- <!-- set the security manager information for unit tests -->
- <property name="java.security.policy" value="${basedir}/test.policy"/>
- <property name="java.security.manager" value=""/>
- <!--<property name="java.security.manager" value="org.jboss.test.security.LoggingSecurityManager"/>-->
- <!--<property name="java.security.debug" value="access,failure"/>-->
- <property name="java.security.debug" value=""/>
-
<!-- ================================================================== -->
<!-- Sets bind address and port used by jrunit/jgroups multicast socket -->
<!-- ================================================================== -->
@@ -161,7 +154,7 @@
<property name="receiveOnAllInterfaces" value="false"/>
<echo>receiveOnAllInterfaces: ${receiveOnAllInterfaces}</echo>
</target>
-
+
<target name="setSendOnAllInterfaces"
depends="setSendOnAllInterfaces.sub,
setSendOnAllInterfaces.isset.true,
@@ -253,7 +246,7 @@
<property name="output.tests.classes" value="${output.dir}/tests/classes"/>
<property name="output.tests.results" value="${output.dir}/tests/results"/>
<property name="output.tests.performance" value="${output.dir}/tests/performance"/>
- <property name="output.tests.tmp" value="${output.dir}/tests/tmp"/>
+ <property name="output.tests.tmp" value="${output.dir}/tests/tmp"/>
<property name="manifest.file" value="${output.etc.dir}/default.mf"/>
@@ -305,7 +298,7 @@
<pathelement path="${ant.library.dir}/ant-junit.jar"/>
<pathelement location="${tests.compile.dir}"/>
<path refid="library.classpath.tomcat"/>
- <pathelement path="${output.lib.dir}/jboss-remoting.jar"/>
+ <!--pathelement path="${output.lib.dir}/jboss-remoting.jar"/-->
<pathelement path="${jdbc-driver-jar}"/>
</path>
@@ -340,6 +333,28 @@
<property name="perf.seq.payloadsize" value="1024"/>
<property name="perf.seq.dojava" value="yes"/>
<property name="perf.seq.dojboss" value="yes"/>
+
+ <!-- set the security manager information for unit tests -->
+ <property name="java.security.policy" value="${etc.dir}/remoting.security.policy"/>
+ <property name="java.security.policy.strict" value="${etc.dir}/remoting.security.policy.strict"/>
+ <property name="java.security.manager" value=""/>
+ <!--<property name="java.security.manager" value="org.jboss.test.security.LoggingSecurityManager"/>-->
+ <!--<property name="java.security.debug" value="access,failure"/>-->
+ <property name="java.security.debug" value=""/>
+
+ <!-- Create security policy file -->
+ <concat destfile="${etc.dir}/remoting.security.policy">
+ <filelist dir="${etc.dir}"
+ files="remoting.security.policy.core,
+ remoting.security.policy.tests"/>
+ </concat>
+
+ <!-- Create strict security policy file -->
+ <concat destfile="${etc.dir}/remoting.security.policy.strict">
+ <filelist dir="${etc.dir}"
+ files="remoting.security.policy.core,
+ remoting.security.policy.tests.minimal"/>
+ </concat>
</target>
<!-- ================================================================== -->
@@ -495,7 +510,7 @@
<include name="connector.xsd"/>
</fileset>
</jar>
-
+
<jar jarfile="${output.lib.dir}/jboss-remoting-src.jar"
manifest="${manifest.file}">
<fileset dir="${src.dir}">
@@ -717,7 +732,7 @@
<!-- ================================================================== -->
<target name="one-test" if="test" description="Execute a single test." depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<path refid="tests.classpath"/>
@@ -793,6 +808,17 @@
<param name="metadata" value="serializationtype=java"/>
<param name="jboss-junit-configuration" value="java_serialization"/>
</antcall>
+ <antcall target="tests.functional.main.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=java"/>
+ <param name="jboss-junit-configuration" value="java_serialization_security"/>
+ </antcall>
+ <!-- there are a few tests that will only run under jdk 1.5 (with/without jboss serialization -->
+ <antcall target="tests.functional.main.isJDK5" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=java"/>
+ <param name="jboss-junit-configuration" value="java_serialization"/>
+ </antcall>
<antcall target="tests.marshall" inheritrefs="true">
</antcall>
</target>
@@ -803,6 +829,11 @@
<param name="metadata" value="serializationtype=java"/>
<param name="jboss-junit-configuration" value="java_serialization"/>
</antcall>
+ <antcall target="tests.functional.main.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=java"/>
+ <param name="jboss-junit-configuration" value="java_serialization_security"/>
+ </antcall>
<antcall target="tests.marshall" inheritrefs="true">
</antcall>
</target>
@@ -814,17 +845,17 @@
<param name="metadata" value="serializationtype=jboss"/>
<param name="jboss-junit-configuration" value="jboss_serialization"/>
</antcall>
+ <antcall target="tests.functional.main.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=jboss"/>
+ <param name="jboss-junit-configuration" value="jboss_serialization_security"/>
+ </antcall>
<!-- there are a few tests that will only run under jdk 1.5 (with/without jboss serialization -->
<antcall target="tests.functional.main.isJDK5" inheritrefs="true">
<param name="remoting.metadata.key" value="remoting.metadata"/>
<param name="metadata" value="serializationtype=jboss"/>
<param name="jboss-junit-configuration" value="jboss_serialization"/>
</antcall>
- <antcall target="tests.functional.main.isJDK5" inheritrefs="true">
- <param name="remoting.metadata.key" value="remoting.metadata"/>
- <param name="metadata" value="serializationtype=java"/>
- <param name="jboss-junit-configuration" value="java_serialization"/>
- </antcall>
<antcall target="tests.nonserializable" inheritrefs="true"/>
<antcall target="tests.functional.main.serialization.jboss" inheritrefs="true"/>
</target>
@@ -835,6 +866,11 @@
<param name="metadata" value="serializationtype=jboss"/>
<param name="jboss-junit-configuration" value="jboss_serialization"/>
</antcall>
+ <antcall target="tests.functional.main.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=jboss"/>
+ <param name="jboss-junit-configuration" value="jboss_serialization_security"/>
+ </antcall>
<antcall target="tests.nonserializable" inheritrefs="true"/>
<antcall target="tests.functional.main.serialization.jboss" inheritrefs="true"/>
</target>
@@ -871,6 +907,13 @@
<param name="classpath" value="tests.classpath"/>
<param name="version" value="jbossweb"/>
</antcall>
+ <antcall target="tests.functional.main.http.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=${serialization}"/>
+ <param name="jboss-junit-configuration" value="${serialization}_serialization_jbossweb_security"/>
+ <param name="classpath" value="tests.classpath"/>
+ <param name="version" value="jbossweb"/>
+ </antcall>
</target>
<target name="tests.functional.http.tomcat">
@@ -881,6 +924,13 @@
<param name="classpath" value="tests.classpath.tomcat"/>
<param name="version" value="tomcat"/>
</antcall>
+ <antcall target="tests.functional.main.http.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=${serialization}"/>
+ <param name="jboss-junit-configuration" value="${serialization}_serialization_tomcat_security"/>
+ <param name="classpath" value="tests.classpath.tomcat"/>
+ <param name="version" value="tomcat"/>
+ </antcall>
</target>
<target name="tests.functional.http.core" depends="configure">
@@ -914,6 +964,13 @@
<param name="classpath" value="tests.classpath"/>
<param name="version" value="jbossweb"/>
</antcall>
+ <antcall target="tests.functional.main.http.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=${serialization}"/>
+ <param name="jboss-junit-configuration" value="${serialization}_serialization_jbossweb_security"/>
+ <param name="classpath" value="tests.classpath"/>
+ <param name="version" value="jbossweb"/>
+ </antcall>
</target>
<target name="tests.functional.http.tomcat.core">
@@ -924,11 +981,19 @@
<param name="classpath" value="tests.classpath.tomcat"/>
<param name="version" value="tomcat"/>
</antcall>
+ <antcall target="tests.functional.main.http.security" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=${serialization}"/>
+ <param name="jboss-junit-configuration" value="${serialization}_serialization_tomcat_security"/>
+ <param name="classpath" value="tests.classpath.tomcat"/>
+ <param name="version" value="tomcat"/>
+ </antcall>
</target>
<target name="tests.functional.main" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
+ <echo>bisocket/rmi/socket: ${metadata}</echo>
<junit
printsummary="true" fork="yes" includeantruntime="true"
tempdir="${output.tests.tmp}" maxmemory="1024m">
@@ -978,7 +1043,7 @@
<target name="tests.functional.main.core" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit
printsummary="true" fork="yes" includeantruntime="true"
tempdir="${output.tests.tmp}" maxmemory="1024m">
@@ -1033,10 +1098,50 @@
</batchtest>
</junit>
</target>
+
+ <target name="tests.functional.main.security" depends="tests.jars">
+ <mkdir dir="${output.tests.results}"/>
+ <mkdir dir="${output.tests.tmp}"/>
+ <echo>bisocket/rmi/socket (strict security): ${metadata}</echo>
+ <junit
+ printsummary="true" fork="yes" includeantruntime="true"
+ tempdir="${output.tests.tmp}" maxmemory="1024m">
+ <jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="tests.classpath"/>
+ </classpath>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
+ <sysproperty key="java.security.policy" value="${java.security.policy.strict}"/>
+ <sysproperty key="java.security.debug" value="${java.security.debug}"/>
+ <sysproperty key="build.home" value="${basedir}"/>
+ <sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
+ <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
+ <sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
+ <sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
+ <sysproperty key="jrunit.mcast_port" value="${multicast.port}"/>
+ <sysproperty key="jrunit.receive_on_all_interfaces" value="${receiveOnAllInterfaces}"/>
+ <sysproperty key="jrunit.send_on_all_interfaces" value="${sendOnAllInterfaces}"/>
+ <sysproperty key="jrunit.send_interfaces" value="${sendInterfaces}"/>
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-${jboss-junit-configuration}.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
+ haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include name="**/remoting/transport/bisocket/BisocketInvokerTestCase.class"/>
+ <include name="**/remoting/transport/bisocket/ssl/custom/SSLBisocketInvokerTestCase.class"/>
+ <include name="**/remoting/transport/rmi/RMIInvokerSerializableMarshallerTestCase.class"/>
+ <include name="**/remoting/transport/rmi/ssl/custom/RMIInvokerTestCase.class"/>
+ <include name="**/remoting/transport/socket/SocketInvokerTestCase.class"/>
+ <include name="**/remoting/transport/socket/ssl/custom/InvokerTestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
<target name="tests.functional.main.isJDK5" depends="tests.jars" if="isJDK5">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
@@ -1054,7 +1159,7 @@
<sysproperty key="jrunit.receive_on_all_interfaces" value="${receiveOnAllInterfaces}"/>
<sysproperty key="jrunit.send_on_all_interfaces" value="${sendOnAllInterfaces}"/>
<sysproperty key="jrunit.send_interfaces" value="${sendInterfaces}"/>
- <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
<batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
@@ -1067,7 +1172,7 @@
<target name="tests.functional.main.isJDK5.core" depends="tests.jars" if="isJDK5">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
@@ -1087,7 +1192,7 @@
<sysproperty key="jrunit.send_on_all_interfaces" value="${sendOnAllInterfaces}"/>
<sysproperty key="jrunit.send_interfaces" value="${sendInterfaces}"/>
- <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
<batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
@@ -1100,11 +1205,11 @@
<target name="tests.functional.main.http" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
- <echo>http with ${version}</echo>
+ <mkdir dir="${output.tests.tmp}"/>
+ <echo>http with ${version}: ${metadata}</echo>
<junit
printsummary="true" fork="yes" includeantruntime="true"
- tempdir="${output.tests.tmp}" maxmemory="1024m">
+ tempdir="${output.tests.tmp}" maxmemory="1024m">
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
<classpath>
@@ -1142,9 +1247,45 @@
</junit>
</target>
+ <target name="tests.functional.main.http.security" depends="tests.jars">
+ <mkdir dir="${output.tests.results}"/>
+ <mkdir dir="${output.tests.tmp}"/>
+ <echo>http (strict security) with ${version}: ${metadata}</echo>
+ <junit
+ printsummary="true" fork="yes" includeantruntime="true"
+ tempdir="${output.tests.tmp}" maxmemory="1024m">
+ <jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="${classpath}"/>
+ </classpath>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
+ <sysproperty key="java.security.policy" value="${java.security.policy.strict}}"/>
+ <sysproperty key="java.security.debug" value="${java.security.debug}"/>
+ <sysproperty key="build.home" value="${basedir}"/>
+ <sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
+ <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
+ <sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
+ <sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
+ <sysproperty key="jrunit.mcast_port" value="${multicast.port}"/>
+ <sysproperty key="jrunit.receive_on_all_interfaces" value="${receiveOnAllInterfaces}"/>
+ <sysproperty key="jrunit.send_on_all_interfaces" value="${sendOnAllInterfaces}"/>
+ <sysproperty key="jrunit.send_interfaces" value="${sendInterfaces}"/>
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-${jboss-junit-configuration}.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
+ haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include name="**/remoting/transport/http/HTTPInvokerTestCase.class"/>
+ <include name="**/remoting/transport/http/ssl/custom/HTTPSInvokerTestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
<target name="tests.functional.main.http.core" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>http with ${version}</echo>
<junit
printsummary="true" fork="yes" includeantruntime="true"
@@ -1197,7 +1338,7 @@
<!-- tests for sending of non-serializable payloads. -->
<target name="tests.nonserializable" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
@@ -1229,7 +1370,7 @@
<target name="tests.functional.main.serialization.jboss" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<path refid="tests.classpath"/>
@@ -1291,7 +1432,7 @@
<target name="tests.socket" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.metadata=${metadata}"/>
@@ -1322,7 +1463,7 @@
<!-- Tests dynamic, remote loading of marshaller/unmarshaller -->
<target name="tests.marshall" depends="tests.jars" if="os.windows">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<!-- THIS IS IMPORTANT THAT USE MARSHALL SPECIFIC CLASSPATH -->
@@ -1426,7 +1567,7 @@
<param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
<param name="check_content_type" value="true"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP5 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
@@ -1450,7 +1591,7 @@
<param name="check_connection" value="false"/>
<param name="check_content_type" value="true"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP4 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
@@ -1474,7 +1615,7 @@
<param name="check_connection" value="false"/>
<param name="check_content_type" value="true"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP2 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
@@ -1522,7 +1663,7 @@
<param name="check_connection" value="false"/>
<param name="check_content_type" value="true"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.GA -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
@@ -1570,7 +1711,7 @@
<param name="check_connection" value="false"/>
<param name="check_content_type" value="false"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.0.SP4 -->
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
@@ -1594,7 +1735,7 @@
<param name="check_connection" value="false"/>
<param name="check_content_type" value="false"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.0.0.GA -->
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
@@ -1630,7 +1771,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_6_GA-server"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_6_GA/jboss-remoting.jar"/>
@@ -1641,9 +1782,9 @@
<param name="server.version" value=""/>
<param name="check_content_type" value="false"/>
</antcall>
-
+
<antcall target="tests.versioning.socket" inheritrefs="true">
- <param name="version" value="1_4_6_GA"/>
+ <param name="version" value="1_4_6_GA"/>
</antcall>
<!-- ******************************************************************************** -->
@@ -1657,7 +1798,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_4_GA-server"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_4_GA/jboss-remoting.jar"/>
@@ -1668,7 +1809,7 @@
<param name="server.version" value=""/>
<param name="check_content_type" value="false"/>
</antcall>
-
+
<antcall target="tests.versioning.socket" inheritrefs="true">
<param name="version" value="1_4_4_GA"/>
</antcall>
@@ -1684,7 +1825,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_3_GA-server"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_3_GA/jboss-remoting.jar"/>
@@ -1695,11 +1836,11 @@
<param name="server.version" value=""/>
<param name="check_content_type" value="false"/>
</antcall>
-
+
<antcall target="tests.versioning.socket" inheritrefs="true">
<param name="version" value="1_4_3_GA"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 1.4.0.final -->
<!--antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
@@ -1711,7 +1852,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_0_final-server"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_0_final/jboss-remoting.jar"/>
@@ -1722,16 +1863,16 @@
<param name="server.version" value=""/>
<param name="check_content_type" value="false"/>
</antcall-->
-
- <!-- 1.4.0.final does not allow turning off socket connection check -->
+
+ <!-- 1.4.0.final does not allow turning off socket connection check -->
<!--antcall target="tests.versioning.socket.1.4.0" inheritrefs="true">
<param name="version" value="1_4_0_final"/>
</antcall-->
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 1.2.1.final -->
<!-- Compatibility is not guaranteed with 1.2.1.final
-
+
<antcall target="tests.versioning.all_but_socket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_2_1_final-client"/>
<param name="client.classpath" value="${etc.dir}/lib/remoting_1_2_1_final/jboss-remoting.jar"/>
@@ -1741,7 +1882,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.all_but_socket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_2_1_final-server"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_1_2_1_final/jboss-remoting.jar"/>
@@ -1751,9 +1892,9 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.socket.1.4.0" inheritrefs="true">
- <param name="version" value="1_2_1_final"/>
+ <param name="version" value="1_2_1_final"/>
</antcall>
-->
</target>
@@ -1784,7 +1925,7 @@
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<path refid="third_party.classpath"/>
@@ -1813,7 +1954,7 @@
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
@@ -1844,12 +1985,12 @@
</batchtest>
</junit>
</target>
-
+
<target name="tests.versioning.all_transports_pre_2.4"
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
@@ -1881,12 +2022,12 @@
</batchtest>
</junit>
</target>
-
+
<target name="tests.versioning.all_transports_but_bisocket"
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
@@ -1906,7 +2047,7 @@
<sysproperty key="java.security.debug" value="${java.security.debug}"/>
<sysproperty key="build.home" value="${basedir}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
- <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
<batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
@@ -1919,12 +2060,12 @@
</batchtest>
</junit>
</target>
-
+
<target name="tests.versioning.all_but_socket_and_bisocket"
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
@@ -1943,27 +2084,27 @@
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="java.security.debug" value="${java.security.debug}"/>
<sysproperty key="build.home" value="${basedir}"/>
- <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
<batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
<fileset dir="${tests.compile.dir}">
<include name="**/remoting/versioning/transport/**/*TestCase.class"/>
- <exclude name="**/bisocket/**"/>
- <exclude name="**/socket/**"/>
+ <exclude name="**/bisocket/**"/>
+ <exclude name="**/socket/**"/>
<exclude name="**/VersionRMISerializableMarshallerTestCase.class"/>
- <exclude name="**/multiplex/**"/>
+ <exclude name="**/multiplex/**"/>
</fileset>
</batchtest>
</junit>
</target>
-
+
<target name="tests.versioning.socket"
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
-
+
<antcall target="tests.versioning.socket.1.4.0" inheritrefs="true"/>
-
+
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-client_nocheck"/>
<param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
@@ -1975,7 +2116,7 @@
<param name="client.check_connection" value="false"/>
<param name="server.check_connection" value="false"/>
</antcall>
-
+
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-server_nocheck"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
@@ -1988,7 +2129,7 @@
<param name="server.check_connection" value="false"/>
</antcall>
</target>
-
+
<target name="tests.versioning.socket.1.4.0"
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
@@ -2003,7 +2144,7 @@
<param name="client.check_connection" value="true"/>
<param name="server.check_connection" value="true"/>
</antcall>
-
+
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-client_default"/>
<param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
@@ -2027,7 +2168,7 @@
<param name="client.check_connection" value="true"/>
<param name="server.check_connection" value="true"/>
</antcall>
-
+
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-server_default"/>
<param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
@@ -2040,12 +2181,12 @@
<param name="server.check_connection" value=""/>
</antcall>
</target>
-
+
<target name="tests.versioning.socket.sub"
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
@@ -2080,7 +2221,7 @@
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<path refid="third_party.classpath"/>
@@ -2111,7 +2252,7 @@
description="Runs remoting fuctional tests with different remoting versions for client and server."
depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<path refid="third_party.classpath"/>
@@ -2143,7 +2284,7 @@
<!-- Tests only the multiplex transport -->
<target name="tests.multiplex" depends="tests.jars">
<mkdir dir="${output.tests.results}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Djvm.mx=256"/>
<classpath>
@@ -2456,7 +2597,7 @@
<target name="tests.performance.one" depends="tests.jars">
<!-- <mkdir dir="${output.tests.performance}/${transport}/${numofclients}/${numofcalls}/${payloadsize}"/>-->
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=socket"/>
@@ -2484,7 +2625,7 @@
<target name="tests.stress.one" depends="tests.jars">
<!-- <mkdir dir="${output.tests.performance}/${transport}/${numofclients}/${numofcalls}/${payloadsize}"/>-->
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=socket"/>
@@ -2546,7 +2687,7 @@
<param name="jboss-junit-configuration" value="socket_100000_3_2048_${serialization}"/>
</antcall>
</target>
-
+
<target name="tests.performance.bisocket">
<antcall target="tests.performance.run" inheritrefs="true">
<param name="transport" value="bisocket"/>
@@ -2696,7 +2837,7 @@
${payloadsize}, number of calls: ${numofcalls}</echo>
<!-- <mkdir dir="${output.tests.performance}/${transport}/${numofclients}/${numofcalls}/${payloadsize}"/>-->
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2754,7 +2895,7 @@
${payloadsize}, number of calls: ${numofcalls}</echo>
<!-- <mkdir dir="${output.tests.performance}/${transport}/${numofclients}/${numofcalls}/${payloadsize}"/>-->
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2794,7 +2935,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2825,7 +2966,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2856,7 +2997,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2887,7 +3028,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2918,7 +3059,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2949,7 +3090,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -2981,7 +3122,7 @@
<echo>Running performance tests for protocol: ${transport}
number of clients: ${numofclients}, payload size: ${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -3156,7 +3297,7 @@
${payloadsize}, number of calls: ${numofcalls}</echo>
<!-- <mkdir dir="${output.tests.performance}/${transport}/${numofclients}/${numofcalls}/${payloadsize}"/>-->
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -3196,7 +3337,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
@@ -3228,7 +3369,7 @@
<echo>Running performance tests for protocol: ${transport}, number of clients: ${numofclients}, payload size:
${payloadsize}, number of calls: ${numofcalls}</echo>
<mkdir dir="${output.tests.performance}"/>
- <mkdir dir="${output.tests.tmp}"/>
+ <mkdir dir="${output.tests.tmp}"/>
<echo>jboss-junit-configuration = ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<jvmarg value="-Dremoting.transport=${transport}"/>
18 years
JBoss Remoting SVN: r3901 - remoting2/branches/2.x/src/etc.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-04 18:47:48 -0400 (Fri, 04 Apr 2008)
New Revision: 3901
Added:
remoting2/branches/2.x/src/etc/remoting.security.policy.core
remoting2/branches/2.x/src/etc/remoting.security.policy.tests
remoting2/branches/2.x/src/etc/remoting.security.policy.tests.minimal
Log:
JBREM-934: Moved test.policy to src/etc and split it into remoting.security.policy.core, remoting.security.policy.tests, and remoting.security.policy.tests.minimal.
Added: remoting2/branches/2.x/src/etc/remoting.security.policy.core
===================================================================
--- remoting2/branches/2.x/src/etc/remoting.security.policy.core (rev 0)
+++ remoting2/branches/2.x/src/etc/remoting.security.policy.core 2008-04-04 22:47:48 UTC (rev 3901)
@@ -0,0 +1,232 @@
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+//***************************************************
+//****
+//**** Permissions to run Remoting. This file is a sample security policy file
+//**** with the permissions necessary to run the code in the org.jboss.remoting.*
+//**** packages. All security sensitive calls in Remoting are wrapped in a
+//**** java.security.AccessController.doPrivileged() call, so that Remoting classes
+//**** can function in the context of a java.lang.SecurityManager, given the permissions
+//**** listed below, even if the calling code runs without these restrictions.
+//****
+//**** There are two ways in which it may be necessary or desirable to modify the
+//**** the permissions listed below.
+//****
+//**** 1. It may be necessary to change the java.io.FilePermission permissions, according
+//**** to the configuration of certain files. See the "File permissions" section below.
+//****
+//**** 2. Some permission may be eliminated, according to which Remoting facilities are used.
+//****
+//**** Other than changes made according to item 1, it should not be necessary to grant
+//**** any additional permissions.
+//****
+//***************************************************
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+
+
+grant codeBase "file:${build.home}/output/classes/-"
+{
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// File permissions
+
+// permission java.io.FilePermission "${build.home}", "read";
+// permission java.io.FilePermission "${build.home}/jboss.identity", "read";
+// permission java.io.FilePermission "${build.home}", "read";
+// permission java.io.FilePermission "-", "read";
+
+ // Used by org.jboss.remotinng.callback.CallbackStore.
+ // This permission might need to be changed, depending on where the CallbackStore
+ // is configured to exist, according to system property "jboss.server.data.dir".
+ // The default location is <current directory>/data.
+ permission java.io.FilePermission "./data", "read, write, delete";
+
+ // Permission for org.jboss.remoting.ident.Identity to create and read "jboss.identity" file.
+ // This permission might need to be changed, depending on the directory in which the
+ // "jboss.identity" file is configured to exist. That directory is configed according to
+ //
+ // 1. the "ServerDataDir" attribute of the "jboss.system:type=ServerConfig" MBean, if that MBean exists, or
+ // 2. the "jboss.identity.dir" system property, if that property exists, or
+ // 3. the current directory.
+ permission java.io.FilePermission ".", "read, write";
+// permission java.io.FilePermission "-", "read, write";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// Used by remote class loading system
+
+ permission java.lang.RuntimePermission "createClassLoader";
+ permission java.lang.RuntimePermission "getClassLoader";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// Used by:
+// org.jboss.remoting.security.SSLSOcketBuilder
+// org.jboss.remoting.transport.coyote.CoyoteInvoker
+// org.jboss.remoting.transport.http.HTTPClientInvoker
+// org.jboss.remoting.transport.servlet.web.ServerInvokerServlet
+// org.jboss.remoting.transporter.TransporterHandler
+// org.jboss.remoting.InvokerRegistry
+
+ permission java.lang.RuntimePermission "accessClassInPackage.*";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// MBean permissions
+
+ permission javax.management.MBeanTrustPermission "register";
+
+ // org.jboss.remoting.callback.ServerInvokerCallbackHandler ?? getClassLoader
+ permission javax.management.MBeanPermission "*#SSLSocketBuilder[*:*]", "getAttribute";
+// permission javax.management.MBeanPermission"org.jboss.remoting.security.SSLServerSocketFactoryServiceMBean#-[*:*]", "getClassLoaderFor, isInstanceOf";
+// permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#-[*:*]", "getClassLoaderFor";
+ permission javax.management.MBeanPermission "*#-[*:*]", "isInstanceOf";
+
+ // org.jboss.remoting.detection.AbstractDetector // necessary for proxy ?
+ permission javax.management.MBeanPermission "*#addServer[remoting:type=NetworkRegistry]", "invoke";
+ permission javax.management.MBeanPermission "*#updateServer[remoting:type=NetworkRegistry]", "invoke";
+ permission javax.management.MBeanPermission "*#removeServer[remoting:type=NetworkRegistry]", "invoke";
+ permission javax.management.MBeanPermission "*#Servers[*:*]", "getAttribute"; // needed
+
+
+ // org.jboss.remoting.detection.util.DetectorUtil
+ permission javax.management.MBeanServerPermission "createMBeanServer";
+ permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:type=Connector,*]", "registerMBean";
+ permission javax.management.MBeanPermission "org.jboss.remoting.detection.*#-[remoting:type=Detector,*]", "registerMBean";
+// permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:type=Connector,*]", "registerMBean, queryMBeans, isInstanceOf";
+
+
+ // org.jboss.remoting.ident.Identity
+// permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#-[JMImplementation:type=MBeanServerDelegate]", "isInstanceOf";
+ permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#MBeanServerId[JMImplementation:type=MBeanServerDelegate]", "getAttribute";
+ permission javax.management.MBeanPermission "-#ServerDataDir[jboss.system:type=ServerConfig]", "getAttribute";
+// permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#-[JMImplementation:type=MBeanServerDelegate]", "queryMBeans, isInstanceOf";
+
+ // org.jboss.remoting.network.NetworkRegistryFinder
+ permission javax.management.MBeanPermission "*#-[*:*]", "queryMBeans";
+
+ // org.jboss.remoting.network.NetworkRegistryQuery // need getClassloaderFor ??
+ permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[*:*]", "isInstanceOf";
+
+ // org.jboss.remoting.security.CustomSSLServerSocketFactory // necessary ??
+ permission javax.management.MBeanPermission "org.jboss.remoting.security.CustomSSLServerSocketFactory#*[*:*]", "invoke";
+
+ // org.jboss.remoting.security.ServerSocketFactoryWrapper
+ permission javax.management.MBeanPermission "*#createServerSocket[*:*]", "invoke";
+
+ // org.jboss.remoting.transport.Connector // isInstanceOf ??
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.*#-[jboss.remoting:service=invoker,*]", "registerMBean, unregisterMBean";
+// permission javax.management.MBeanPermission "org.jboss.remoting.transport.*#-[jboss.remoting:service=invoker,*]", "unregisterMBean, registerMBean, queryMBeans, isInstanceOf";
+
+ // org.jboss.remoting.transport.servlet.web.ServerInvokerServlet
+ permission javax.management.MBeanServerPermission "findMBeanServer";
+
+ // org.jboss.remoting.transporter.InternalTransporterServices
+ permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean";
+
+ // org.jboss.remoting.transporter.TransporterClient and org.jboss.remoting.transporter.Transporter.Server
+ permission javax.management.MBeanServerPermission "createMBeanServer";
+
+// permission javax.management.MBeanPermission "*#-[*:*]", "isInstanceOf, registerMBean";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// Can't create sockets without it
+
+ permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// System properties accessed by Remoting
+
+ permission java.util.PropertyPermission "SERIALIZATION", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "http.basic.password", "read";
+ permission java.util.PropertyPermission "http.basic.username", "read";
+ permission java.util.PropertyPermission "javax.net.ssl.keyStore", "read";
+ permission java.util.PropertyPermission "javax.net.ssl.keyStorePassword", "read";
+ permission java.util.PropertyPermission "javax.net.ssl.keyStoreType", "read";
+ permission java.util.PropertyPermission "javax.net.ssl.trustStore", "read";
+ permission java.util.PropertyPermission "javax.net.ssl.trustStorePassword", "read";
+ permission java.util.PropertyPermission "javax.net.ssl.trustStoreType", "read";
+ permission java.util.PropertyPermission "jboss.bind.address", "read";
+ permission java.util.PropertyPermission "jboss.identity", "read, write";
+ permission java.util.PropertyPermission "jboss.identity.dir", "read";
+ permission java.util.PropertyPermission "jboss.identity.domain", "read";
+ permission java.util.PropertyPermission "jboss.remoting.compression.debug", "read";
+ permission java.util.PropertyPermission "jboss.remoting.compression.min", "read";
+ permission java.util.PropertyPermission "jboss.remoting.domain", "write";
+ permission java.util.PropertyPermission "jboss.remoting.instanceid", "write";
+ permission java.util.PropertyPermission "jboss.remoting.jmxid", "write";
+ permission java.util.PropertyPermission "jboss.remoting.pre_2_0_compatible", "read";
+ permission java.util.PropertyPermission "jboss.remoting.version", "read, write";
+ permission java.util.PropertyPermission "jboss.server.data.dir", "read";
+ permission java.util.PropertyPermission "legacyParsing", "read";
+ permission java.util.PropertyPermission "org.apache.tomcat.util.*", "read";
+ permission java.util.PropertyPermission "org.jboss.remoting.defaultSocketFactory", "read";
+ permission java.util.PropertyPermission "org.jboss.security.ignoreHttpsHost" , "read";
+ permission java.util.PropertyPermission "remoting.bind_by_host", "read";
+ permission java.util.PropertyPermission "remoting.stream.host", "read";
+ permission java.util.PropertyPermission "remoting.stream.port", "read";
+ permission java.util.PropertyPermission "remoting.stream.transport", "read";
+ permission java.util.PropertyPermission "tomcat.util.buf.StringCache.*", "read";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// Tomcat native - TODO - this should be in a privileged block in jbossnative
+
+// permission java.lang.RuntimePermission "loadLibrary.tcnative-1";
+// permission java.lang.RuntimePermission "loadLibrary.libtcnative-1";
+// permission java.util.PropertyPermission "java.library.path", "read";
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// TODO - JBoss Serialization SHOULD be doing these operations in a privileged block - JBSER-105
+
+ permission java.lang.RuntimePermission "accessDeclaredMembers";
+ permission java.lang.RuntimePermission "accessClassInPackage.*";
+ permission java.lang.RuntimePermission "reflectionFactoryAccess";
+ permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+ permission java.io.SerializablePermission "enableSubclassImplementation";
+
+ // org.jboss.remoting.serialization.impl.java.MarshalledValueOutputStream
+ permission java.io.SerializablePermission "enableSubstitution"; // <- this one is a "maybe" :-)
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// TODO - We should use a version of JBoss logging + log4j that does this stuff in privileged blocks
+
+ permission java.io.FilePermission "${build.home}/src/etc/log4j.properties", "read";
+ permission java.io.FilePermission "${build.home}/src/etc/log4j.xml", "read";
+ permission java.io.FilePermission "${build.home}/lib/apache-log4j/lib/log4j.jar", "read";
+ permission java.io.FilePermission "${build.home}/output/classes/-", "read";
+ permission java.lang.RuntimePermission "accessClassInPackage.*";
+ permission java.util.PropertyPermission "org.jboss.logging.Logger.pluginClass", "read";
+ permission java.util.PropertyPermission "log4j.defaultInitOverride", "read";
+ permission java.util.PropertyPermission "elementAttributeLimit", "read";
+ permission java.util.PropertyPermission "maxOccurLimit", "read";
+ permission java.util.PropertyPermission "entityExpansionLimit", "read";
+ permission java.util.PropertyPermission "javax.xml.parsers.DocumentBuilderFactory", "read";
+ permission java.util.PropertyPermission "log4j.ignoreTCL", "read";
+ permission java.util.PropertyPermission "log4j.configuratorClass", "read";
+ permission java.util.PropertyPermission "log4j.configDebug", "read";
+ permission java.util.PropertyPermission "log4j.debug", "read";
+ permission java.util.PropertyPermission "log4j.configuration", "read";
+ permission java.util.PropertyPermission "org.apache.commons.logging.LogFactory", "read";
+ permission java.util.PropertyPermission "org.apache.commons.logging.Log", "read";
+};
+
+
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+//******************************************************************
+//**** Permissions for third party libraries ****
+//******************************************************************
+//******************************************************************
+grant codeBase "file:${build.home}/lib/-"
+{
+ permission java.security.AllPermission;
+};
+
Added: remoting2/branches/2.x/src/etc/remoting.security.policy.tests
===================================================================
--- remoting2/branches/2.x/src/etc/remoting.security.policy.tests (rev 0)
+++ remoting2/branches/2.x/src/etc/remoting.security.policy.tests 2008-04-04 22:47:48 UTC (rev 3901)
@@ -0,0 +1,98 @@
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+//******************************************************************
+//**** Permissions needed by Remoting to run the test suite ****
+//******************************************************************
+//******************************************************************
+grant codeBase "file:${build.home}/output/classes/-"
+{
+ // Permission to read the test keystore
+ permission java.io.FilePermission "${build.home}/output/tests/classes/-", "read";
+
+ // org.jboss.test.remoting.detection.metadata.MetadataTestCase
+ permission javax.management.MBeanPermission "org.jboss.test.remoting.detection.metadata.MetadataTestCase$TestNetworkRegistry#-[remoting:type=NetworkRegistry]", "isInstanceOf";
+
+ // org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter calls
+ // org.jboss.remoting.util.SystemUtility
+ permission java.util.PropertyPermission "jboss-junit-configuration", "read";
+};
+
+
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+//***************************************************
+//**** Permissions used by the test suite ****
+//***************************************************
+//***************************************************
+grant codeBase "file:${build.home}/output/tests/classes/-"
+{
+ permission java.io.FilePermission "${build.home}/output/tests/classes/org/jboss/test/remoting/classloader/race/test.jar", "read";
+
+ // Used by the descendents of org.jboss.test.remoting.shutdown.ShutdownTestParent.
+ permission java.io.FilePermission "<<ALL FILES>>", "execute";
+
+ permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+
+ permission java.lang.RuntimePermission "enableContextClassLoaderOverride";
+ permission java.lang.RuntimePermission "createClassLoader";
+ permission java.lang.RuntimePermission "getClassLoader";
+ permission java.lang.RuntimePermission "setContextClassLoader";
+
+ permission javax.management.MBeanTrustPermission "register";
+
+ permission javax.management.MBeanServerPermission "createMBeanServer, findMBeanServer";
+// permission javax.management.MBeanServerPermission "*";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.*#-[jboss.remoting:service=invoker,*]", "unregisterMBean, registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:type=Connector,*]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[test:type=connector]", "registerMBean";
+ permission javax.management.MBeanPermission "org.jboss.test.remoting.detection.metadata.MetadataTestCase$TestNetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf, addNotificationListener";
+ permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf, addNotificationListener";
+ permission javax.management.MBeanPermission "org.jboss.remoting.detection.multicast.MulticastDetector#-[remoting:*]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#-[jboss:type=serversocketfactory]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.test.remoting.transport.config.FactoryConfigTestCaseParent$SelfIdentifyingServerSocketFactory#-[jboss:type=serversocketfactory]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#-[jboss:type=serversocketfactory2]", "registerMBean";
+ permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#createServerSocket[jboss:*]", "invoke";
+ permission javax.management.MBeanPermission "org.jboss.test.remoting.transport.rmi.ssl.config.FactoryConfigTestCase$SerializableServerSocketFactory#-[jboss:type=serversocketfactory]", "registerMBean";
+ permission javax.management.MBeanPermission "org.jboss.test.remoting.transport.rmi.ssl.config.FactoryConfigTestCase$SerializableServerSocketFactory#-[jboss:type=serversocketfactory2]", "registerMBean";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#Configuration[jboss.remoting:service=invoker,*]", "getAttribute";
+
+ // This is technically the JNP server, but it seems intentional - note that this might mask other problems though
+ permission java.net.SocketPermission "*:*", "accept, connect, resolve";
+
+ // TODO - this stuff ought to be in privileged blocks within the Ant JUnit task
+ permission java.util.PropertyPermission "*", "read, write"; // ugh
+
+ // TODO - JBoss Serialization SHOULD be doing these operations in a privileged block - JBSER-105
+// permission java.lang.RuntimePermission "accessDeclaredMembers";
+// permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+// permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
+// permission java.lang.RuntimePermission "reflectionFactoryAccess";
+// permission java.io.SerializablePermission "enableSubclassImplementation";
+// permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
+// permission java.io.SerializablePermission "enableSubstitution"; // <- this one is a "maybe" :-)
+
+ permission java.util.PropertyPermission "loader.path", "read";
+
+ // TESTING ONLY - Use with the LoggingSecurityManager to locate needed permissions for the above block
+// permission java.security.AllPermission;
+};
+
+
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+//******************************************************************
+//**** Permissions for third party libraries ****
+//******************************************************************
+//******************************************************************
+grant codeBase "file:${build.home}/lib/-"
+{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${ant.library.dir}/-" {
+ permission java.security.AllPermission;
+};
+
+//grant codeBase "file:${build.home}/src/etc/-" {
+// permission java.security.AllPermission;
+//};
\ No newline at end of file
Added: remoting2/branches/2.x/src/etc/remoting.security.policy.tests.minimal
===================================================================
--- remoting2/branches/2.x/src/etc/remoting.security.policy.tests.minimal (rev 0)
+++ remoting2/branches/2.x/src/etc/remoting.security.policy.tests.minimal 2008-04-04 22:47:48 UTC (rev 3901)
@@ -0,0 +1,25 @@
+//****************************************************************************************************************************************************************
+//****************************************************************************************************************************************************************
+//******************************************************************
+//**** Minimal set of permissions for tests ****
+//******************************************************************
+//******************************************************************
+
+grant codeBase "file:${ant.library.dir}/-"
+{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${build.home}/output/classes/-"
+{
+ // org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter calls
+ // org.jboss.remoting.util.SystemUtility
+ permission java.util.PropertyPermission "jboss-junit-configuration", "read";
+};
+
+grant codeBase "file:${build.home}/output/tests/classes/-"
+{
+ // org.jboss.test.remoting.transport.InvokerTestDriver
+ permission java.util.PropertyPermission "remoting.metadata", "read";
+ permission java.util.PropertyPermission "jvm.mx", "read";
+};
\ No newline at end of file
18 years
JBoss Remoting SVN: r3900 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-04 18:43:09 -0400 (Fri, 04 Apr 2008)
New Revision: 3900
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketInvokerTestCase.java
Log:
JBREM-934: New unit tests for strict security test suite.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketInvokerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketInvokerTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketInvokerTestCase.java 2008-04-04 22:43:09 UTC (rev 3900)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.remoting.transport.bisocket;
+
+import org.jboss.test.remoting.transport.InvokerTestDriver;
+
+/**
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Apr 3, 2008
+ * </p>
+ */
+public class BisocketInvokerTestCase extends InvokerTestDriver
+{
+// protected String getJVMArguments()
+// {
+// String vmArgs = super.getJVMArguments();
+// vmArgs = vmArgs + " -D" + Version.PRE_2_0_COMPATIBLE + "=" + Boolean.TRUE.toString();
+// return vmArgs;
+// }
+
+ public void declareTestClasses()
+ {
+ addTestClasses("org.jboss.test.remoting.transport.bisocket.BisocketInvokerClientTest",
+ 1,
+ "org.jboss.test.remoting.transport.bisocket.BisocketInvokerServerTest");
+ }
+
+}
\ No newline at end of file
18 years
JBoss Remoting SVN: r3899 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-04 18:42:15 -0400 (Fri, 04 Apr 2008)
New Revision: 3899
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMINativeMarshallerTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewayNativeMarshallerTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewaySerializableMarshallerTestCase.java
Log:
JBREM-934: Eliminated unnecessary import.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMINativeMarshallerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMINativeMarshallerTestCase.java 2008-04-04 22:39:02 UTC (rev 3898)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMINativeMarshallerTestCase.java 2008-04-04 22:42:15 UTC (rev 3899)
@@ -22,7 +22,6 @@
package org.jboss.test.remoting.versioning.transport.rmi;
-import org.jboss.test.remoting.transport.InvokerTestDriver;
import org.jboss.test.remoting.transport.rmi.RMIInvokerNativeMarshallerClientTest;
import org.jboss.test.remoting.transport.rmi.RMIInvokerNativeMarshallerServerTest;
import org.jboss.test.remoting.versioning.transport.VersionInvokerTestCaseBase;
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewayNativeMarshallerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewayNativeMarshallerTestCase.java 2008-04-04 22:39:02 UTC (rev 3898)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewayNativeMarshallerTestCase.java 2008-04-04 22:42:15 UTC (rev 3899)
@@ -22,7 +22,6 @@
package org.jboss.test.remoting.versioning.transport.rmi;
-import org.jboss.test.remoting.transport.InvokerTestDriver;
import org.jboss.test.remoting.transport.rmi.RMIInvokerOnewayNativeMarshallerClientTest;
import org.jboss.test.remoting.transport.rmi.RMIInvokerOnewayNativeMarshallerServerTest;
import org.jboss.test.remoting.versioning.transport.VersionInvokerTestCaseBase;
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewaySerializableMarshallerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewaySerializableMarshallerTestCase.java 2008-04-04 22:39:02 UTC (rev 3898)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/versioning/transport/rmi/VersionRMIOnewaySerializableMarshallerTestCase.java 2008-04-04 22:42:15 UTC (rev 3899)
@@ -22,7 +22,6 @@
package org.jboss.test.remoting.versioning.transport.rmi;
-import org.jboss.test.remoting.transport.InvokerTestDriver;
import org.jboss.test.remoting.transport.rmi.RMIInvokerOnewaySerializableMarshallerClientTest;
import org.jboss.test.remoting.transport.rmi.RMIInvokerOnewaySerializableMarshallerServerTest;
import org.jboss.test.remoting.versioning.transport.VersionInvokerTestCaseBase;
18 years
JBoss Remoting SVN: r3898 - remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-04 18:39:02 -0400 (Fri, 04 Apr 2008)
New Revision: 3898
Modified:
remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java
Log:
JBREM-934: Replaced System.getProperties() with SystemUtility.getSystemProperty().
Modified: remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java 2008-04-04 22:37:28 UTC (rev 3897)
+++ remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java 2008-04-04 22:39:02 UTC (rev 3898)
@@ -24,6 +24,7 @@
import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
import org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter;
+import org.jboss.remoting.util.SystemUtility;
/**
* @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
@@ -33,7 +34,7 @@
public void startTestSuite(JUnitTest test)
{
- String configuration = (String) System.getProperties().get("jboss-junit-configuration");
+ String configuration = (String) SystemUtility.getSystemProperty("jboss-junit-configuration");
// if sys prop is not null, empty, or contain default variable alias
if(configuration != null && !configuration.trim().equals("") &&
18 years
JBoss Remoting SVN: r3897 - remoting2/branches/2.x/src/main/org/jboss/remoting/util.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-04 18:37:28 -0400 (Fri, 04 Apr 2008)
New Revision: 3897
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java
Log:
JBREM-934: Added setSystemProperty() and mkdirs().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java 2008-04-04 22:36:36 UTC (rev 3896)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java 2008-04-04 22:37:28 UTC (rev 3897)
@@ -21,7 +21,9 @@
*/
package org.jboss.remoting.util;
+import java.io.File;
import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
@@ -75,5 +77,33 @@
return value;
}
-}
-
+
+ static public void setSystemProperty(final String name, final String value)
+ {
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
+
+ static public boolean mkdirs(final File dir)
+ {
+ return ((Boolean) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return new Boolean(dir.mkdirs());
+ }
+ })).booleanValue();
+ }
+}
\ No newline at end of file
18 years