-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for exporting TLS Keying Material #12479
Comments
@sanjerai OpenJDK does not provide any API to access the TLS exporters, so there is nothing that Jetty can do. You may want to open an OpenJDK issue, and I would gladly support this, since it is required also for QUIC+TLS, which is currently not possible to implement using OpenJDK APIs. |
@sbordet enhancement has been raised for open jdk https://bugs.openjdk.org/browse/JDK-8341346. |
@sanjerai thanks for the link to the OpenJDK bug. Just to set expectations, realize that that issue will be fixed in Java 25 or later, and it will take a while (years) before adoption widespreads, so do not hold your breath 😄 |
@sbordet netty seems to have such functionality added in netty project https://netty.io/4.1/api/io/netty/handler/ssl/SslMasterKeyHandler.html |
I looked at the Netty implementation and it uses deep reflection on JDK classes, which is forbidden in modern JDK unless opening up the I'm not really keen to do that. Seems strange that you have a requirement to export the key material or the master secret of a TLS connection, seems like this would open up for vulnerabilities. Can you detail why you need this feature? |
@sbordet we need this to derive key at client and server side as per 5G mobile specs. we have to directly use the master key and a known salt to generate a single HMAC output, from which we will extracts the required length. this is to make sure as per 5G specs both networks client server use same derived key. |
@sanjerai there might be hope, see https://openjdk.org/jeps/478. I'm hoping that along with the KDF APIs there will be API additions to extract the master key from the If that is true, then what you need would be doable in Java 24. If it is doable, then we can have a Jetty class that uses those new APIs via non-deep reflection, and expose this feature. If you're willing to do it, can you check JEP 478 and see if this new API would be enough for you to implement your use case? |
Jetty version(s)
Jetty 11.0.20+
Enhancement Description
RFC5705 defines and RFC8446 updates keying material exporters for TLS:
Many other TLS implementations already support it:
5G mobile specs mandate the use of TLS session at app level for JWE:
We have a Spring + jetty client code base communicating over TLS1.3 and HTTP2. We have a use case to export TLS keying material or the master secret. We need this information to further derive keys for JWE tokens ciphering.
The text was updated successfully, but these errors were encountered: