Phase 2: Auth Config Discovery Endpoint #413

Closed
opened 2026-02-16 16:56:43 +00:00 by jason.woltje · 0 comments
Owner

Parent Epic: #411

Stories

  • 2.1 Add AuthProvider and AuthConfigResponse types to @mosaic/shared
  • 2.2 Implement getAuthConfig() in AuthService
  • 2.3 Add GET /auth/config endpoint in AuthController
  • 2.4 Add secret-leakage prevention test
  • 2.5 Implement isOidcProviderReachable() health check with 2s timeout and 30s cache

Acceptance Criteria

  • GET /auth/config returns provider list based on OIDC_ENABLED
  • Authentik provider omitted when OIDC provider unreachable
  • Response sets Cache-Control: public, max-age=300
  • Response NEVER contains secrets (CLIENT_SECRET, CLIENT_ID, JWT_SECRET, etc.)
  • Health check caches results for 30 seconds
  • All new code has tests (85%+ coverage)
  • pnpm lint && pnpm typecheck && pnpm test pass

Files

  • packages/shared/src/types/auth.types.ts
  • packages/shared/src/types/index.ts
  • apps/api/src/auth/auth.service.ts
  • apps/api/src/auth/auth.controller.ts
## Parent Epic: #411 ## Stories - **2.1** Add AuthProvider and AuthConfigResponse types to @mosaic/shared - **2.2** Implement getAuthConfig() in AuthService - **2.3** Add GET /auth/config endpoint in AuthController - **2.4** Add secret-leakage prevention test - **2.5** Implement isOidcProviderReachable() health check with 2s timeout and 30s cache ## Acceptance Criteria - [ ] GET /auth/config returns provider list based on OIDC_ENABLED - [ ] Authentik provider omitted when OIDC provider unreachable - [ ] Response sets Cache-Control: public, max-age=300 - [ ] Response NEVER contains secrets (CLIENT_SECRET, CLIENT_ID, JWT_SECRET, etc.) - [ ] Health check caches results for 30 seconds - [ ] All new code has tests (85%+ coverage) - [ ] pnpm lint && pnpm typecheck && pnpm test pass ## Files - packages/shared/src/types/auth.types.ts - packages/shared/src/types/index.ts - apps/api/src/auth/auth.service.ts - apps/api/src/auth/auth.controller.ts
jason.woltje added this to the Auth-Frontend-Remediation (0.0.14) milestone 2026-02-16 16:56:43 +00:00
jason.woltje added the authapiapi labels 2026-02-16 16:56:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#413