-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 server TLS certificate verification #2171
Add server TLS certificate verification #2171
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2171 +/- ##
==========================================
- Coverage 62.09% 62.02% -0.08%
==========================================
Files 156 156
Lines 12531 12531
==========================================
- Hits 7781 7772 -9
- Misses 4143 4148 +5
- Partials 607 611 +4 |
7c294c1
to
e6f5c43
Compare
docs/clients/fluentd/README.md
Outdated
@@ -210,6 +210,21 @@ Specify a pair of client certificate and private key with `cert` and `key` if a | |||
</match> | |||
``` | |||
|
|||
### server certificate verification | |||
A flag to enable a server certificate verification. By default the `verify_tls` is set to true. |
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.
"to disable server verification"? :)
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 explanation should be fine. The reason why we introduce this flag is to specify server TLS verification mode. Not for disabling the verification. If we think, "to disable" is better, we need to change the option to no_tls_verify
or something.
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.
I think your thinking around this patch came off the wrong foot. You seem to have thought that we somehow want to be able to enable server certificate verification. It is enabled by default and we really look for a way to optionally disable it :).
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.
So, let's focus on the actual patch first and then adjust the docs, ok?
Some high level feedback, clarifying the motivation and goal.
This seems to be veeeery out-of-date documentation (I don't know Ruby, otherwise I would have been a little more motivated to tackle this patch myself). The Internet and open-source software fortunately moved on around 2014 and 2015, switching stdlibs to do certificate verification by default :-) Ruby is no exception, fortunately: https://github.com/ruby/ruby/blob/ruby_2_7/sample/drb/drbssl_c.rb#L9
That is, the default is of course to verify the server certificate when doing HTTPS. That's how this patch came off the wrong foot I think. As one can also see when comparing the title of #1986 ("add option to disable server certificate verification") and the title of this PR ("Add server TLS certificate verification") --> conflict between core of the issue, and (your previous) goal of this PR. Really, we need a switch to optionally disable server certificate verification. Convinced?
The current patch isn't doing that! In a working patch we will find a part of the (new) code that sets
but only when Makes sense? I'll happily review again, just ping me please. |
@jgehrcke could you review the changes? |
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.
LGTM
Can you update the doc now ?
4aadf60
to
e1dac90
Compare
@cyriltovena thank you for the review! I pushed the commit to update document e1dac90 Should I rebase all commits into one commit or will you squash-merge this PR? |
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.
LGTM with one nit.
Thanks again everyone here. |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1986
Special notes for your reviewer:
Checklist