Repository navigation
Set cookie_samesite=none on session cookie for cross-domain SAML POSTs - #144
Merged
Merged
Conversation
… cross-domain SAML POSTs Fixes OpenConext/Stepup-Gateway#652: the session cookie was dropped by browsers on cross-domain SAML HTTP-POST bindings under the default SameSite=Lax policy. cookie_secure is hardcoded to true (was auto) because this app has no trusted_proxies configured, so auto could resolve to a non-secure cookie behind the HAProxy TLS terminator — and browsers silently drop SameSite=None cookies that aren't marked Secure.
johanib
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes OpenConext/Stepup-Gateway#652.
Sets
cookie_samesite: noneon the base Symfony session config so this app's session cookie survives cross-domain SAML HTTP-POST bindings, which browsers otherwise drop under the default SameSite=Lax policy.cookie_secureis changed fromautototrue: this app has notrusted_proxiesconfigured, soautocould resolve to a non-secure cookie behind the HAProxy TLS terminator, and browsers silently drop SameSite=None cookies that aren't marked Secure. The unrelated locale cookie set inLocaleResponseListenerwas left untouched (out of scope).Part of the same fix landing in Stepup-Gateway, Stepup-Middleware, and Stepup-RA.