Description
Provide the validation material both SPIFFE credential types are checked
against: X.509 roots and intermediates for X.509-SVID chains, and JWT
verification keys for JWT-SVID signatures, keyed by an explicitly configured
trust domain.
This is the largest greenfield piece of the epic and the largest risk. The
spiffee-authserver branch has no bundle or rotation code at all —
spiffe.NewMiddleware takes only an expected trust domain and relies on chain
validation configured on the TLS listener. There is nothing to harvest here, so
the work should be split along the line where existing machinery stops.
Scope
Split into two halves; the JWT half is mostly existing machinery, the X.509
half is not.
JWT keys (largely existing):
- Supply JWT verification keys restricted to the bundle's
jwt-svid keys.
- Reuse
pkg/oauthproto/jwks.go's fetcher rather than adding a second cache
and fetch path. It already has per-issuer caching, refresh on kid miss,
HTTPS enforcement, a dial-time private-address SSRF guard, and a
stale-on-error last-known-good path — extend it, do not reimplement it.
X.509 roots and bundle sources (new):
- Add a trust-domain-keyed bundle registry.
- Supply X.509 roots and intermediates for X.509-SVID chain validation.
- Support explicitly configured SPIFFE Bundle Endpoints.
- Support a SPIRE Workload API bundle source for locally attested deployments.
- Implement bundle refresh hints, sequence handling, rotation overlap, and an
explicit last-known-good policy.
- Keep Workload API and remote Bundle Endpoint configuration independent —
neither should imply or override the other.
Acceptance criteria
- Bundle material is selected by a configured trust domain, never by an
arbitrary issuer or claim taken from the credential being validated.
- Bundle Endpoint URLs are explicitly configured and authenticated using
WebPKI, kept separate from SPIFFE workload trust.
- X.509 and JWT validation cannot mix keys across trust domains.
- Old and new X.509 chains and JWT keys both validate during a configured
rotation overlap.
- Removed keys stop validating once the updated bundle becomes authoritative.
- Unknown trust domains fail closed.
- Bundle refresh and failure behaviour is observable without logging
credentials or key material.
Dependencies
- Sub-issue 1 (identity, association and configuration model) — the trust
domain this registry is keyed by is declared there.
pkg/oauthproto/jwks.go (unpushed, xaa-spike-1). If this issue starts
first, land that fetcher shared rather than copying it.
Related
- Part of the SPIFFE client-authentication epic
Description
Provide the validation material both SPIFFE credential types are checked
against: X.509 roots and intermediates for X.509-SVID chains, and JWT
verification keys for JWT-SVID signatures, keyed by an explicitly configured
trust domain.
This is the largest greenfield piece of the epic and the largest risk. The
spiffee-authserverbranch has no bundle or rotation code at all —spiffe.NewMiddlewaretakes only an expected trust domain and relies on chainvalidation configured on the TLS listener. There is nothing to harvest here, so
the work should be split along the line where existing machinery stops.
Scope
Split into two halves; the JWT half is mostly existing machinery, the X.509
half is not.
JWT keys (largely existing):
jwt-svidkeys.pkg/oauthproto/jwks.go's fetcher rather than adding a second cacheand fetch path. It already has per-issuer caching, refresh on
kidmiss,HTTPS enforcement, a dial-time private-address SSRF guard, and a
stale-on-error last-known-good path — extend it, do not reimplement it.
X.509 roots and bundle sources (new):
explicit last-known-good policy.
neither should imply or override the other.
Acceptance criteria
arbitrary issuer or claim taken from the credential being validated.
WebPKI, kept separate from SPIFFE workload trust.
rotation overlap.
credentials or key material.
Dependencies
domain this registry is keyed by is declared there.
pkg/oauthproto/jwks.go(unpushed,xaa-spike-1). If this issue startsfirst, land that fetcher shared rather than copying it.
Related