JDK-8270380 : Change the default value of the java.security.manager system property to disallow
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-07-13
  • Updated: 2024-05-30
  • Resolved: 2021-10-21
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 18
18 b21Fixed
Related Reports
Blocks :  
CSR :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8275671 :  
Description
As specified in JEP 411, we will change the default value of the java.security.manager system property to disallow in Java 18.
Comments
Thank you.
09-11-2021

Sorry for the late reply. This sentence is still correct. Before this, setting "null" and setting "allow" have the same effect. After this, setting "null" and setting "disallow" have the same effect. However, System.getProperty() returns the actual value you set (or null if not set). UnsupportedOperationException is now thrown when System.setSecurityManager() is called.
08-11-2021

[~weijun][~mullan] With this update As I understand " if this system property is not set then the expected behavior is as it is set to "disallow". The spec still says - "If the java.security.manager system property is not set, the default value is null, which means a security manager will not be set at startup." May be this sentence needs to be revisited , to align with the updates as per this CSR? where property value null always throws UnsupportedOperationException?
26-10-2021

Changeset: d589b664 Author: Weijun Wang <weijun@openjdk.org> Date: 2021-10-21 14:04:48 +0000 URL: https://git.openjdk.java.net/jdk/commit/d589b664cc809aea39ec094e99b1898df1bf3c19
21-10-2021