JDK-8043277 : Update jdk regression tests to extend the default security policy instead of override
  • Type: Enhancement
  • Component: core-libs
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-05-15
  • Updated: 2016-01-06
  • Resolved: 2014-10-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b38Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
jtreg policy=test.policy overrides the system policy file.  Thus most of the custom policy files for existing tests copy the system's policy and grants the permissions for the test. 

JDK-8040059 changes the default permission for extensions from AllPermission to no permission.  It also individually grants the least permissions to each JAR file in jre/lib/ext.  All custom policy files that explicitly grant "java.ext.dirs" codesource with AllPermissions should be updated.

There may be further changes to system policy file when more system classes are reduced their privileges.
In addition, it's TBD whether the system policy will be modified for Jigsaw.   This RFE should take future system policy changes into account.

The recommendation is to update the tests to extend the system policy file in the same way as -Djava.security.policy=test.policy so that tests can grant permissions for the tests and not impacted with any change in the system policy.   See CODETOOLS-7900898 for an enhancement request to jtreg harness.


Comments
I assign this issue to me and will create new ones for remaining tests to be updated.
14-10-2014