Skip to content

feat(token): add SPIFFE Workload API identity token provider - #20

Merged
bonifaido merged 1 commit into
mainfrom
feat/spiffe-id-token
Oct 21, 2026
Merged

bonifaido merged 1 commit into
mainfrom
feat/spiffe-id-token

Conversation

@bonifaido

Copy link
Copy Markdown
Member

Adds pkg/token/spiffe, an IdentityTokenProvider that 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 an examples/spire-aws program.

Adds go-spiffe v2.9.0, which bumps grpc to 1.79.3 and protobuf/x/* to newer minor versions.

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.
@bonifaido bonifaido self-assigned this Oct 19, 2026
@bonifaido
bonifaido requested review from stoader and waynz0r and a balanced review from Copilot and removed request for stoader October 19, 2026 15:39
@bonifaido
bonifaido marked this pull request as ready for review October 19, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@bonifaido
bonifaido enabled auto-merge (squash) October 21, 2026 08:04
@bonifaido
bonifaido merged commit c14738e into main Oct 21, 2026
2 checks passed
@bonifaido
bonifaido deleted the feat/spiffe-id-token branch October 21, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants