Repository navigation
Repair a SAML browser callback saved as the ACS URL - #38488
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High risk 1 closed / 1 findingsPreserving custom authorizer and request-filter classes during SSO saves changes authorization behavior; retained custom rules could grant or deny access unexpectedly. Repairs the SAML browser callback that was saved as the ACS URL, so logins without a redirect parameter no longer end on the POST-only ACS endpoint with a 405, and keeps a configured authorizer class and request filter when saving SSO settings. Resolved the finding where the ACS-callback repair dropped the base path from the replacement URL. No open issues found. ✅ 1 closed✅ Edge Case: ACS-callback repair drops the base path from the replacement URL
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
UI browser testsRan: all test files (no impact map from main yet) Result: ❌ 2 failed · 1068 passed · 154 skipped Changed code executed by these browser tests: 3 / 14 lines (21%)
Changed files no browser test loads
|
Describe your changes:
Follow-up to PR #38219. The 2.0 and 2.1 copies get the same change in PR #38441 and PR #38302.
1. Repair a SAML browser callback that points at the ACS URL.
The identity provider POSTs to the ACS URL (
/api/v1/saml/acs); the user then lands on the browser callback (/callback). An intermediate version ofcleanupSamlSp, shipped only in unreleased code, saved the ACS URL into bothcallbackUrlandsp.callback. PR #38219 stopped new saves from doing that but kept existing wrong values, so a login started without a redirect parameter (GET /api/v1/saml/login) ends on the POST-only ACS servlet with a 405.resolveSamlBrowserCallbacknow skips a saved callback that equals the ACS URL or ends with/api/v1/saml/acs, keeps the first usable one ofcallbackUrlandsp.callback, and otherwise derives/callbacknext to the ACS, keeping any base path (https://host/om/api/v1/saml/acsgiveshttps://host/om/callback).cleanupProviderSpecificFieldsnow works on a deep copy and the form keeps its own copy of the saved configuration: before, the cleanup also rewrote the saved snapshot, so the repair never reached the PATCH. The next save repairs the stored value.2. Update the
idpX509Certificatedescription.It still said expired keys are dropped when settings are built. Since ADR:2026-11-20-saml-runtime-trust-preserves-configured-signing-keys, every configured certificate is trusted at runtime, expired ones included, so a retired key must be removed by hand; saving still needs one currently valid certificate. The schema and its generated copies are updated together, as PR #38219 did.
No issue exists for this follow-up, so Validate PR Metadata will fail.
Type of change:
High-level design:
N/A, small change.
Tests:
Use cases covered
callbackUrl,sp.callbackandsp.acsall point at/api/v1/saml/acsis saved through the SSO form with a PATCH that sets both callbacks to/callback; the ACS URL is kept.sp.callbackis kept when onlycallbackUrlis the ACS URL.Unit tests
SSOUtils.test.tsanduseSsoConfiguration.test.ts: the new cases fail without their fix (the hook test sees no PATCH at all) and pass with it.yarn test src/components/SettingsSso src/utils/SSOUtils: 13 suites, 467 tests passed. ESLint and Prettier clean.mvn -pl openmetadata-spec packagepasses.Backend integration tests
Playwright (UI) tests
Manual testing performed
None.
UI screen recording:
Not applicable: no visible UI change.
Checklist:
Summary by Gitar
classNameandcontainerRequestFilterwhen saving SSO settings; defaults fill only missing valuesThis will update automatically on new commits.


Confidence Score: 5/5
The PR appears safe to merge; both previous issues are addressed.Summary
Repairs saved SAML browser callbacks without changing the ACS URL.
Both previous, unnumbered review threads are fully addressed. No new actionable issues were found.
Reviews (5) · Last reviewed commit: "Keep a configured authorizer class and r..." · Reviewed by Greptile