Auth: OIDC / SAML SSO provider#733
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d316d17f49
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $ref: '#/components/schemas/SamlDiscoveryResponse' | ||
| default: | ||
| $ref: '#/components/responses/Problem' | ||
| /auth/oidc/discovery: |
There was a problem hiding this comment.
Regenerate Go OpenAPI stubs for OIDC paths
Adding these OIDC operations to the public contract also requires regenerating apps/api/internal/openapi/openapi.gen.go; I checked that generated file and it still has no DiscoverOidcUrl, OidcCallback, or UpdateCurrentWorkspaceOidc symbols/routes. Any Go code or tests that rely on the checked-in strict-server contract will remain unaware of these endpoints, leaving the OpenAPI source and generated backend artifacts inconsistent.
Useful? React with 👍 / 👎.
| } | ||
| return ssoSettingsConfigured(provider, raw) | ||
| } | ||
| rows, err := h.DB.Query(r.Context(), `select coalesce(settings,'{}'::jsonb) from workspace`) |
There was a problem hiding this comment.
Avoid scanning every workspace on login capability checks
When /login calls provider capabilities without a workspace callbackUrl, this branch reads the settings JSON for every workspace; ProviderCapabilities calls it separately for SAML and OIDC, so each anonymous login page load can do two unbounded table scans, especially bad when no matching SSO is found. In hosted deployments with many workspaces this makes login latency and DB load grow with total workspace count; consider combining/caching the checks or using indexed JSONB predicates instead of loading all rows.
Useful? React with 👍 / 👎.
|
Controller disposition for current head Current blocker:
Controller evidence:
Required before merge: add the OIDC admin configuration UI and the missing callback/replay/duplicate-domain/SAML regression coverage, then rerun focused gates. |
Summary
expn auth oidcbootstrap command plus OpenAPI/SDK contract updatesVerification
pnpm --filter @namuh-eng/expn-sdk buildpnpm --filter @namuh-eng/expn-cli typecheck && pnpm --filter @exponential/web typecheckpnpm --filter @namuh-eng/expn-cli exec vitest run src/run.test.tspnpm --filter @exponential/web exec vitest run tests/login-page.test.tsxmake openapi-coverageBlocked verification
go test ./internal/authproviders ./internal/workspacesandmake checkcannot complete in this lane because thegobinary is not installed;make checkpassed typecheck and Biome before failing at Go API build withgo: not found.