JDK-8280491 and JEP411

Alan Bateman Alan.Bateman at oracle.com
Fri Jun 16 05:48:29 UTC 2023


On 16/06/2023 03:48, Peter Firmstone wrote:
> :
>
> As it isn't yet clear how a Subject context will be preserved across 
> threads in future version of OpenJDK, (currently we use the 
> AccessControlContext for that), for example we capture the existing 
> context, to establish TLS connections in call back communications for 
> network event listeners.
>

It's good to think about a Subject.current/callAs re-implemented to use 
ScopedValue [1], currently in preview with JEP 446 in Java 21. 
ScopedValue allows for sharing in structured concurrency contexts.

-Alan

[1] 
https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/lang/ScopedValue.html
[2] https://openjdk.org/jeps/446



More information about the security-dev mailing list