-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Require peer certificate to be present when ca_cert_file is set #648
Require peer certificate to be present when ca_cert_file is set #648
Conversation
@mattklein123 PTAL |
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.
Looks good from code perspective, 1 small nit.
For docs, please add a small note to https://lyft.github.io/envoy/docs/configuration/listeners/ssl.html and https://lyft.github.io/envoy/docs/configuration/cluster_manager/cluster_ssl.html about how setting ca_cert_file requires that a certificate be presented or the connection will be failed.
source/common/ssl/context_impl.cc
Outdated
@@ -229,6 +229,12 @@ bool ContextImpl::verifyPeer(SSL* ssl) const { | |||
|
|||
if (!cert.get()) { | |||
stats_.no_certificate_.inc(); | |||
|
|||
if (ca_cert_) { | |||
// In case that ca_cert_ exists, reject the connection when peer |
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.
nit: please flow comment out to 100 col
This is to pick up envoyproxy/envoy#648
…et (envoyproxy#648)" (envoyproxy#668) This reverts commit 1687644.
expose more rules
Signed-off-by: Jose Nino [email protected] Description: #9618 broke the iOS build due to missing symbols. #9875 fixes. However, in order to expedite a clean master branch this PR moves the Envoy ref back to a stable place. Note that Android logging is reverted. Also note that CI for iOS was not testing for liveliness, which is how the breakage went through in the first place. This PR also fixes that. Risk Level: low Testing: CI Fixes #646 Signed-off-by: Jose Nino <[email protected]> Signed-off-by: JP Simard <[email protected]>
Signed-off-by: Jose Nino [email protected] Description: #9618 broke the iOS build due to missing symbols. #9875 fixes. However, in order to expedite a clean master branch this PR moves the Envoy ref back to a stable place. Note that Android logging is reverted. Also note that CI for iOS was not testing for liveliness, which is how the breakage went through in the first place. This PR also fixes that. Risk Level: low Testing: CI Fixes #646 Signed-off-by: Jose Nino <[email protected]> Signed-off-by: JP Simard <[email protected]>
Fixes #615