Skip to content

Fixes #39253: Accept SAML strict-mode sign-ins behind a TLS-terminating proxy (backport 2.1 #39255) - #39256

Merged
mohityadav766 merged 1 commit into
2.1from
backport/2.1/saml-strict-mode-tls-proxy
Nov 30, 2026
Merged

mohityadav766 merged 1 commit into
2.1from
backport/2.1/saml-strict-mode-tls-proxy

Conversation

@mohityadav766

Copy link
Copy Markdown
Member

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's Destination and Recipient with the URL the request arrived on, which is http:// once TLS ends at the proxy. It now compares them with the configured ACS URL, as SamlResponseValidator.validate already does outside strict mode. A response addressed to any other URL is still rejected.

The cherry-pick applied cleanly: the SAML handlers, SamlResponseValidator and 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:

  • Bug fix

Tests:

Unit tests

  • Same tests as Fixes #39253: Accept SAML strict-mode sign-ins behind a TLS-terminating proxy #39255: SamlResponseValidatorTest (2 strict-mode cases), SamlAuthServletHandlerTest#handleCallback_strictModeAcceptsAResponseThatATlsTerminatingProxyForwardedOverHttp, TestLoginSamlHandlerTest#strictModeAcceptsAResponseThatATlsTerminatingProxyForwardedOverHttp.
  • 18 of the 20 *Saml*Test and TestLogin*Test classes pass locally (232 tests, 0 failures), run on 2.1 at 058ed47. The commits 2.1 gained since then touch no SAML code. SamlIdpCertificateMigrationTest needs Docker, which was unavailable here, and its hang kept SamlSettingsHolderTest from running. Neither covers the changed code.

Backend integration tests

  • Not applicable (no backend API changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

🤖 Generated with Claude Code

…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
@mohityadav766
mohityadav766 requested a review from a team as a code owner November 30, 2026 09:13
@mohityadav766
mohityadav766 requested review from TeddyCr and removed request for a team November 30, 2026 09:13
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

Changing 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 Destination and Recipient against the configured ACS URL instead of the incoming http:// request URL. Responses addressed to any other URL are still rejected. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@mohityadav766
mohityadav766 merged commit 2e3666e into 2.1 Nov 30, 2026
47 of 49 checks passed
@mohityadav766
mohityadav766 deleted the backport/2.1/saml-strict-mode-tls-proxy branch November 30, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants