-
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
fix: Couchbase insecure certificate validation #9458
fix: Couchbase insecure certificate validation #9458
Conversation
Hey @akrantz01 thanks for looking into this! TBH, I'm not sure this is the right approach, as it uses an "insecure by default" approach without allowing the user to enforce strict security rules. So I think you should either replicate the client behavior (only insecure if no certificate is provided) OR (and this is my preference) you allow the user to set |
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.
would like to see insecure_skip_verify default to false (we don't want to help users be insecure), and I think this doesn't work for connecting to couchbase without TLS.
7f6d502
to
94349b8
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.
Looks good to me and also matches @ssoroka 's requests I think.
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 perfect to me. Thanks @akrantz01 for this nice 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.
Seems like the right thing to do to set the library's TLS settings based on ours.
Hey @akrantz01 could you resolve the conflicts and I'll merge this? Thanks again! |
5a9691e
to
63e4479
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.
Still looks good.
I want to click merge, but lint is failing in couchbase_test.go. Tried editing it in GitHub, but it doesn't show as an issue. Pulling down the MP does show the issue, so typing |
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
@akrantz01 thank you for bringing this one home! |
(cherry picked from commit 872b29b)
Required for all PRs:
resolves #9454
Fixes a bug where the
couchbase
plugin would fail to retrieve bucket stats due to a self-signed certificate. Prior, only the bucket stats would fail because the couchbase library skips certificate verification by default unless a keypair and optional root certificate are provided.