Skip to content

Fixes #28781: Test Configuration option for SSO settings before save - #28780

Merged
harshach merged 18 commits into
mainfrom
harshach/sso-config-test-option
Jun 17, 2026
Merged

harshach merged 18 commits into
mainfrom
harshach/sso-config-test-option

Conversation

@harshach

@harshach harshach commented Jun 7, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #28781

Adds a Test capability to Settings → Preferences → SSO so admins can verify their SSO settings before committing them — today a wrong config silently locks them out (saving a new config signs them out and redirects to /signin).

Phase 1 — Test Configuration (static): a button that runs the existing, non-persisting POST /v1/system/security/validate (OIDC discovery/JWKS reachability, LDAP bind, SAML cert/connectivity, client credentials) and surfaces per-field errors inline, plus a lockout warning for new configs.

Phase 2 — Test Login (interactive round-trip): for public-client OIDC providers (Google, Okta, Azure, Auth0, AWS Cognito, Custom OIDC) the admin signs in with the candidate (unsaved) settings in an isolated popup; the resulting id_token is sent to a new admin-only endpoint POST /v1/system/security/test-login/validate-token that reports the identity, roles, teams and domain outcome a real login would produce.

Security: no new public/unauthenticated endpoint is added (every existing auth servlet is a real login that issues sessions); the only new endpoint is admin-gated (authorizer.authorizeAdmin). The backend TestLoginService is a stateless dry-run that reuses the live JwtFilter + SecurityUtil resolution but performs zero side effects — no user create/update, no JWT/refresh token, no session. The frontend popup uses a dedicated prefixed token store and a dedicated /sso-test-callback route (guarded in index.tsx so the app never mounts there), so a test never touches the admin's current session.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

