feat(api): surface per-OIDC-instance status on /api/health #323
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!323
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "214-oidc-health"
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?
Resolves the ADR-0017 deferred follow-up (#214): a misconfigured OIDC instance no longer fails silently (button missing, warning only in container logs).
GET /api/healthnow returns aprovidersarray — one entry per configuredOIDC_<NAME>_ISSUER— as{ id, status, lastError? }withstatusinok | discovery_failed | override_invalid | disabled.OIDCEndpointErrorgains akinddiscriminator + a secret-freepublicDetail; a module-level snapshot keeps the unauthenticated probe cheap (no per-request discovery — failed discovery isn't otherwise memoized, so the snapshot is what stops a broken instance hitting the network on every probe).providersis informational only: it never changes the top-levelstatusor the 200/503 (still DB-driven), so a bad sign-in button can't trip a container health probe.[]when no OIDC is configured.lastErroris generic/secret-free (env-var names or fixed phrases) — never a client secret, raw env value, or IdP response body. Tests assert the secret and the doc's claimed issuer never appear in the response./api/healthregistered withHealthDtoand removed from the coverage exclusion;openapi.json+ api-client types regenerated.docs/oidc-self-hoster-guide.md.Status semantics
okresolveOIDCEndpointssucceededdiscovery_failedoverride_invalidhttps://disabledVerification
pnpm -F @carol/api test— 817 pass / 175 skipped (newtests/auth/oidc-health.test.ts+tests/api/health.test.ts; Postgres legs skip locally — change touches no DB schema/queries, so it's engine-agnostic).openapi:checkup-to-date,openapi:coverage104 pairs.@carol/api-client+@carol/clienttypecheck — clean.Closes #214
🤖 Generated with Claude Code
📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.