Skip to content

Set cookie_samesite=none on session cookie for cross-domain SAML POSTs - #144

Merged
kayjoosten merged 1 commit into
mainfrom
fix/issue-652-samesite-none
Sep 15, 2026
Merged

kayjoosten merged 1 commit into
mainfrom
fix/issue-652-samesite-none

Conversation

@kayjoosten

Copy link
Copy Markdown
Contributor

Fixes OpenConext/Stepup-Gateway#652.

Sets cookie_samesite: none on 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_secure is changed from auto to true: 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. The unrelated locale cookie set in LocaleResponseListener was left untouched (out of scope).

Part of the same fix landing in Stepup-Gateway, Stepup-Middleware, and Stepup-RA.

… 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.
@kayjoosten
kayjoosten merged commit e1fb932 into main Sep 15, 2026
1 check passed
@kayjoosten
kayjoosten deleted the fix/issue-652-samesite-none branch September 15, 2026 08:07
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.

Set sameSite=none for all cookies that are required at cross site POSTs

2 participants