JBoss Remoting SVN: r3695 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-20 21:19:10 -0400 (Thu, 20 Mar 2008)
New Revision: 3695
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/CompressionStressTestParent.java
Log:
JBREM-677: Reduced number of calls.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/CompressionStressTestParent.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/CompressionStressTestParent.java 2008-03-21 01:07:08 UTC (rev 3694)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/CompressionStressTestParent.java 2008-03-21 01:19:10 UTC (rev 3695)
@@ -118,14 +118,14 @@
assertTrue(invoker.getUnMarshaller() instanceof CompressingUnMarshaller);
StringBuffer sb = new StringBuffer(10000);
- for (int i = 0; i < 40000; i++)
+ for (int i = 0; i < 1000; i++)
{
sb.append(((char) i % 10));
String msg = sb.toString();
Object result = client.invoke(msg);
assertEquals("failed on invocation " + i, msg, result);
- if ((i + 1) % 1000 == 0)
+ if ((i + 1) % 100 == 0)
{
log.info("invocations: " + (i + 1));
log.info("length: " + msg.length());
16 years, 3 months
JBoss Remoting SVN: r3694 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 21:07:08 -0400 (Thu, 20 Mar 2008)
New Revision: 3694
Modified:
remoting2/branches/2.x/test.policy
Log:
JBREM-920 - a few more fixes, including 2 for IPv6
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-21 00:52:41 UTC (rev 3693)
+++ remoting2/branches/2.x/test.policy 2008-03-21 01:07:08 UTC (rev 3694)
@@ -20,6 +20,8 @@
permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=127.0.0.1,*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=localhost,*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=\"[::1]\",*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=\"[::ffff:127.0.0.1]\",*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=\"[::]\",*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=socket,type=Connector]", "queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=sslsocket,type=Connector]", "queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#-[JMImplementation:type=MBeanServerDelegate]", "queryMBeans, isInstanceOf";
@@ -95,6 +97,14 @@
permission java.security.AllPermission;
};
+grant codeBase "file:${build.home}/output/lib/jboss-remoting-tests.jar" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${build.home}/output/lib/jboss-remoting-loading-tests.jar" {
+ permission java.security.AllPermission;
+};
+
grant codeBase "file:${ant.library.dir}/-" {
permission java.security.AllPermission;
};
16 years, 3 months
JBoss Remoting SVN: r3693 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 20:52:41 -0400 (Thu, 20 Mar 2008)
New Revision: 3693
Modified:
remoting2/branches/2.x/test.policy
Log:
JBREM-920 - Another permutation of the MBean permission...
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-21 00:49:45 UTC (rev 3692)
+++ remoting2/branches/2.x/test.policy 2008-03-21 00:52:41 UTC (rev 3693)
@@ -18,6 +18,7 @@
permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#MBeanServerId[JMImplementation:type=MBeanServerDelegate]", "getAttribute";
permission javax.management.MBeanPermission "-#-[-]", "queryMBeans";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=127.0.0.1,*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=localhost,*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=\"[::1]\",*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=socket,type=Connector]", "queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=sslsocket,type=Connector]", "queryMBeans, isInstanceOf";
16 years, 3 months
JBoss Remoting SVN: r3692 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 20:49:45 -0400 (Thu, 20 Mar 2008)
New Revision: 3692
Modified:
remoting2/branches/2.x/test.policy
Log:
JBREM-920 - another one...
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-21 00:39:44 UTC (rev 3691)
+++ remoting2/branches/2.x/test.policy 2008-03-21 00:49:45 UTC (rev 3692)
@@ -52,6 +52,9 @@
permission java.io.FilePermission "${build.home}", "read";
permission java.io.FilePermission "${build.home}/jboss.identity", "read";
+ // Used by org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(), though still a Remoting permission I think
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.beans.editors";
+
// 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";
16 years, 3 months
JBoss Remoting SVN: r3691 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 20:39:44 -0400 (Thu, 20 Mar 2008)
New Revision: 3691
Modified:
remoting2/branches/2.x/test.policy
Log:
JBREM-920 - two more permissions (one is related to JBSER-105)
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-21 00:31:13 UTC (rev 3690)
+++ remoting2/branches/2.x/test.policy 2008-03-21 00:39:44 UTC (rev 3691)
@@ -45,6 +45,7 @@
permission java.util.PropertyPermission "jboss.remoting.jmxid", "write";
permission java.util.PropertyPermission "jboss.remoting.instanceid", "write";
permission java.util.PropertyPermission "jboss.remoting.domain", "write";
+ permission java.util.PropertyPermission "SERIALIZATION", "read";
// Permission to read the test keystore
permission java.io.FilePermission "${build.home}/output/tests/classes/-", "read";
@@ -57,6 +58,7 @@
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" :-)
// TODO - We should use a version of JBoss logging + log4j that does this stuff in privileged blocks
16 years, 3 months
JBoss Remoting SVN: r3690 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 20:31:13 -0400 (Thu, 20 Mar 2008)
New Revision: 3690
Modified:
remoting2/branches/2.x/test.policy
Log:
A load of permissions for log4j, and one for ipv6
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-20 23:37:14 UTC (rev 3689)
+++ remoting2/branches/2.x/test.policy 2008-03-21 00:31:13 UTC (rev 3690)
@@ -18,6 +18,7 @@
permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#MBeanServerId[JMImplementation:type=MBeanServerDelegate]", "getAttribute";
permission javax.management.MBeanPermission "-#-[-]", "queryMBeans";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=127.0.0.1,*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=\"[::1]\",*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=socket,type=Connector]", "queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=sslsocket,type=Connector]", "queryMBeans, isInstanceOf";
permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#-[JMImplementation:type=MBeanServerDelegate]", "queryMBeans, isInstanceOf";
@@ -57,6 +58,23 @@
permission java.lang.RuntimePermission "reflectionFactoryAccess";
permission java.io.SerializablePermission "enableSubclassImplementation";
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.util.PropertyPermission "org.jboss.logging.Logger.pluginClass", "read";
+ permission java.io.FilePermission "${build.home}/src/etc/log4j.properties", "read";
+ permission java.util.PropertyPermission "log4j.defaultInitOverride", "read";
+ permission java.io.FilePermission "${build.home}/src/etc/log4j.xml", "read";
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.dummy";
+ permission java.io.FilePermission "${build.home}/lib/apache-log4j/lib/log4j.jar", "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";
};
grant codeBase "file:${build.home}/lib/-" {
16 years, 3 months
JBoss Remoting SVN: r3689 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 19:37:14 -0400 (Thu, 20 Mar 2008)
New Revision: 3689
Modified:
remoting2/branches/2.x/build.xml
Log:
Centralize the security manager properties up at the top of build.xml. Add a the logging security manager by default, which will log all access violations in the results file.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-03-20 21:51:13 UTC (rev 3688)
+++ remoting2/branches/2.x/build.xml 2008-03-20 23:37:14 UTC (rev 3689)
@@ -29,8 +29,12 @@
<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"/>
+ <!-- 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 -->
@@ -932,10 +936,11 @@
<jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
<classpath>
<path refid="tests.classpath"/>
- <pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
+ <!--<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>-->
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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}"/>
@@ -984,8 +989,9 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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}"/>
@@ -1040,9 +1046,9 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
- <sysproperty key="build.home" value="${basedir}"/>
+ <sysproperty key="java.security.debug" value="${java.security.debug}"/>
<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}"/>
@@ -1072,8 +1078,9 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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}"/>
@@ -1108,8 +1115,9 @@
<path refid="${classpath}"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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}"/>
@@ -1152,8 +1160,9 @@
<path refid="${classpath}"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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}"/>
@@ -1202,8 +1211,9 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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}"/>
@@ -1232,8 +1242,9 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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="jrunit.bind_addr" value="${bind.address}"/>
@@ -1297,8 +1308,9 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <sysproperty key="java.security.debug" value="${java.security.debug}"/>
<sysproperty key="build.home" value="${basedir}"/>
<sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
<!-- this is needed for the remoting.marshall.dynamic.remote.MarshallerLoadingServer -->
@@ -1327,8 +1339,9 @@
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
<!--<path refid="third_party.classpath"/> -->
</classpath>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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="jrunit.bind_addr" value="${bind.address}"/>
@@ -1789,8 +1802,9 @@
<jvmarg value="-Dclient.path=${client.classpath}"/>
<jvmarg value="-Dserver.path=${server.classpath}"/>
<!--<jvmarg value="-Djboss.remoting.pre_2_0_compatible=${jboss.remoting.pre_2_0_compatible}"/>-->
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
@@ -1823,8 +1837,9 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dremoting.metadata=check_connection=${check_connection}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
@@ -1858,8 +1873,9 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dremoting.metadata=check_connection=${check_connection}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
@@ -1894,8 +1910,9 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dremoting.metadata=check_connection=${check_connection}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
@@ -1931,8 +1948,9 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<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"
extension="-${jboss-junit-configuration}.xml"/>
@@ -2051,8 +2069,9 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dclient.check_connection=${client.check_connection}"/>
<jvmarg value="-Dserver.check_connection=${server.check_connection}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
@@ -2079,8 +2098,9 @@
<jvmarg value="-Dclient.path=${client.classpath}"/>
<jvmarg value="-Dserver.path=${server.classpath}"/>
<jvmarg value="-Djboss.remoting.pre_2_0_compatible=${jboss.remoting.pre_2_0_compatible}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
@@ -2109,8 +2129,9 @@
<jvmarg value="-Dclient.path=${client.classpath}"/>
<jvmarg value="-Dserver.path=${server.classpath}"/>
<jvmarg value="-Djboss.remoting.pre_2_0_compatible=${jboss.remoting.pre_2_0_compatible}"/>
- <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.manager" value="${java.security.manager}"/>
<sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <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"
16 years, 3 months
JBoss Remoting SVN: r3688 - remoting2/branches/2.x/src/tests/org/jboss/test/security.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 17:51:13 -0400 (Thu, 20 Mar 2008)
New Revision: 3688
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java
Log:
Minor cleanup
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java 2008-03-20 20:55:51 UTC (rev 3687)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java 2008-03-20 21:51:13 UTC (rev 3688)
@@ -12,16 +12,16 @@
public LoggingSecurityManager() {
}
- private static void logAndRethrow(SecurityException ex) {
- ex.printStackTrace(System.err);
- throw ex;
+ private static SecurityException logged(SecurityException se) {
+ se.printStackTrace(System.err);
+ return se;
}
public void checkPermission(final Permission perm) {
try {
super.checkPermission(perm);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -29,7 +29,7 @@
try {
super.checkPermission(perm, context);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -37,7 +37,7 @@
try {
super.checkCreateClassLoader();
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -45,7 +45,7 @@
try {
super.checkAccess(t);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -53,7 +53,7 @@
try {
super.checkAccess(g);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -61,7 +61,7 @@
try {
super.checkExit(status);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -69,7 +69,7 @@
try {
super.checkExec(cmd);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -77,7 +77,7 @@
try {
super.checkLink(lib);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -85,7 +85,7 @@
try {
super.checkRead(fd);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -93,7 +93,7 @@
try {
super.checkRead(file);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -101,7 +101,7 @@
try {
super.checkRead(file, context);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -109,7 +109,7 @@
try {
super.checkWrite(fd);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -117,7 +117,7 @@
try {
super.checkWrite(file);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -125,7 +125,7 @@
try {
super.checkDelete(file);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -133,7 +133,7 @@
try {
super.checkConnect(host, port);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -141,7 +141,7 @@
try {
super.checkConnect(host, port, context);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -149,7 +149,7 @@
try {
super.checkListen(port);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -157,7 +157,7 @@
try {
super.checkAccept(host, port);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -165,7 +165,7 @@
try {
super.checkMulticast(maddr);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -174,7 +174,7 @@
try {
super.checkMulticast(maddr, ttl);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -182,7 +182,7 @@
try {
super.checkPropertiesAccess();
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -190,7 +190,7 @@
try {
super.checkPropertyAccess(key);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -198,8 +198,7 @@
try {
return super.checkTopLevelWindow(window);
} catch (SecurityException se) {
- logAndRethrow(se);
- return false; // not reached
+ throw logged(se);
}
}
@@ -207,7 +206,7 @@
try {
super.checkPrintJobAccess();
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -215,7 +214,7 @@
try {
super.checkSystemClipboardAccess();
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -223,7 +222,7 @@
try {
super.checkAwtEventQueueAccess();
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -231,7 +230,7 @@
try {
super.checkPackageAccess(pkg);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -239,7 +238,7 @@
try {
super.checkPackageDefinition(pkg);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -247,7 +246,7 @@
try {
super.checkSetFactory();
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -255,7 +254,7 @@
try {
super.checkMemberAccess(clazz, which);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
@@ -263,7 +262,7 @@
try {
super.checkSecurityAccess(target);
} catch (SecurityException se) {
- logAndRethrow(se);
+ throw logged(se);
}
}
}
16 years, 3 months
JBoss Remoting SVN: r3687 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 16:55:51 -0400 (Thu, 20 Mar 2008)
New Revision: 3687
Modified:
remoting2/branches/2.x/test.policy
Log:
More permissions
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-20 20:43:43 UTC (rev 3686)
+++ remoting2/branches/2.x/test.policy 2008-03-20 20:55:51 UTC (rev 3687)
@@ -17,6 +17,14 @@
permission javax.management.MBeanTrustPermission "register";
permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#MBeanServerId[JMImplementation:type=MBeanServerDelegate]", "getAttribute";
permission javax.management.MBeanPermission "-#-[-]", "queryMBeans";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#-[jboss.remoting:host=127.0.0.1,*,service=invoker,transport=socket]", "registerMBean, queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=socket,type=Connector]", "queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:transport=sslsocket,type=Connector]", "queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#-[JMImplementation:type=MBeanServerDelegate]", "queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.detection.multicast.MulticastDetector#-[remoting:type=JNDIDetector]", "queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.detection.multicast.MulticastDetector#-[remoting:type=MulticastDetector]", "queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "queryMBeans, isInstanceOf";
+ permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#Servers[remoting:type=NetworkRegistry]", "getAttribute";
// System properties accessed by Remoting
permission java.util.PropertyPermission "jboss.remoting.pre_2_0_compatible", "read";
16 years, 3 months
JBoss Remoting SVN: r3686 - in remoting2/branches/2.x/src/tests/org/jboss/test: security and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-20 16:43:43 -0400 (Thu, 20 Mar 2008)
New Revision: 3686
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/security/
remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java
Log:
Add a logging security manager - for testing the tests :)
Added: remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/security/LoggingSecurityManager.java 2008-03-20 20:43:43 UTC (rev 3686)
@@ -0,0 +1,269 @@
+package org.jboss.test.security;
+
+import java.security.Permission;
+import java.io.FileDescriptor;
+import java.net.InetAddress;
+
+/**
+ *
+ */
+public final class LoggingSecurityManager extends SecurityManager {
+
+ public LoggingSecurityManager() {
+ }
+
+ private static void logAndRethrow(SecurityException ex) {
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+
+ public void checkPermission(final Permission perm) {
+ try {
+ super.checkPermission(perm);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkPermission(final Permission perm, final Object context) {
+ try {
+ super.checkPermission(perm, context);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkCreateClassLoader() {
+ try {
+ super.checkCreateClassLoader();
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkAccess(final Thread t) {
+ try {
+ super.checkAccess(t);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkAccess(final ThreadGroup g) {
+ try {
+ super.checkAccess(g);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkExit(final int status) {
+ try {
+ super.checkExit(status);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkExec(final String cmd) {
+ try {
+ super.checkExec(cmd);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkLink(final String lib) {
+ try {
+ super.checkLink(lib);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkRead(final FileDescriptor fd) {
+ try {
+ super.checkRead(fd);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkRead(final String file) {
+ try {
+ super.checkRead(file);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkRead(final String file, final Object context) {
+ try {
+ super.checkRead(file, context);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkWrite(final FileDescriptor fd) {
+ try {
+ super.checkWrite(fd);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkWrite(final String file) {
+ try {
+ super.checkWrite(file);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkDelete(final String file) {
+ try {
+ super.checkDelete(file);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkConnect(final String host, final int port) {
+ try {
+ super.checkConnect(host, port);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkConnect(final String host, final int port, final Object context) {
+ try {
+ super.checkConnect(host, port, context);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkListen(final int port) {
+ try {
+ super.checkListen(port);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkAccept(final String host, final int port) {
+ try {
+ super.checkAccept(host, port);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkMulticast(final InetAddress maddr) {
+ try {
+ super.checkMulticast(maddr);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ /** @noinspection deprecation*/
+ public void checkMulticast(final InetAddress maddr, final byte ttl) {
+ try {
+ super.checkMulticast(maddr, ttl);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkPropertiesAccess() {
+ try {
+ super.checkPropertiesAccess();
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkPropertyAccess(final String key) {
+ try {
+ super.checkPropertyAccess(key);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public boolean checkTopLevelWindow(final Object window) {
+ try {
+ return super.checkTopLevelWindow(window);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ return false; // not reached
+ }
+ }
+
+ public void checkPrintJobAccess() {
+ try {
+ super.checkPrintJobAccess();
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkSystemClipboardAccess() {
+ try {
+ super.checkSystemClipboardAccess();
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkAwtEventQueueAccess() {
+ try {
+ super.checkAwtEventQueueAccess();
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkPackageAccess(final String pkg) {
+ try {
+ super.checkPackageAccess(pkg);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkPackageDefinition(final String pkg) {
+ try {
+ super.checkPackageDefinition(pkg);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkSetFactory() {
+ try {
+ super.checkSetFactory();
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkMemberAccess(final Class clazz, final int which) {
+ try {
+ super.checkMemberAccess(clazz, which);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+
+ public void checkSecurityAccess(final String target) {
+ try {
+ super.checkSecurityAccess(target);
+ } catch (SecurityException se) {
+ logAndRethrow(se);
+ }
+ }
+}
16 years, 3 months