OIDC Flow to the trio: x/oauth2 + go-oidc (mechanical swap) #34

Closed
opened 2026-09-15 23:27:04 +00:00 by ginjiruu · 0 comments
Owner

Parent

#31 — Spec: public-client support + replace hand-rolled protocol code with the x/oauth2 + go-oidc + hstern trio

What to build

The OIDC Flow's protocol code runs on the trio — golang.org/x/oauth2 (authorization URL, authorization-code exchange, refresh grant) and coreos/go-oidc/v3 (id_token validation over a StaticKeySet parsed from the leader-resolved JWKS, ES256). Current behavior is preserved (confidential client, no PKCE yet); the hand-rolled token-endpoint form-POSTs and the internal/jwt verification are removed. Discovery + JWKS stay leader-resolved (no serving-path IdP I/O).

Acceptance criteria

  • The authorization URL, code exchange, and refresh grant use x/oauth2.
  • id_token validation uses coreos/go-oidc over a StaticKeySet built from the Snapshot's JWKS (ES256); no serving-path JWKS fetch.
  • The hand-rolled token-endpoint POSTs and internal/jwt are removed.
  • Existing OIDC behavior is preserved — the OIDC check/refresh and callback serve tests pass (adapted to the trio).
  • make lint and make test pass.

Blocked by

  • None — can start immediately.
## Parent #31 — Spec: public-client support + replace hand-rolled protocol code with the x/oauth2 + go-oidc + hstern trio ## What to build The **OIDC Flow**'s protocol code runs on the trio — `golang.org/x/oauth2` (authorization URL, authorization-code exchange, refresh grant) and `coreos/go-oidc/v3` (id_token validation over a `StaticKeySet` parsed from the leader-resolved JWKS, ES256). **Current behavior is preserved** (confidential client, no PKCE yet); the hand-rolled token-endpoint form-POSTs and the `internal/jwt` verification are removed. Discovery + JWKS stay leader-resolved (no serving-path IdP I/O). ## Acceptance criteria - [ ] The authorization URL, code exchange, and refresh grant use `x/oauth2`. - [ ] id_token validation uses `coreos/go-oidc` over a `StaticKeySet` built from the Snapshot's JWKS (ES256); no serving-path JWKS fetch. - [ ] The hand-rolled token-endpoint POSTs and `internal/jwt` are removed. - [ ] Existing OIDC behavior is preserved — the OIDC check/refresh and callback serve tests pass (adapted to the trio). - [ ] `make lint` and `make test` pass. ## Blocked by - None — can start immediately.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lab/authz-bridge#34
No description provided.