Phase 1 reuses the existing validate endpoint (no backend change). Phase 2 adds org.openmetadata.schema.system.TestLoginResult/TestLoginTokenRequest schemas, TestLoginService (dry-run identity resolution), and one admin-only SystemResource endpoint. The UI adds a useSsoTestLogin hook (oidc-client signinPopup against a candidate-config UserManager), an SsoTestLoginModal, and an inert popup-callback bootstrap. SAML and LDAP/Basic round-trip are tracked as a follow-up (#28784); their connectivity/credentials are already covered by Phase 1's validator.

Tests:

Unit tests

  • UI Jest: SSOConfigurationForm (Test Configuration), useSsoTestLogin (round-trip wiring + asserts the app token storage is never written), SsoTestLoginModal. SettingsSso suite: 115/115.
  • Backend TestLoginServiceTest (8/8): identity/role/team/domain resolution across Google/Okta/Azure/Auth0/Cognito/Custom-OIDC claim shapes, principal-claims mapping, domain enforcement, and failure paths.

Backend integration tests

  • SystemResourceIT: validate and test-login endpoints are admin-only (non-admin → 403); admin test-login returns a result with no credentials (no access/refresh/JWT token) in the response.

Playwright (UI) tests

  • SSOConfiguration.spec.ts: Test Configuration success/failure (mocked). SSOTestLogin.spec.ts: Test Login offered for every public-client OIDC provider and NOT for confidential/SAML/LDAP; result modal opens (IdP popup stubbed — real provider sign-in isn't possible in CI).

Manual testing performed

  1. mvn -pl openmetadata-service test -Dtest=TestLoginServiceTest — 8/8 pass; service + integration-tests modules compile; spotless applied.
  2. yarn test src/components/SettingsSso — 115/115; eslint + prettier clean; i18n synced + translated across all locales.

UI screen recording / screenshots:

Pending — to be attached on the PR (UI change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: new additive system schemas (testLoginResult, testLoginTokenRequest); no migration needed (not persisted entities).
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

Greptile Summary

This PR adds a Test Configuration button (Phase 1 — reuses the existing POST /v1/system/security/validate endpoint) and an interactive Test Login button (Phase 2 — OIDC popup flow + new admin-only POST /v1/system/security/test-login/validate-token endpoint) to the SSO settings page, so admins can verify candidate SSO configurations before saving them and risking a lockout.

  • A new TestLoginService performs a fully stateless dry-run: it constructs a transient JwtFilter from the candidate config, validates the browser-supplied id_token against the candidate JWKS, and resolves the identity/roles/teams/domain without creating any user, session, or token.
  • A dedicated popup with a prefixed localStorage store (omSsoTestLogin.*) and isSsoTestLoginPopup() detection ensures the test flow never touches the admin's live session; the index.tsx guard prevents the full app from mounting in the popup.
  • Two minor concerns are noted: split(\":\") without a limit of 2 in buildPrincipalClaimsMapping (now shared with the production JwtFilter) silently drops entries containing multiple colons, and the hardcoded response_type: 'id_token' (implicit flow) in the popup config fails silently for providers like Google and default Azure AD that have disabled that flow.

Confidence Score: 4/5

Safe to merge with the noted caveats; the core lockout-prevention feature works correctly, and the admin-only gate and zero-side-effects guarantee are both verified by integration tests.

The buildPrincipalClaimsMapping change now backs the production JwtFilter, so the subtle split(":") vs split(":", 2) difference could silently drop a valid mapping entry on upgrade for an unusual (but legal) config. The hardcoded implicit flow will make Test Login Phase 2 non-functional for admins whose Google or Azure AD tenant has implicit flow disabled, with no actionable error message.

SecurityUtil.java (split limit change now affects the live auth path) and AuthProvider.util.ts (implicit flow config for the popup).

Important Files Changed

Filename Overview
openmetadata-service/src/main/java/org/openmetadata/service/security/auth/TestLoginService.java New dry-run service that reuses JwtFilter + SecurityUtil to resolve identity from a candidate OIDC id_token; zero side effects, wraps all exceptions into typed failure results.
openmetadata-service/src/main/java/org/openmetadata/service/resources/system/SystemResource.java Adds admin-gated POST /security/test-login/validate-token endpoint delegating to TestLoginService; authorizer.authorizeAdmin gate is correctly applied.
openmetadata-service/src/main/java/org/openmetadata/service/security/SecurityUtil.java Extracts buildPrincipalClaimsMapping from JwtFilter; adds a length==2 filter that silently drops multi-colon entries instead of preserving first two parts as before.
openmetadata-service/src/main/java/org/openmetadata/service/security/JwtFilter.java Delegates principal-claims mapping construction to SecurityUtil.buildPrincipalClaimsMapping; behavioral change for malformed entries is intentional and guarded by validatePrincipalClaimsMapping.
openmetadata-ui/src/main/resources/ui/src/utils/AuthProvider.util.ts Adds getCandidateUserManagerConfig for the isolated Test Login popup; hardcodes response_type: 'id_token' (implicit flow), which several listed providers no longer support by default.
openmetadata-ui/src/main/resources/ui/src/utils/SsoTestLoginPopup.ts New popup-detection utility; checks both fragment and query-param state and fails closed, correctly isolating test popups from real logins.
openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SsoTestLogin/useSsoTestLogin.ts Hook that drives the popup login flow and sends the id_token to the admin-only backend; correctly stores only minimal config (authority/clientId/callbackUrl) in localStorage, never the full credentials.
openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SsoTestLogin/ssoTestCallbackBootstrap.ts Popup callback handler; reads candidate config from localStorage, completes signinPopupCallback, and always closes the popup via finally block.
openmetadata-ui/src/main/resources/ui/src/index.tsx Guards the popup path at entry point; dynamically imports the bootstrap and never mounts the full app when isSsoTestLoginPopup() returns true.
openmetadata-service/src/test/java/org/openmetadata/service/security/auth/TestLoginServiceTest.java Comprehensive unit tests covering all six supported OIDC providers, domain enforcement, roles/teams mapping, and failure paths without any network or database.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/SystemResourceIT.java Integration tests confirm admin-only access (non-admin → 403) and that test-login result never leaks access/refresh/JWT tokens.
openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx Adds Test Configuration and Test Login buttons, sharing a buildPayload helper; test buttons are correctly gated behind isEditMode and provider type checks.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Admin as Admin Browser
    participant Popup as Test Popup (isolated)
    participant IdP as Identity Provider
    participant BE as Backend /system/security

    Note over Admin,BE: Phase 1 — Test Configuration (static)
    Admin->>BE: POST /security/validate (candidate config)
    BE-->>Admin: SecurityValidationResponse (errors / success)

    Note over Admin,BE: Phase 2 — Test Login (interactive)
    Admin->>Popup: Opens popup via signinPopup()
    Note over Popup: localStorage: omSsoTestLogin.* prefix
    Popup->>IdP: OIDC authorization request (candidate authority/clientId)
    IdP-->>Popup: "id_token in fragment (#)"
    Note over Popup: isSsoTestLoginPopup() → true, app NOT mounted
    Popup->>Popup: signinPopupCallback() completes handshake
    Popup-->>Admin: id_token returned to opener

    Admin->>BE: POST /security/test-login/validate-token (candidate config + id_token)
    Note over BE: authorizer.authorizeAdmin() check
    BE->>BE: new JwtFilter(candidate) → validateJwtAndGetClaims()
    BE->>BE: SecurityUtil: resolve principal/email/roles/teams/domain
    BE-->>Admin: TestLoginResult (no token, no session, no user created)
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Admin as Admin Browser
    participant Popup as Test Popup (isolated)
    participant IdP as Identity Provider
    participant BE as Backend /system/security

    Note over Admin,BE: Phase 1 — Test Configuration (static)
    Admin->>BE: POST /security/validate (candidate config)
    BE-->>Admin: SecurityValidationResponse (errors / success)

    Note over Admin,BE: Phase 2 — Test Login (interactive)
    Admin->>Popup: Opens popup via signinPopup()
    Note over Popup: localStorage: omSsoTestLogin.* prefix
    Popup->>IdP: OIDC authorization request (candidate authority/clientId)
    IdP-->>Popup: "id_token in fragment (#)"
    Note over Popup: isSsoTestLoginPopup() → true, app NOT mounted
    Popup->>Popup: signinPopupCallback() completes handshake
    Popup-->>Admin: id_token returned to opener

    Admin->>BE: POST /security/test-login/validate-token (candidate config + id_token)
    Note over BE: authorizer.authorizeAdmin() check
    BE->>BE: new JwtFilter(candidate) → validateJwtAndGetClaims()
    BE->>BE: SecurityUtil: resolve principal/email/roles/teams/domain
    BE-->>Admin: TestLoginResult (no token, no session, no user created)
Loading

Reviews (1): Last reviewed commit: "refactor(ui): consolidate SSO config ale..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Adds a "Test Configuration" button to Settings > Preferences > SSO that
validates SSO settings against the backend (OIDC discovery, JWKS, LDAP
bind, SAML cert/connectivity, client credentials) without persisting,
surfacing per-field errors before an admin commits a config that could
lock them out. Also adds a lockout warning for new configurations and
reconciles the SecurityValidationResponse types with the real schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@harshach
harshach requested a review from a team as a code owner June 7, 2026 16:03
@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Jun 7, 2026
@harshach harshach changed the title feat(ui): Test Configuration option for SSO settings before save Fixes #28781: Test Configuration option for SSO settings before save Jun 7, 2026
Replace the English fallback for the four new SSO test/validation message
keys with proper translations in all 18 non-English locales (de, es, fr,
gl, nl, pt-br, pt-pt, ru, tr, ja, ko, zh-cn, zh-tw, th, ar, he, fa, mr),
preserving the {{count}} interpolation placeholder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 1 failure(s), 16 flaky

✅ 4278 passed · ❌ 1 failed · 🟡 16 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 300 0 1 4
✅ Shard 2 813 0 0 9
🔴 Shard 3 805 1 2 8
🟡 Shard 4 844 0 3 12
🟡 Shard 5 720 0 1 47
🟡 Shard 6 796 0 9 8

Genuine Failures (failed on all attempts)

❌ Features/RTL.spec.ts › Verify Following widget functionality (shard 3)
Error: page.goto: Navigation to "http://localhost:8585/table/pw-database-service-626fa087.pw-database-8c045413.pw-database-schema-651f612e.pw-table-c2ac8d8c-d64c-449e-8fc0-0e5bcc3ed6d5" is interrupted by another navigation to "http://localhost:8585/my-data"
Call log:
�[2m  - navigating to "http://localhost:8585/table/pw-database-service-626fa087.pw-database-8c045413.pw-database-schema-651f612e.pw-table-c2ac8d8c-d64c-449e-8fc0-0e5bcc3ed6d5", waiting until "domcontentloaded"�[22m

🟡 16 flaky test(s) (passed on retry)
  • Flow/Tour.spec.ts › Tour should work from help section (shard 1, 1 retry)
  • Features/KnowledgeCenterList.spec.ts › Knowledge Center List - Verify list visibility and card functionality (shard 3, 1 retry)
  • Features/Table.spec.ts › Tags term should be consistent for search (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Entity Reference List (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Markdown (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Should clear search and show all properties for apiCollection in right panel (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should allow Data Steward to edit owners for mlmodel (shard 6, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary Bulk Import Export (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Lineage section collapse/expand (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Input ports section collapse/expand (shard 6, 2 retries)
  • Pages/InputOutputPorts.spec.ts › Toggle fullscreen mode (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Announcement create, edit & delete (shard 6, 1 retry)
  • Pages/ServiceListing.spec.ts › should render the service listing page (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@harshach

harshach commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up work for the interactive Test Login round-trip (Phase 2) is tracked in #28784. This PR delivers Phase 1 (static "Test Configuration"), which closes #28781.

@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.76% (67232/107117) 43.99% (37066/84259) 46.07% (11287/24496)

harshach and others added 2 commits June 7, 2026 14:54
…tion

Backend (SystemResourceIT): assert POST /v1/system/security/validate is
admin-only — admin can validate, a non-admin (user1) is forbidden (403).
Extract the shared SecurityConfiguration into a buildBasicSecurityConfig()
helper reused by the update + validate tests.

UI (SSOConfiguration.spec.ts): cover the Test Configuration flow — button
and lockout warning appear for a new config; a mocked successful validate
shows the success banner without signing the admin out; a mocked failure
surfaces the error banner.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Drop the redundant failure InlineAlert in handleTestConfiguration's catch
  block; handleApiError already surfaces thrown errors (toast or per-field
  highlights), so the banner was duplicate messaging.
- Reword the success message (all locales) to not reference the not-yet-
  shipped "Test Login" round-trip, which would point admins at a missing
  action.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uilder

Re-add `.filter(parts -> parts.length == 2)` to the shared
SecurityUtil.buildPrincipalClaimsMapping so a malformed mapping entry (e.g. no
':') is skipped instead of throwing ArrayIndexOutOfBoundsException on s[1].
Because the helper is shared, JwtFilter and the Test Login dry-run still parse
identically (valid configs unchanged); a no-colon entry would previously have
crashed JwtFilter construction, so live auth is only made more defensive.

Also move the mapping/order build inside the try in resolveIdentityFromClaims
so a direct caller passing a malformed candidate config (e.g. duplicate mapping
keys) gets a graceful failure() result instead of an uncaught exception.

Adds a regression test asserting a malformed entry is skipped and resolution
still succeeds. TestLoginServiceTest 9/9; mvn spotless applied.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gate the alerts wrapper so it no longer emits an empty 16px-margin div
when no alert is shown, and move inter-alert spacing to a single
flex-gap system instead of mixing tw:mt-4 with per-alert m-b-md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment on lines +321 to +324
return listOrEmpty(jwtPrincipalClaimsMapping).stream()
.map(s -> s.split(":"))
.filter(parts -> parts.length == 2)
.collect(Collectors.toMap(s -> s[0], s -> s[1]));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Using split(":") without a limit silently drops any mapping entry that contains more than one colon. With the new filter(parts -> parts.length == 2), an entry like "username:my:claim" is discarded entirely; the old JwtFilter code would have used parts[0] and parts[1] (treating it as username → my). Because buildPrincipalClaimsMapping now backs the live JwtFilter as well, any existing deployment whose jwtPrincipalClaimsMapping contains a claim name with a colon would silently lose that mapping on upgrade. Using split(":", 2) instead preserves the old behaviour and handles such names correctly.

Suggested change
return listOrEmpty(jwtPrincipalClaimsMapping).stream()
.map(s -> s.split(":"))
.filter(parts -> parts.length == 2)
.collect(Collectors.toMap(s -> s[0], s -> s[1]));
return listOrEmpty(jwtPrincipalClaimsMapping).stream()
.map(s -> s.split(":", 2))
.filter(parts -> parts.length == 2)
.collect(Collectors.toMap(s -> s[0], s -> s[1]));

Comment on lines +90 to +106
): Record<string, string | boolean | WebStorageStateStore> => {
const { authority = '', clientId = '', callbackUrl, scope } = authClient;
const testStore = new WebStorageStateStore({
store: globalThis.localStorage,
prefix: SSO_TEST_LOGIN_STORE_PREFIX,
});

return {
authority,
client_id: clientId,
redirect_uri: getRedirectUri(callbackUrl),
response_type: 'id_token',
scope: scope || 'openid email profile',
loadUserInfo: false,
userStore: testStore,
stateStore: testStore,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Implicit flow (id_token) hardcoded — silently fails for Google and default Azure AD configs

getCandidateUserManagerConfig always requests response_type: 'id_token', which is the OAuth 2.0 implicit flow. Google has disabled implicit-flow grants for new (and many existing) app registrations, and Azure AD v2 endpoints disable it by default unless explicitly toggled on in the app manifest. For admins testing either of those providers, signinPopup() will fail and the only feedback is the generic message.sso-test-login-popup-failed message, with no indication that the issue is the flow type. Switching to response_type: 'code' with PKCE (usePkce: true) is supported by all the listed providers and avoids the redirect_uri fragment limitation that blocks implicit flow on some providers.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@harshach
harshach merged commit 51041fa into main Jun 17, 2026
68 of 73 checks passed
@harshach
harshach deleted the harshach/sso-config-test-option branch June 17, 2026 14:22
@gitar-bot

gitar-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 8 resolved / 8 findings

Implements an SSO configuration validation and interactive test-login feature to prevent admin lockouts, including comprehensive backend dry-run service and UI modal integration. Multiple issues regarding state management, error handling, and claim mapping logic were addressed during review.

✅ 8 resolved
✅ Edge Case: Test result banner goes stale after edits/provider change

📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx:888-902 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx:1062-1074
testResult is only reset at the start of handleTestConfiguration/handleSave and via the alert's onClose. handleOnChange (which fires on every field edit and provider change via handleProviderChange) never clears it. Consequence: an admin clicks "Test Configuration", gets the green "Your SSO configuration is valid and reachable" banner, then edits a field (e.g. changes clientId/secret) or switches provider — the green banner remains displayed even though the now-modified config was never validated. The admin can be misled into saving an invalid config, producing exactly the silent lockout//signin redirect this feature was built to prevent. Recommend clearing the stale result whenever the form data changes (and on provider change), e.g. call setTestResult(undefined) inside handleOnChange.

✅ Quality: Duplicate notification on test request failure

📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx:915-917 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx:1062-1074
In the catch block of handleTestConfiguration, handleApiError(error) already surfaces the error (a toast for non-field errors, or per-field highlights). It then also sets testResult to { status: 'failed', errorCount: 0 }, which renders the InlineAlert with the generic sso-configuration-test-failed-description. The user therefore sees both a toast and a red inline banner for the same failure, which is redundant. Consider not setting testResult (or setting a more specific message) when handleApiError already shows a toast, to avoid duplicate messaging.

✅ Quality: Test success message references unimplemented 'Test Login'

📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx:870-884
The success message sso-configuration-test-success reads "...Run Test Login to confirm an end-to-end sign-in before saving." but the PR description states the interactive "Test Login" round-trip is a planned follow-up that does not exist in this phase. Admins will look for a non-existent action. Recommend wording the success copy without referencing the not-yet-shipped Test Login feature until it lands.

✅ Quality: Backend validation failure shown as popup cancellation

📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SsoTestLogin/useSsoTestLogin.ts:66-80
In useSsoTestLogin.runTestLogin, a single try { ... } catch {} wraps both the popup sign-in (signinPopup) and the backend call (testLoginValidateToken). Any rejection from the backend call — a 5xx, network error, or auth failure on the new admin-only endpoint — is caught and surfaced as t('message.sso-test-login-popup-failed') ("The test sign-in was cancelled or could not be completed. Please try again."). This misleads the admin into retrying the IdP popup when the actual problem is server-side, and it hides the real error returned by the endpoint. Consider separating the popup step from the backend-validation step so backend errors get their own message (and ideally surface the server's error detail).

✅ Quality: TestLoginResult stage enum doc lists unused stages

📄 openmetadata-spec/src/main/resources/json/schema/system/testLoginResult.json:40-43 📄 openmetadata-service/src/main/java/org/openmetadata/service/security/auth/TestLoginService.java:44-46
The stage property in testLoginResult.json documents the possible values as TOKEN_VALIDATED, CLAIMS_EXTRACTED, IDENTITY_RESOLVED, DOMAIN_CHECKED, ROLES_MAPPED, but TestLoginService only ever emits TOKEN_VALIDATED, CLAIMS_EXTRACTED, and DOMAIN_CHECKED (constants STAGE_*). IDENTITY_RESOLVED and ROLES_MAPPED are never produced. The schema is a free-form string so this is purely a documentation mismatch, but it can confuse consumers building UI around stage. Align the description with the stages actually emitted.

...and 3 more resolved from earlier reviews

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

This branch was previously deployed

1 inactive deployment
test — 14506f12 Deployed Jun 17, 2026 by siddhant1 via playwright-ci-postgresql (6, 6) #51514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Test option to validate SSO settings before saving (avoid admin lockout)

3 participants