test/jdk/jdk/jfr/event/runtime/exception.security.policy
author mgronlun
Wed, 30 Oct 2019 19:43:52 +0100
changeset 58863 c16ac7a2eba4
parent 50113 caf115bb98ad
permissions -rw-r--r--
8226511: Implement JFR Event Streaming Reviewed-by: egahlin, mseledtsov, mgronlun Contributed-by: erik.gahlin@oracle.com, mikhailo.seledtsov@oracle.com, markus.gronlund@oracle.com

grant {
  // must allow file reads so that jtreg itself and JFR can run
  permission java.io.FilePermission "<<ALL FILES>>", "read";
  // must allow file delete so that JFR can delete repository
  permission java.io.FilePermission "<<ALL FILES>>", "delete";
  // must allow file write so that the test can create the recording
  permission java.io.FilePermission "<<ALL FILES>>", "write";

  // need to be able to create temporary files
  permission java.util.PropertyPermission "java.io.tmpdir", "read";
  permission java.util.PropertyPermission "user.dir", "read";
  
  // need ManagementPermission to control JFR from the test
  permission java.lang.management.ManagementPermission "control";
  permission java.lang.management.ManagementPermission "monitor";
  
  // JDK-8019403 - access to sun.security.util, which is needed for creation of temp files, 
  // is not permitted automatically on solaris
  permission java.lang.RuntimePermission "accessClassInPackage.sun.security.util";
};