Default CRYPTO_POLICY to unlimited (fixes HTTPS with TLS 1.3) - #496
Default CRYPTO_POLICY to unlimited (fixes HTTPS with TLS 1.3)#496edo89b wants to merge 1 commit into
Conversation
wborn
left a comment
There was a problem hiding this comment.
Yes, I think this is a better default. It should improve the out-of-the-box experience, especially since the current limited policy can break HTTPS entirely for TLS 1.3 clients with the bundled JDK.
The documentation should be updated as part of this PR as well, particularly the Java cryptographic strength policy section. It currently states that the containers use the limited policy by default, which would no longer be correct.
Preferably, the documentation should remain useful for older releases too. For example, it could explain that:
- new images use
unlimitedby default, matching the default of current OpenJDK versions; - older images may still default to
limitedand requireCRYPTO_POLICY=unlimitedto be set explicitly; - users can still explicitly select
CRYPTO_POLICY=limitedwhen required.
I would therefore keep CRYPTO_POLICY: "unlimited" in the Docker and Compose examples for now, since those examples would then also continue to work correctly with older image versions. A comment could mention that it is redundant for newer releases.
The limited default makes the bundled JDK emit a malformed TLS 1.3 NewSessionTicket, which breaks HTTPS for TLS 1.3 clients. unlimited is the JDK default on current versions and the value the README already recommends. Signed-off-by: Edoardo Barbano <edo89b@gmail.com>
c2aa5d1 to
8962ba9
Compare
|
IIRC the reason to default to limited CRYPTO policy is legal reasons (complying with export restriction). |
|
It seems the regularory framework has changed and today it isn’t required anymore to default to limited crypto policy. |
The debian and alpine images default CRYPTO_POLICY to limited. With the bundled JDK that makes the server emit a malformed TLS 1.3 NewSessionTicket, which breaks HTTPS for TLS 1.3 clients: the handshake completes and then the connection is dropped (Chrome ERR_SSL_PROTOCOL_ERROR, curl "length mismatch"). Full details and a minimal reproduction are in #495.
This changes the default to unlimited, which is the JDK's own default on current versions and the value the README already recommends. The entrypoint already handles the unlimited case, so the change is limited to the ENV default in debian/Dockerfile and alpine/Dockerfile.
If keeping limited as the default is preferred, I'm fine closing this and adding a note to the docs instead.