OIDC steady-state Check (session validation, claim injection, 302/403/5xx) #23
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/authz-bridge!23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/oidc-steady-state-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #14
Summary
Implements the OIDC steady-state
Check(the:8083gRPC ext_authzOIDC Flow). Given a request, the
Checkresolves the App by therequest's Host, gates on the fail-closed status model, validates the
Session cookie's
id_tokenagainst the Snapshot's JWKS, and eitherforwards the verified identity (OK + injected claim headers) or sends
the browser to the authorization endpoint (a 302 with the state/nonce
cookie).
What changed
internal/serve/oidc.go): replaces thestub
Checkwith the real flow — App resolution by Host, thefail-closed status model, Session
id_tokenvalidation(signature +
exp+iss+audviainternal/jwt), and theOidcInjectionclaim→header injection on the OK path.403;App unavailable (secret not ready, no OIDC flow, or no signing keys)
→
503; no/invalid Session →302to the authorization endpointcarrying the
state/nonce cookie (appKey|nonce|returnTo) on thedenied_responseSet-Cookie. A failure never mis-authorizes.issuer(registry.Entry.Shared.Issuer, set from the OauthClient'sissuerURL) so theCheckcan validate the token'sisswithout anew K8s read on the serving path.
id_tokenand therefresh_token(ADR 0007); theCheckdecodesthe
id_token.Out of scope (a follow-on ticket, ADR 0008): the lazy refresh on the
Checkpath. TheCheckvalidates the presentedid_tokenand goesstraight to OK/302.
Verification
Verified via the flow-serving server seam (Seam A): an in-process Server
serving a constructed Snapshot with a go-jose ES256 key in the JWKS and
signed fixture
id_tokens — valid session (OK + injected headers),no/expired/mis-signed/mismatched-aud/mismatched-iss session (302),
unknown Host (403), and the
5xxgates.GOTOOLCHAIN=go1.26.0 make lintandmake testpass.