Add new settings to specify TLS versions to use#9667
Merged
maskit merged 2 commits intoapache:masterfrom May 10, 2023
Merged
Conversation
This adds these new settings: records.yaml: proxy.config.ssl.server.version.min proxy.config.ssl.server.version.max proxy.config.ssl.client.version.min proxy.config.ssl.client.version.max sni.yaml: valid_tls_version_min_in valid_tls_version_max_in and deprecates these settings: records.yaml: proxy.config.ssl.TLSv1 proxy.config.ssl.TLSv1_1 proxy.config.ssl.TLSv1_2 proxy.config.ssl.TLSv1_3 proxy.config.ssl.client.TLSv1 proxy.config.ssl.client.TLSv1_1 proxy.config.ssl.client.TLSv1_2 proxy.config.ssl.client.TLSv1_3 sni.yaml: valid_tls_versions_in
brbzull0
reviewed
May 2, 2023
| .. ts:cv:: CONFIG proxy.config.ssl.TLSv1 INT 0 | ||
| :deprecated: | ||
|
|
||
| This setting is depreated in favor of :ts:cv:`proxy.config.ssl.server.version.min` and |
Contributor
There was a problem hiding this comment.
type: deprecated
there are more probably from the copy/paste
iocore/net/SSLConfig.cc
Outdated
| if (!option) { | ||
| ssl_client_ctx_options |= SSL_OP_NO_TLSv1; | ||
| } else { | ||
| // This is disabled by default. It it's used if it's enabled. |
Member
Author
|
[approve ci] |
ywkaras
reviewed
May 10, 2023
| auto ssl_vc = dynamic_cast<SSLNetVConnection *>(snis); | ||
| ssl_vc->set_valid_tls_version_min(this->min_ver); | ||
| ssl_vc->set_valid_tls_version_max(this->max_ver); | ||
| } else { |
Contributor
There was a problem hiding this comment.
Why not } else if (!unset) { ?
Member
Author
There was a problem hiding this comment.
I guess I wanted to make it clear that if (!unset) { is the first line for the case min/max isn't used. It enables us to add some code before the if easily.
ywkaras
approved these changes
May 10, 2023
cmcfarlen
pushed a commit
to cmcfarlen/trafficserver
that referenced
this pull request
Jun 3, 2024
* asf/master: (33 commits) Add error log for invalid OCSP response (apache#9674) Add new settings to specify TLS versions to use (apache#9667) Remove flask from tests/Pipfile (apache#9688) Doc: Add example of --enable-lto build option with LLVM (apache#9654) Added Zhengxi to the asf contributors (apache#9685) Don't build native QUIC implementation (apache#9670) Stabilize autest tls_hooks17 (apache#9671) Cleanup: remove ts::buffer from HostDB. (apache#9677) Fix leak in MultiTextMod in ControlBase. (apache#9675) Cleanup: remove TsBuffer.h from MIME.cc (apache#9661) Cleanup: remove ts::Buffer from ControlBase. (apache#9664) setup pre-commit hook at cmake generation time (apache#9669) Updated parent retry attempt logic (apache#9620) Try to do less work in hot function HttpHookState::getNext (apache#9660) cmake build, fixed warning using older openssl APIs (apache#9648) rename attempts to retry_attempts (apache#9655) OCSP: Fix unitialized variable error. (apache#9662) Add support for CONNECT method on HTTP/2 connection (apache#9616) Remove deprecated debug output functions from 10 source files. (apache#9657) Remove deprecated debug output functions from 14 source files. (apache#9658) ...
maskit
added a commit
to maskit/trafficserver
that referenced
this pull request
Aug 16, 2024
This is for apache#9667
maskit
added a commit
that referenced
this pull request
Aug 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found an incompatibility between OpenSSL and BoringSSL.
If
valid_tls_versions_inhas[TLSv1, TLSv1_2, TLSv1_3](note thatTLSv1_1isn't in the list), BoringSSL only allows TLSv1 where OpenSSL allows all the three versions. It sounds like a bug but it's actually not.https://boringssl.googlesource.com/boringssl/+/86ada1ea2f51ff41baa2919337e5d721bd27f764/ssl/ssl_versions.cc#225
And I also found that the way (API) we currently use to specify available TLS versions is deprecated.
The old way allow us to specify versions individually (like above), but the new way only allows us to specify a range of versions.
Old:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_options.html
https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_OP_NO_TLSv1
New:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_min_proto_version.html
https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_set_min_proto_version
Since the old way is no longer supported by SSL libraries, we should deprecate the current way and only allow ATS users to specify a range.
This adds these new settings:
and deprecates these settings: