-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Load certificate when they are updated when internal-encryption is enabled #13854
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #13854 +/- ##
==========================================
- Coverage 86.27% 86.23% -0.05%
==========================================
Files 198 199 +1
Lines 14669 14706 +37
==========================================
+ Hits 12656 12682 +26
- Misses 1715 1725 +10
- Partials 298 299 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
/cc @evankanderson @davidhadas @ReToCode @KauzClay @dprotaso Could you please take a look? |
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.
On the client side,
We should find a way to avoid using InsecureSkipVerify: false
and replace the standard lib verification.
Currently we need to restart activator when certificates are updated. This patch fixes it by: * Using `GetCertificate` for server certs. * Using `VerifyPeerCertificate` for custom CA verification. * Caching the cert for peformance. Fix knative#13694
/retest |
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
/hold for other reviewers to chime in. Feel free to unhold if you have all the reviews you'd like.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nak3, ReToCode The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thank you for the reviews! I will unhold if there is no additional reviews in a few days. |
@nak3 |
/hold cancel |
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.
/approve
cr.certificate = &cert | ||
|
||
pool := x509.NewCertPool() | ||
block, _ := pem.Decode(secret.Data[certificates.CaCertName]) |
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.
Should we decode all the CA certificates at this key, or only the first one?
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 it is okay to assume for now but we should decode all the CA if we will support the BYO CA certificate in the future. I will create the tracker issue.
Currently we need to restart activator when certificates are updated. This patch fixes it by:
GetCertificate
for server certs.TLSConf
as a pointer for updating custom CA.Fix #13694
Release Note