ROX-34637: Hot reload TLS certificates in client connections#20661
Conversation
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThe PR moves client certificate loading from initialization time to TLS handshake time. Instead of eagerly loading and assigning certificates to ChangesClient Certificate Lazy Loading
🎯 3 (Moderate) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🚀 Build Images ReadyImages are ready for commit 5872383. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-1066-g587238351c |
2f016b5 to
5bddc37
Compare
08badce to
752433c
Compare
752433c to
3d33067
Compare
Description
clientconn.TLSConfignow usestls.Config.GetClientCertificateto re-read the leaf certificate from disk on each TLS handshake, instead of loading it once intotls.Config.Certificates. This propagates automatically to all code paths that build on it:clientconn.AuthenticatedGRPCConnectionclientconn.AuthenticatedHTTPTransportclientconn.GRPCConnectionclientconn.HTTPTransportServices that benefit (all non-Sensor Go client connections):
Additionally, the compliance node indexer had its own
sync.Once-cached client cert that bypassedclientconnentirely.User-facing documentation
Testing and quality
Automated testing
How I validated my change
Tested with a client admission-control connection to sensor:
sensorServicetls-cert-admission-controlsecret with a new cert, then killed the fake sensor to force reconnections