Repository navigation
fix(spire): name validation-context secret with SPIFFE URI - #70
Merged
Merged
Conversation
BundleToValidationContextSecret named the Envoy validation-context secret with
the bare trust domain (e.g. "ROOTCA", the key from the SPIRE bundle response),
but inbound listeners request the validation context by its SPIFFE URI
("spiffe://ROOTCA") and SVID certificate secrets already use the URI form
("spiffe://<trustDomain>/..."). The name therefore never matched, leaving the
inbound mTLS validation context stuck "warming" in Envoy (confirmed via the
proxy's config_dump: dynamic_active_secrets=0 with the validation context in
dynamic_warming_secrets).
Name the secret "spiffe://<trustDomain>" to match the listener reference and the
SVID naming convention (and the function's own doc comment).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Jun 7, 2026
This was referenced Jul 19, 2026
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.
Problem
Inbound mTLS never completes: the validation-context SDS secret stays stuck warming in Envoy.
BundleToValidationContextSecretnamed the Envoy validation-context secret with the bare trust domain (e.g.ROOTCA, the map key from SPIRE'sSubscribeToX509Bundlesresponse). But:fmt.Sprintf("spiffe://%s", trustDomain)→spiffe://ROOTCA.spiffe://<trustDomain>/ns/<ns>/sa/<sa>).So Envoy asks for
spiffe://ROOTCA, the cache only hasROOTCA, and the secret never resolves. The function's own doc comment even says the name should bespiffe://example.org— the code didn't match it.Evidence
On a live cluster, the agent-proxy
config_dumpshoweddynamic_active_secrets: 0with both the validation context (spiffe://ROOTCA) and the workload cert indynamic_warming_secrets.Fix
Name the validation-context secret
spiffe://<trustDomain>, matching the listener reference and the SVID naming convention. The bridge already passes the bare trust domain, so only the converter changes. Tests updated.bazel test //agent/internal/spire:spire_testpasses.Note
This fixes the validation context half of inbound SDS. The workload SVID half is still blocked separately by the agent skipping the delegated-identity subscription when the CNI doesn't supply a container PID (
skipping SVID subscription: PID not available) — tracked in a follow-up.