原文はこちら。
The original article was written by David Delabassee (DevRel – Java Platform Group at Oracle).
https://inside.java/2021/12/06/quality-heads-up/
OpenJDK Quality Groupは、リリースの全体的な品質向上の手段としてOpenJDKビルドを使うFOSSプロジェクトのテストを推進しています。
Quality Outreach
https://wiki.openjdk.java.net/display/quality/Quality+Outreach
このHeads upは、関係するプロジェクトに送られる定期的なコミュニケーションの一部です。
JDK 18 Early-Access builds 23 are available
https://mail.openjdk.java.net/pipermail/quality-discuss/2021-November/001062.html
このプログラムの詳細と参加方法については、上記wikiをご覧ください。
JEP 411 – Deprecate the Security Manager for Removal
JEP 411では、将来のリリースで削除するため、Security Managerを非推奨としています。
JEP 411: Deprecate the Security Manager for Removal
https://openjdk.java.net/jeps/411
JDK 18 EA b21 からは、java.security.manager
システムプロパティのデフォルト値が “disallow” に設定されています。
[JDK-8270380] Change the default value of the java.security.manager system property to disallow
https://bugs.openjdk.java.net/browse/JDK-8270380
これはつまり、System.setSecurityManager
を呼び出してSecurity Managerを有効にしているアプリケーションまたはライブラリは、そのコードが期待通りに動作し続けるためには、コマンドラインで -Djava.security.manager=allow
を指定する必要があることを意味します。この変更は、当初は JDK 17 を対象としていましたが、コミュニティからの議論とフィードバックの結果、JDK 18 に延期されました。
(訳注)JEP 411のDescriptionには以下のような表現があります(2021/12/24現在)
In Java 18, we will prevent a Java application or library from dynamically installing a Security Manager unless the end user has explicitly opted to allow it. Historically, a Java application or library was always allowed to dynamically install a Security Manager, but since Java 12, the end user has been able to prevent it by setting the system property
java.security.manager
todisallow
on the command line (java -Djava.security.manager=disallow ...
) — this causesSystem::setSecurityManager
to throw anUnsupportedOperationException
. Starting in Java 18, the default value ofjava.security.manager
will bedisallow
if not otherwise set viajava -D...
. As a result, applications and libraries that callSystem::setSecurityManager
may fail due to an unexpectedUnsupportedOperationException
. In order forSystem::setSecurityManager
to work as before, the end user will have to setjava.security.manager
toallow
on the command line (java -Djava.security.manager=allow ...
).
Call to Action
この変更はすでに機能しています。Security Managerを使っている場合は、開発者は最新のJDK 18 Early-Accessビルドを使用してコードベースをテストし、動作やパフォーマンスの後退を確認することをお勧めします。質問やフィードバックは security-dev メーリングリストまでお願いします。
JDK 18 Early-Access Builds
https://jdk.java.net/18/
security-dev — Technical discussion about the development of the Java security components
https://mail.openjdk.java.net/mailman/listinfo/core-libs-dev
security-devメーリングリストのアーカイブ
https://mail.openjdk.java.net/pipermail/core-libs-dev/