Repository navigation
Conversation
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gRPC server cert and key are hot reloaded since #587, but the client CA (
GRPC_CLIENT_TLS_CACERT) is only loaded at startup. When the client CA is rotated (e.g. by cert-manager), client certs issued by the new CA are rejected until ratelimit is restarted, and since Envoy fails open by default, rate limiting silently stops being enforced.This adds a
ClientCAProviderthat watches the client CA directory via goruntime, likeCertProvider, and verifies client certs against the current CA on every handshake viaGetConfigForClient(including theGRPC_CLIENT_TLS_SANcheck). If the new CA cannot be loaded, the previous one is kept. Established connections are not affected.Behavior change: the reloaded CA replaces the previous one immediately, so client certs signed only by the old CA are rejected for new connections. Rotating without disruption requires a bundle with both CAs during the rotation (documented in the README).