Repository navigation
fix(ui): hide Login Configuration when an external SSO provider is configured - #33598
Conversation
…nfigured The login configuration (failed-attempt lockout, access block time, JWT expiry) is enforced by OpenMetadata's own login flow. Under an external IdP those settings are inert, but the page was still listed under Settings > Preferences for every admin. LoginConfigurationPage already knew this and skipped the fetch for non-basic providers, but still rendered — so the page showed "--" for every field, and the Edit button stayed live, letting an admin save values that never take effect. Gate the menu item on the provider alongside the existing admin check, and 404 both the details and edit routes so a bookmarked URL cannot reach them, matching the existing Navigate-to-NOT_FOUND guards in SettingsRouter. With the route as the single gate, the page's own unreachable provider check is removed. LDAP is treated as basic: the server enforces the same login config for it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Review caught that the provider predicate excluded AuthProvider.Openmetadata.
That is wrong: the server routes `openmetadata` through BasicAuthServletHandler
("OpenMetadata provider uses Basic auth internally",
AuthServeletHandlerFactory), and JwtFilter#isSameProvider documents `basic` and
`openmetadata` as two historical names for the same native-password
authenticator. The login configuration is therefore enforced for it, and hiding
the page removed access to settings that were still live.
LDAP stays included — LdapAuthenticator reads the same three settings
(maxLoginFailAttempts, accessBlockTime, jwtTokenExpiryTime).
Renamed isBasicAuthProvider to isLoginConfigurationApplicable: the set is three
providers, not "basic", and the name now states the rule it encodes rather than
one of its members.
Tests assert all three providers keep the page; the hidden set stays derived
from the enum so a newly added provider defaults to hidden.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
CI failed with "useApplicationStore.getState is not a function". Reading the
store inside getGlobalSettingsMenuWithPermission made a pure util depend on a
hook, so every test that mocks useApplicationStore as a bare jest.fn() — 141
files do — crashed the moment it reached the settings menu.
EntitySearchSettings.test.tsx was the one that broke.
frontend-performance.md already forbids this ("pure utilities cannot depend on
React, UI/state layers, pages, hooks, or REST"). It was dismissed because lint
did not flag it and TableClassBase does the same thing; the rule was right and
the precedent is a latent bug of the same shape.
The provider is now an optional third argument, passed by the two pages that
actually render the entry. Omitting it leaves the entry visible: showing an
inert settings page is cosmetic, hiding a live one takes working settings away
from admins.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Resolved .github/playwright/impact-map.generated.json by regenerating it (python3 .github/scripts/generate_playwright_impact_map.py) on top of main's version rather than hand-merging a generated file. AuthProvider.util.ts auto-merged: main's AuthCoordinator/validator refactor (#31675) and this branch's isLoginConfigurationApplicable predicate touch different parts of the file; both verified present afterwards. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Code Review ✅ Approved🟡 Medium risk · Authentication-provider-dependent settings visibility and route availability change Hides Login Configuration menu entry and routes when an external SSO provider is configured, since those settings are only enforced under basic, LDAP, or OpenMetadata authentication. Centralizes the provider applicability rule in OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
| Count | Rule |
|---|---|
| 60 | no-restricted-imports |
| 3 | react-hooks/exhaustive-deps |
| 1 | openmetadata-imports/no-circular-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/pages/Configuration/LoginConfigurationDetails/LoginConfigurationPage.tsx:49:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/GlobalSettingPage/GlobalSettingCategory/GlobalSettingCategoryPage.tsx:165:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/pages/GlobalSettingPage/GlobalSettingPage.tsx:79:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:13:1 |
no-restricted-imports |
'../assets/svg/admin-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abs |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:14:1 |
no-restricted-imports |
'../assets/svg/api-collection-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the desig |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:15:1 |
no-restricted-imports |
'../assets/svg/api-endpoints-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the design |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:16:1 |
no-restricted-imports |
'../assets/svg/apis-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abst |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:17:1 |
no-restricted-imports |
'../assets/svg/app-mode.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abstract |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:18:1 |
no-restricted-imports |
'../assets/svg/application-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designat |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:19:1 |
no-restricted-imports |
'../assets/svg/bot-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abstr |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:20:1 |
no-restricted-imports |
'../assets/svg/chart-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abs |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:21:1 |
no-restricted-imports |
'../assets/svg/column-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated ab |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:22:1 |
no-restricted-imports |
'../assets/svg/dashboard-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the design |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:23:1 |
no-restricted-imports |
'../assets/svg/dashboard-data-models-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use th |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:24:1 |
no-restricted-imports |
'../assets/svg/data-asset-rules.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:25:1 |
no-restricted-imports |
'../assets/svg/data-assets-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the desi |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:26:1 |
no-restricted-imports |
'../assets/svg/data-product-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designa |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:27:1 |
no-restricted-imports |
'../assets/svg/database-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designa |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:28:1 |
no-restricted-imports |
'../assets/svg/database-schema-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the desi |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:29:1 |
no-restricted-imports |
'../assets/svg/directory-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the design |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:30:1 |
no-restricted-imports |
'../assets/svg/domain-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated ab |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:31:1 |
no-restricted-imports |
'../assets/svg/drive-service-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the de |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:32:1 |
no-restricted-imports |
'../assets/svg/email-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abs |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:33:1 |
no-restricted-imports |
'../assets/svg/file-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:34:1 |
no-restricted-imports |
'../assets/svg/glossary-term-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the de |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:35:1 |
no-restricted-imports |
'../assets/svg/health-check.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abst |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:36:1 |
no-restricted-imports |
'../assets/svg/learning-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:37:1 |
no-restricted-imports |
'../assets/svg/lineage-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated a |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:38:1 |
no-restricted-imports |
'../assets/svg/login-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abs |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:39:1 |
no-restricted-imports |
'../assets/svg/messaging-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the design |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:40:1 |
no-restricted-imports |
'../assets/svg/metadata-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designa |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:41:1 |
no-restricted-imports |
'../assets/svg/metric-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designate |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:42:1 |
no-restricted-imports |
'../assets/svg/ml-models-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the design |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:43:1 |
no-restricted-imports |
'../assets/svg/notification-alert-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use t |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:44:1 |
no-restricted-imports |
'../assets/svg/persona-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated a |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:45:1 |
no-restricted-imports |
'../assets/svg/pipelines-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the design |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:46:1 |
no-restricted-imports |
'../assets/svg/policies-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designa |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:47:1 |
no-restricted-imports |
'../assets/svg/preferences-omd.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated a |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:48:1 |
no-restricted-imports |
'../assets/svg/profiler-configuration-colored.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use t |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:49:1 |
no-restricted-imports |
'../assets/svg/query-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:50:1 |
no-restricted-imports |
'../assets/svg/roles-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:51:1 |
no-restricted-imports |
'../assets/svg/search-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designate |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:52:1 |
no-restricted-imports |
'../assets/svg/search-index-colored-new.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the des |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:53:1 |
no-restricted-imports |
'../assets/svg/setting-access-control.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the desig |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:54:1 |
no-restricted-imports |
'../assets/svg/setting-custom-properties.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the de |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:55:1 |
no-restricted-imports |
'../assets/svg/setting-data-observability.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the d |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:56:1 |
no-restricted-imports |
'../assets/svg/setting-management.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designate |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:57:1 |
no-restricted-imports |
'../assets/svg/setting-notification.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designa |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:58:1 |
no-restricted-imports |
'../assets/svg/setting-services-omd.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designa |
| 🟡 | src/utils/GlobalSettingsClassBase.ts:59:1 |
no-restricted-imports |
'../assets/svg/settings-sso.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abst |
… and 14 more. Run make ui-checkstyle-changed locally for the full list.
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
|



Describe your changes:
Fixes #17898
Settings > Preferences > Login Configuration is only meaningful when OpenMetadata drives the login itself. The three settings there‚ max login fail attempts, access block time and JWT token expiry ‚ are enforced by the native login flow. Under an external IdP the IdP owns all three, so the values do nothing.
The page already knew this and skipped fetching the config for non-basic providers, but it still rendered, so it showed
--for every field and kept a working Edit button. Admins could save values that would never take effect.This hides the menu entry and 404s both routes when an external SSO provider is configured.
basic,ldapandopenmetadatakeep the page‚ the server routesopenmetadatathroughBasicAuthServletHandlerandLdapAuthenticatorreads the same three settings, so the configuration is genuinely enforced for all three.Type of change:
High-level design:
Added
isLoginConfigurationApplicable(provider)inAuthProvider.util.tsas the single rule, used by both surfaces so they cannot drift:GlobalSettingsClassBase.tsgates the menu entry on it alongside the existing admin check. Both the Preferences tiles and the settings nav derive from this list, so one change covers both.SettingsRouter.tsxredirects the details and edit routes toNOT_FOUND, matching the existing guards in that file.LoginConfigurationPage.tsxdrops its own provider check, which the route now makes unreachable.The provider is passed into
getGlobalSettingsMenuWithPermissionas an optional argument rather than read from the application store, so the util stays free of hook dependencies.Tests:
Use cases covered
Unit tests
Added unit tests.
src/utils/GlobalSettingsClassBase.test.ts, assertsisProtectedfor every provider in the enumsrc/components/AppRouter/SettingsRouter.test.tsx‚ route guards for both routes88 tests pass. Coverage:
GlobalSettingsClassBase.ts98.68%,SettingsRouter.tsx81.67%,GlobalSettingCategoryPage.tsx75.67%.GlobalSettingPage.tsxhas no existing test suite and none was added — the change there is three lines passing the provider through.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Pages/LoginConfiguration.spec.tsalready reaches the page by clicking the menu item, so it runs through this gate on every PR under the@basicproject. The SSO path can only run in the nightlysso-authproject against real IdP credentials, so it was verified manually instead.Manual testing performed
Tested against the local Keycloak fixture (
docker/local-sso/keycloak-saml), with the UI served from the application container.Before, on
custom-oidc: the page was reachable and showed--for all three fields, while the stored values were 2 / 30 / 3600.After, on the same provider as an admin:
/settings/preferences/loginConfiguration‚ 404 pageBasic auth unchanged: the page still shows 2 / 30 / 3600.
UI screen recording / screenshots:
Screen-Recording.52.mp4
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.The PR appears safe to merge; the earlier OpenMetadata-provider regression is fixed and no new actionable defects remain.
Summary
This PR hides Login Configuration when authentication is delegated to an external identity provider while preserving it for Basic, LDAP, and OpenMetadata authentication.
isLoginConfigurationApplicable.AuthProvider.Openmetadatais fixed.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Settings UI or direct login-configuration URL] --> B{Authentication provider} B -->|Basic, LDAP, OpenMetadata| C{Administrator} B -->|External identity provider| D[Hide menu entry] D --> E[Redirect direct routes to /404] C -->|Yes| F[Show Login Configuration] C -->|No| G[Deny through existing admin protection] F --> H[Fetch and edit enforced login settings]Reviews (6) · Last reviewed commit: "chore(playwright): auto-refresh impact-m..."