jdk/test/java/rmi/activation/Activatable/checkActivateRef/security.policy
author smarks
Thu, 06 Mar 2014 14:26:26 -0800
changeset 23064 e16d4c844e76
parent 13256 5886d7607acd
child 25408 27563093d2d2
permissions -rw-r--r--
8036095: RMI tests using testlibrary.RMID and testlibrary.JavaVM do not pass through vmoptions Reviewed-by: alanb

/*
 * security policy used by the test process
 */

grant codeBase "file:${java.home}/lib/ext/*" {
    permission java.security.AllPermission;
};

grant {
  // test explicitly acccesses sun.rmi.server.ActivatableRef
  permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";

  // ref to make sure that internal ref is a UnicastRef
  permission java.lang.RuntimePermission "accessDeclaredMembers";
  permission java.lang.reflect.ReflectPermission "suppressAccessChecks";

  // standard test activation permissions
  permission java.io.FilePermission "..${/}..${/}test.props", "read";

  // test needs to cleanup rmid's log.
  permission java.io.FilePermission ".${/}log", "read,write,delete";
  permission java.io.FilePermission ".${/}log${/}-", "read,write,delete";

  // test needs to use java to exec an rmid
  permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";

  // test rmid uses these properties to propagate security values to rmid
  permission java.util.PropertyPermission "java.rmi.server.useDynamicProxies", "read";
  permission java.util.PropertyPermission "java.security.policy", "read";
  permission java.util.PropertyPermission "java.security.manager", "read";

  // used by TestLibrary to determine test environment
  permission java.util.PropertyPermission "test.*", "read";
  permission java.util.PropertyPermission "user.dir", "read";
  permission java.util.PropertyPermission "java.home", "read";
  permission java.util.PropertyPermission "java.rmi.activation.port", "write";

  // Needed to create an activation group
  permission java.lang.RuntimePermission "setFactory";

  // allow exporting of remote objects on an arbitrary port.
  permission java.net.SocketPermission "*:1024-", "connect,accept,listen";

  permission java.lang.RuntimePermission "getClassLoader";
};