-
Notifications
You must be signed in to change notification settings - Fork 4.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
[libbeat] Enable TLS 1.3 #12973
[libbeat] Enable TLS 1.3 #12973
Conversation
We will also need to update the list of configurable cihper suites + docs. By default TLS 1.3 won't be available, unless one enables it via GODEBUG. I wonder if we want to introduce an environment variable named BEATS_TLS13 and update GODEBUG on init if this one is set. Also print a warning that TLS 1.3 is experimental. Until TLS 1.3 will be enabled by default in the stdlib. WDYT? |
I've added a I also removed the 1.3 cipher suites from the config again after realizing that they can't be used in |
@faec adding an environment variable is always tricky, I suggest we add two simple python test that check that it works as expected and we don't remove that behavior, I believe we could use the filebeat TCP input as the candidate and we can pass the environment variable to the python runner. |
Do we need to add cipher suites as well? |
I did in a previous iteration, but then removed them (see the previous comment / doc link, Go doesn't allow individual configuration of TLS 1.3 cipher suites) |
Change looks good. But CI doesn't seem to like it :) |
fyi; we are switching master to go1.13: #14335 |
Some tests are failing due to outdated certificates. This has been fixed recently in master. |
Unfortunately the important failure is unrelated to the certificate bug: |
@andrewkroh helped me get a local repro of the CI problem this week, which led to a diagnosis / fix: The failure in The problem was that authentication failures in TLS 1.3 are detected later in the connection process than earlier versions, so a simple connection and handshake is not enough (at least not with the way Python's SSL library reports errors) -- we must also explicitly wait on a response from the server so that the failure can be reported as an exception when it arrives. |
This sounds like the test outcome depends on the system we run the test on. Yay on unwanted surprises. Can we replace the test (and maybe other TLS tests) with unit tests in go? For the python tests (given we have unit tests), we can consider to selectively skip them, based on the tls libs version in use. |
Oh, sorry to be clear, there's a fix now that should work on any platform (connect-handshake-read throws an SSLError for all versions)... though before finding the fix I was starting to lean towards a go unit test instead (I just wanted to make sure it wasn't somehow exposing a misconfiguration of Filebeat itself). I'd be happy to get these migrated to go soon... |
(cherry picked from commit 6a22ee8)
Manual release testing: Basic connectivity rules are tested automatically, but considering the security implications of this update let's double check the following end-to-end scenarios:
|
The TLS handshake has been verified with wireshark for all tests.
I will create follow up PR fixing the default configuration files. |
Fix for default configuration file: #15760 |
Closes #10226
Add TLS 1.3 support in libbeat SSL configurations.