-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat: Implement minimum TLS version for clients #11493
Conversation
Made v1.2 the new explicit default for server and client connections. Users that require lower version can revert the used version on a per-plugin basis using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for driving this.
My only concern is around a user knowing what to put in for the tls_min_version
value. My naive assumption reading the changelog was they would put "1.0" or "1.2" Not the "TLS12" I later saw in the READMEs and sample configs.
Is this something to address? Either via better comment or using the other mechanism?
Good point. I just reused the values available for |
Another option would be to add |
I like the printing of the available options on error. It makes it very clear what versions we recognize. Thanks! |
93a250c
to
5bae8c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 - thank you, before merging we do want a +1 from security
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I particularly like the tests that do a real connection based on telegraf's ClientConfig
and ServerConfig
structs (it made me wonder if we could start up an http_listener as the server and then use some other input plugin as the client, but that isn't a blocker for this PR).
In addition to the PR review, I manually tested tls_min_version
with both inputs.http
(client) and inputs.http_listener_v2
(server) and it worked as expected.
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates! (though the linter still seems unhappy)
@jdstrand that's because I manually put the "breaking change" documentation to the Changelog. Not sure how to do it with a happy linter. :-) |
Hi, This is my input JTI stanza:
Also, tried putting the
But get same error:
telegraf-alpine:1.13.3 continues to work, anything newer gives the above errors. |
@mohsin106 this PR adds a TLS minimum version, but you are trying to configure a maximum version. Please open a new issue when you need this additional feature! |
resolves #8699
resolves #8171
resolves #8124 (at least partially)
replaces #8959
All credits for this PR go to @jdstrand! This PR allows to set a minimum TLS version required by the client for all plugins that use
common/tls
to configure their TLS setup. This includes, but is probably not limited to,inputs.http
,inputs.gnmi
andinputs.jti_openconfig_telemetry
. This allows to change Golang's default of TLS 1.2 in both directions, i.e. downgrade (which implies some security risk) as well as setting it to TLS 1.3.Unit-tests are added by the PR to check if lower server versions are rejected successfully.