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? |
davidhadas
left a comment
There was a problem hiding this comment.
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 |
ReToCode
left a comment
There was a problem hiding this comment.
/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 DetailsNeeds 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 |
| cr.certificate = &cert | ||
|
|
||
| pool := x509.NewCertPool() | ||
| block, _ := pem.Decode(secret.Data[certificates.CaCertName]) |
There was a problem hiding this comment.
Should we decode all the CA certificates at this key, or only the first one?
There was a problem hiding this comment.
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:
GetCertificatefor server certs.TLSConfas a pointer for updating custom CA.Fix #13694
Release Note