Repository navigation
feat(proxy): pin upstream peer identity to the service's SPIFFE IDs - #165
Merged
Merged
Conversation
mTLS previously proved only trust-domain membership: the upstream validation context was the bare SPIRE bundle, so a client dialing an svc-1 endpoint accepted ANY valid mesh SVID — leaving registry poisoning able to impersonate a service (register an attacker pod's IP under svc-1; clients connect and the handshake passes). Service clusters now carry a combined validation context: exact URI SAN matchers for the service's expected identities (spiffe://<td>/ns/<ns>/sa/<service>, one per namespace in the endpoints' union, sorted) layered over the SDS-rotated trust bundle. Injected at snapshot time on every per-source transport socket and the node-identity no-match path; ODCDS clusters ride the same path. A poisoned endpoint now fails the handshake unless it actually runs as the target ServiceAccount. Services whose endpoints carry no namespace metadata fall back to bundle-only validation. Inbound stays authn-only (caller identity recorded in XFCC; per-service authorization remains app-layer). Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Closes the registry-poisoning impersonation gap: upstream mTLS validated trust-domain membership only (bare bundle, no SAN matching) — any mesh workload's SVID passed when dialing any service.
CombinedValidationContextper service cluster: exact URI SAN matchers (spiffe://<td>/ns/<ns>/sa/<svc>, namespace union from the endpoints, sorted for hash stability) + the SDS trust bundle.🤖 Generated with Claude Code