feat: enhance OIDC configuration handling and discovery process#1848
Open
paustint wants to merge 1 commit into
Open
feat: enhance OIDC configuration handling and discovery process#1848paustint wants to merge 1 commit into
paustint wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR shifts OIDC endpoint discovery from an explicit client “auto-discover” action to an authoritative server-side discovery step during OIDC config save (and emphasizes re-discovery during login), while improving the SSO configuration UX and adding regression tests.
Changes:
- Remove the client/API “OIDC discover” endpoint and instead resolve IdP endpoints server-side at save time.
- Update the Teams UI and docs to reflect that endpoints are discovered automatically when saving (plus inline error surfacing in the modal).
- Add unit + e2e regression tests ensuring OIDC config saves successfully when the client omits endpoint fields.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/shared/data/src/lib/client-data.ts | Removes client helper for OIDC discovery POST call. |
| libs/features/teams/src/lib/TeamDashboard/sso-configuration/ConfigureSsoOidcForm.tsx | Removes “Auto-Discover Endpoints” UX and makes endpoints informational/read-only. |
| libs/features/teams/src/lib/TeamDashboard/sso-configuration/ConfigureSsoModal.tsx | Adds persistent inline save error display and clears it on provider changes. |
| libs/auth/types/src/lib/auth-types.ts | Makes OIDC endpoint fields optional/nullish on the save-request schema. |
| libs/auth/types/src/lib/tests/auth-types.spec.ts | Adds schema regression tests covering omitted/null endpoints and URL validation. |
| apps/jetstream-e2e/src/tests/authentication/team/sso/sso-oidc-config-save.api.spec.ts | Adds e2e test verifying server discovers/persists endpoints when client omits them. |
| apps/docs/docs/team-management/sso/sso-okta.mdx | Updates Okta setup instructions to reflect save-time discovery + “Fetch Metadata” wording. |
| apps/docs/docs/team-management/sso/sso-google.mdx | Updates Google setup instructions to reflect save-time discovery. |
| apps/docs/docs/team-management/sso/sso-generic.mdx | Updates generic OIDC docs to reflect save-time discovery from discovery document. |
| apps/docs/docs/team-management/sso/sso-azure.mdx | Updates Azure setup instructions to reflect save-time discovery. |
| apps/api/src/app/routes/team.routes.ts | Removes the /:teamId/sso/oidc/discover route. |
| apps/api/src/app/db/team.db.ts | Tightens DB-layer OIDC save signature to require discovered non-null endpoint fields. |
| apps/api/src/app/controllers/team.controller.ts | Performs OIDC discovery during save, enforces SSRF guard in prod, and uses UserFacingError for key validation failures. |
915f479 to
1b1b6b0
Compare
Comment on lines
+1292
to
+1293
| // The IdP endpoints are non-nullable columns resolved from OIDC discovery by the controller, so | ||
| // they are required here even though they are optional on the wire request. |
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.
No description provided.