Repository navigation
[2.1] Fixes #37056: backport SAML and Test Login fixes; align migration to 2.0.10 - #38302
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 |
| const resolveSamlBrowserCallback = ( | ||
| acs: string, | ||
| configuredCallback: string | undefined | ||
| ): string | undefined => { | ||
| try { | ||
| const url = new URL(acs); | ||
|
|
||
| return url.pathname.endsWith('/callback') | ||
| ? acs | ||
| : configuredCallback || `${url.origin}/callback`; | ||
| } catch { | ||
| return configuredCallback; | ||
| } | ||
| }; | ||
|
|
There was a problem hiding this comment.
⚠️ Quality: SAML ACS/browser-callback split rule has no decision record
This commit changes the sp.acs / sp.callback / callbackUrl payload that the backend reads. SamlSettingsHolder takes relayState from sp.callback and uses sp.acs as the java-saml ACS URL. cleanupSamlSp no longer forces all three to the same value. It keeps a non-/callback ACS (such as the legacy /api/v1/saml/acs) as its own endpoint and resolves the browser callback in this order: the ACS when it ends in /callback, otherwise the configured root callbackUrl, otherwise sp.callback, otherwise ${origin}/callback. The description states the rule ("The browser callback is kept separate from a legacy /api/v1/saml/acs assertion endpoint, and origin plus /callback is derived only when no browser callback is configured"), but none of docs/decisions/ records it. The repo squash-merges, so the rule would survive only in code. The two ADRs this PR adds or amends cover certificate trust and claim mappings, not this. A record should state: "For SAML, sp.acs is the IdP assertion endpoint and sp.callback/callbackUrl is the browser landing URL. They are equal only when the ACS path ends in /callback. Otherwise the saved browser callback is kept, and <acs origin>/callback is used only when none is configured."
Add an amendment to the 2026-11-19 SAML ADR, or write a new record, that states the ACS/callback precedence rule.:
## Amendment v3 — ACS and browser callback are distinct
`sp.acs` is the IdP assertion endpoint; `sp.callback` and `callbackUrl` are the browser landing URL.
They are equal only when the ACS path ends in `/callback`. Otherwise the configured browser
callback (root `callbackUrl`, then `sp.callback`) is kept, and `<acs origin>/callback` is derived
only when none is configured. A legacy `/api/v1/saml/acs` ACS is never used as the browser callback.
Was this helpful? React with 👍 / 👎
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
Describe your changes
Fixes #37056.
Backport all application fixes from main #38219 to 2.1 and retain the Test Login migration correction to 2.0.10. All eight application commits cherry-picked cleanly; no branch-specific code adaptations were needed. All 61 changed files match main's final content at 539da72.
Type of change
High-level design
Counterparts: main #38219; 2.0 migration correction #38301 following merged feature backport #38197.
Jest follow-up (eaffe1b)
The CI failure was a stale English-label expectation after translating Require Encrypted Assertions. Both Strict Mode assertions now expect the translation key returned by the shared Jest mock. No production code changed.
useSsoConfiguration.test.tspassed locally using shared dependencies and a temporary mapping to this checkout's actual icon sources.Tests
At 2ca6127:
Local Java test run: PASSED
2ca612721663(baseorigin/2.1)--scope full).Ingestion integration tests
Not applicable — no ingestion changes.
UI screen recording
Not applicable — clean backport of existing correctness fixes.
Checklist
Review follow-up (e0ed059)
Addresses Adria/manerow's review findings and the related bot comments:
The remaining SAML help text must use translation keys before merging to satisfy the repository requirement.
Findings
Summary
This PR backports SAML and Test Login fixes to
2.1and moves the session-table migration to2.0.10.Reviews (15) · Last reviewed commit: "Keep a configured authorizer class and r..." · Reviewed by Greptile