Skip to content

docs: spec and implementation plan for JWKS multi-issuer authentication - #1097

Open
pditommaso wants to merge 3 commits into
masterfrom
jwks-multi-issuer-auth-spec
Open

docs: spec and implementation plan for JWKS multi-issuer authentication#1097
pditommaso wants to merge 3 commits into
masterfrom
jwks-multi-issuer-auth-spec

Conversation

@pditommaso

@pditommaso pditommaso commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Design documents only — no code changes. Spec + implementation plan for replacing Wave's delegation-only validation of Platform JWT tokens with canonical JWKS verification:

  • Multi-issuer, zero static config: pairing acts as issuer registration — any Platform instance with a live PairingRecord is a candidate issuer; the token's iss claim must match the paired endpoint.
  • Private-network issuers: the JWKS document is fetched through the existing TowerConnector/pairing websocket tunnel (ProxyHttpRequest), so no changes to lib-pairing are needed.
  • Dual path by token shape: asymmetric-signed JWTs (RS/ES) are verified locally against the issuer JWKS (strict, no fallback); HS256 JWTs and opaque PATs keep using today's /user-info delegation path indefinitely.
  • Built on Micronaut Security, not from scratch: the reusable core (new libseqera module lib-auth-jwks) only adds dynamic per-issuer JWKS resolution; retrieval, caching and signature verification reuse micronaut-security-jwt's JwksClient / JwkSetFetcher / JwkValidator extension points. Wave contributes a JwksClient bean routing over the pairing tunnel and a flag-gated wiring in UserServiceImpl (wave.auth.jwks.enabled, default off).

Platform prerequisites (mostly already shipped)

The platform-oidc module already provides, when TOWER_OIDC_PEM_PATH is configured: the /.well-known/jwks.json endpoint (RS256, RFC 7638 kid), iss = Platform API endpoint URL, and inbound acceptance of RS256 tokens. Remaining Platform work (tracked separately):

  • a generic token-exchange grant (PAT/session JWT in → RS256 access token out) or RS256 tokens at workflow launch — the tokens Wave receives today are HS256/opaque
  • making TOWER_OIDC_PEM_PATH configured in deployments that enable this

Files

  • docs/superpowers/specs/2026-07-22-jwks-multi-issuer-auth-design.md
  • docs/superpowers/plans/2026-07-22-jwks-multi-issuer-auth.md

🤖 Generated with Claude Code

Design for replacing the delegation-only validation of Platform JWT
tokens with canonical JWKS verification, supporting multiple Platform
issuers dynamically (pairing acts as issuer registration) and issuers
behind private networks (JWKS fetched over the pairing websocket
channel). The reusable core is planned as a new libseqera module
lib-auth-jwks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pditommaso
pditommaso requested a review from arnaualcazar July 22, 2026 13:45
pditommaso and others added 2 commits July 22, 2026 16:11
…OIDC module

Spec/plan revision after verifying that (a) Platform's platform-oidc module
already serves /.well-known/jwks.json with RS256 keys and iss = API endpoint
when TOWER_OIDC_PEM_PATH is set, and (b) micronaut-security-jwt exposes the
JwksClient/JwkSetFetcher/JwkValidator extension points. lib-auth-jwks now
adds only dynamic multi-issuer resolution on top of Micronaut's machinery;
the custom fetcher/cache-store/HTTP classes are dropped and Wave plugs the
pairing tunnel in via a JwksClient bean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant