Preserve peer certificate chains for egress authentication - #1758
Draft
Adhita Selvaraj (swiftdiaries) wants to merge 3 commits into
Draft
Adhita Selvaraj (swiftdiaries) wants to merge 3 commits into
Adhita Selvaraj (swiftdiaries) wants to merge 3 commits into
Conversation
| // on the request into a verified ActorIdentity, or an error describing why it | ||
| // cannot be trusted. | ||
| func (h *Handler) authenticateActorCertificate(md *extproc.RequestMetadata) (*substratex509.ActorIdentity, error) { | ||
| if peer, present := md.DynamicMetadata[envoyClientCertificateMetadataNamespace]; present { |
Contributor
Author
There was a problem hiding this comment.
Please review this trust boundary together with the metadata propagation changes in this commit: when Envoy supplies this namespace, its chain should remain authoritative, and malformed or incomplete metadata must fail closed rather than fall back to the AgentGateway leaf-only attribute. In particular, verify the full chain survives the Envoy FilterMetadata → ext_proc → authenticateActorCertificate path.
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.
Context
Addresses the egress certificate authentication issue in #1740.
Changes
Pass the peer certificate chain through private Envoy metadata and use it for actor authentication, preserving fail-closed verification.
Validation
make verifypassed locally. VM non-root unit-race and apitool-race, root-race, and Envoy E2E on gVisor and microVM passed, including auth, leaf-only mutation/restoration, and MITM. AgentGateway E2E remains unverified because NFS teardown blocked cluster setup.