feat(studio): external-mode OIDC login - #977
Closed
jtenniswood wants to merge 1 commit into
Closed
Conversation
Sign-in for external-mode daemons behind an OIDC-aware gateway. lib/oidc carries PKCE (+ the RFC 7636 test vector), the in-memory token store, and resolve-authorization — whose ordering suite pins the contract that matters for this series: OIDC unconfigured ⇒ the static-bearer path is byte- identical, so every earlier PR's behavior is provably unchanged. lib/oidc-session.ts adds the discovery cache, PKCE attempt TTL/cap, single-flight refresh, and RFC 7009 sign-out. The auth routes (status/start/callback/logout) sit behind requestIsTrusted with an escaped postMessage close page; the settings login card renders in external mode only. server-proxy.ts takes its first allowlisted re-touch: the inline static-token block becomes resolveExternalAuthorization(). .env.example gains the five MECATL_OIDC_* rows — fixing a documented gap in the original branch, where the vars existed in code but not in the example file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 12/21 — Studio: external-mode OIDC login
Sign-in for external-mode daemons behind an OIDC-aware gateway. Almost purely additive; managed mode is untouched.
lib/oidc/: PKCE (+RFC 7636 test vector), token store (tokens in process memory only),resolve-authorization— whose ordering suite pins the contract that matters for this stack: OIDC unconfigured ⇒ the static-bearer path is byte-identical, so PRs 3–11's behavior is provably unchanged.lib/oidc-session.ts: discovery cache, PKCE attempt TTL/cap, single-flight refresh, RFC 7009 sign-out.app/api/auth/oidc/[action](status/start/callback/logout) behind PR 3'srequestIsTrusted; escaped postMessage close page; the settings login card (external mode only).server-proxy.tsre-touches: the inline static-token block becomesresolveExternalAuthorization()(~+20/−12 — small because request-trust was extracted in PR 3)..env.examplegains the fiveMECATL_OIDC_*rows — fixing a documented gap in the original branch (the vars existed in code but not in the example file); called out as a deviation.Demo at this stack point: sign in via the settings card against a real IdP; sign out; managed mode unaffected.
Part of the stacked landing of #618.
🤖 Generated with Claude Code