feat(api): surface OIDC provider misconfig on /api/health #214
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
ADR-0017 deferred per-instance OIDC health surfacing. Today, an OIDC instance whose discovery doc is unreachable or whose endpoint overrides are malformed drops out of the registry with a warn-level log line, and the corresponding "Sign in with …" button silently disappears from the UI. A self-hoster has no in-app way to see why — they have to inspect container logs.
Source
apps/api/lib/auth/oidc-providers.tslines 22-25: "Endpoint resolution that fails (unreachable discovery doc, bad override) drops the instance from the registry and logs at warn level; other providers keep working. The plan and ADR-0017 explicitly defer per-instance health surfacing (e.g. /api/health) to a follow-up."Scope
GET /api/healthto include a per-OIDC-instance status block:{ providers: [{ id, status: "ok" | "discovery_failed" | "override_invalid" | "disabled", lastError?: string }] }.oidc-providers.tsresolution so/api/healthcan read it without re-running discovery on the health-check path./api/healthunauthenticated (apps/api/lib/auth/public-routes.ts) — self-hosters need it reachable for container health probes.docs/oidc-self-hoster-guide.mdwith a "Diagnostics" section pointing at/api/health.Acceptance criteria
GET /api/healthincludes aprovidersarray with one entry per configured OIDC env-var instance.OIDC_FOO_ISSUERresults instatus: "discovery_failed"plus a usefullastError./api/healthstays cheap (no re-discovery on each request).docs/oidc-self-hoster-guide.mddocuments the diagnostic surface.Composes with