Repository navigation
Fixes #39253: Accept SAML strict-mode sign-ins behind a TLS-terminating proxy (backport 2.1 #39255) - #39256
Conversation
…ng proxy (backport 2.1 #39255) With Strict Mode on, java-saml compares a response's Destination and the Recipient of its bearer SubjectConfirmationData with the URL the request arrived on. When TLS ends at a load balancer, the server sees the identity provider's post to the https ACS arrive over http, so every response was rejected ("The response was received at http://... instead of https://..."), on the live login and on Test Login. Both paths now have java-saml compare with the configured ACS URL, the URL SamlResponseValidator already compares Destination with outside strict mode. A response addressed to any other URL is still rejected. ADR:2026-11-27-saml-strict-mode-checks-the-configured-acs-url
❌ 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 riskChanging strict SAML destination checks changes which identity-provider responses authenticate; an ACS configuration mismatch could admit a response at an unintended endpoint. Fixes SAML strict-mode sign-ins behind a TLS-terminating proxy by comparing the response's 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 |
Describe your changes:
Backport of #39255 to 2.1 (fixes #39253).
With Strict Mode on, every SAML sign-in behind a TLS-terminating load balancer or ingress fails, on the live login and in Test Login, with
The response was received at http://<host>/callback instead of https://<host>/callback. java-saml's strict mode compared the response'sDestinationandRecipientwith the URL the request arrived on, which ishttp://once TLS ends at the proxy. It now compares them with the configured ACS URL, asSamlResponseValidator.validatealready does outside strict mode. A response addressed to any other URL is still rejected.The cherry-pick applied cleanly: the SAML handlers,
SamlResponseValidatorand their tests are the same on 2.1 as on main, and the decision record it adds cites only records 2.1 has.Type of change:
Tests:
Unit tests
SamlResponseValidatorTest(2 strict-mode cases),SamlAuthServletHandlerTest#handleCallback_strictModeAcceptsAResponseThatATlsTerminatingProxyForwardedOverHttp,TestLoginSamlHandlerTest#strictModeAcceptsAResponseThatATlsTerminatingProxyForwardedOverHttp.*Saml*TestandTestLogin*Testclasses pass locally (232 tests, 0 failures), run on 2.1 at 058ed47. The commits 2.1 gained since then touch no SAML code.SamlIdpCertificateMigrationTestneeds Docker, which was unavailable here, and its hang keptSamlSettingsHolderTestfrom running. Neither covers the changed code.Backend integration tests
Playwright (UI) tests
🤖 Generated with Claude Code