Repository navigation
feat(token): add SPIFFE Workload API identity token provider - #20
Merged
Merged
Conversation
Fetches JWT-SVIDs from the Workload API (e.g. a SPIRE agent) on every call, so SPIRE workloads can feed them into any tokenex provider. Includes a SPIRE -> AWS STS example.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review identified no blocking issues; focused tests are included but were not executed.
No open issues 🎉
What changed in this PR
Adds SPIFFE JWT-SVID support to tokenex’s identity-token interface, enabling SPIRE workloads to use existing credential providers.
Changes:
- Adds configurable, per-call JWT-SVID fetching with expiry propagation.
- Adds provider tests and a runnable SPIRE-to-AWS example.
- Updates dependencies and usage documentation.
| File | Description |
|---|---|
| README.md | Documents SPIFFE support and usage. |
| pkg/token/spiffe/spiffe.go | Implements the identity-token provider. |
| pkg/token/spiffe/spiffe_test.go | Tests fetching, validation, errors, and AWS exchange. |
| pkg/token/spiffe/option.go | Adds audience, identity, address, and source options. |
| go.sum | Updates dependency checksums. |
| go.mod | Adds go-spiffe and updates dependencies. |
| examples/spire-aws/README.md | Explains AWS trust configuration and execution. |
| examples/spire-aws/main.go | Demonstrates credential exchange and identity lookup. |
Review effort: Balanced
stoader
approved these changes
Oct 19, 2026
bonifaido
enabled auto-merge (squash)
October 21, 2026 08:04
waynz0r
approved these changes
Oct 21, 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.
Adds
pkg/token/spiffe, anIdentityTokenProviderthat fetches JWT-SVIDs from the SPIFFE Workload API (e.g. a SPIRE agent) on every call, so SPIRE workloads can feed them into any tokenex provider. Includes a README section and anexamples/spire-awsprogram.Adds go-spiffe v2.9.0, which bumps grpc to 1.79.3 and protobuf/x/* to newer minor versions.