Skip to content

feat: implement token-exchange auth for HashiCorp Vault#5821

Merged
paullatzelsperger merged 1 commit into
mainfrom
feat/vault-token-exchange-auth
Jun 16, 2026
Merged

feat: implement token-exchange auth for HashiCorp Vault#5821
paullatzelsperger merged 1 commit into
mainfrom
feat/vault-token-exchange-auth

Conversation

@paullatzelsperger

@paullatzelsperger paullatzelsperger commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces the previous HashicorpJwtTokenProvider and HashicorpVaultCredentials with a new HashicorpTokenExchangeProvider that implements RFC 8693 token exchange via an external service (e.g. jwtlet)
  • Adds HashicorpVaultTokenProviderFactoryImpl which selects between static-token and token-exchange authentication based on configuration, supporting both simultaneously for mixed deployments (default vault partition uses a static token; per-participant partitions use token exchange)
  • Vault tokens obtained via token exchange are cached until shortly before expiry; the participant context id is passed as the exchange resource so issued Vault tokens are scoped to individual participants

Motivation

In Kubernetes workload-identity deployments the connector should not hold a long-lived static Vault token, nor should credentials be stored in the database, if it can be helped.
Instead, the control plane presents its projected ServiceAccount token to a token-exchange service, which issues a short-lived, participant-scoped JWT that is then authenticated against Vault's JWT auth method. This enables fine-grained, per-participant Vault access without distributing static secrets.

This is somewhat similar to the previous JWT authentication method, because JWTs are used to authenticate against vault. The change is in the way how tokens are obtained: Oauth2 Client Credentials flow (old) vs. OAuth2 Token Exchange (new).

🤖 Generated with Claude Code

@paullatzelsperger paullatzelsperger requested a review from a team as a code owner June 16, 2026 11:40
@paullatzelsperger paullatzelsperger added enhancement New feature or request core feature deployment Deployment of EDC components in production-grade infrastructures breaking-change Will require manual intervention for version update labels Jun 16, 2026
@paullatzelsperger paullatzelsperger force-pushed the feat/vault-token-exchange-auth branch from e881045 to 334da6b Compare June 16, 2026 13:00
@paullatzelsperger paullatzelsperger merged commit 756a37a into main Jun 16, 2026
20 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/vault-token-exchange-auth branch June 16, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Will require manual intervention for version update core feature deployment Deployment of EDC components in production-grade infrastructures enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants