Skip to content

Set SameSite=Lax on SimpleAuthManager all-admins login cookie#66502

Merged
vincbeck merged 1 commit intoapache:mainfrom
potiuk:f-011-samesite-login-cookie
May 7, 2026
Merged

Set SameSite=Lax on SimpleAuthManager all-admins login cookie#66502
vincbeck merged 1 commit intoapache:mainfrom
potiuk:f-011-samesite-login-cookie

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 7, 2026

The all-admins login response set Secure (conditional on HTTPS) and HttpOnly on the JWT cookie but omitted SameSite. JWTRefreshMiddleware already sets samesite="lax" on the cookie it issues. Bring the login response in line so both code paths produce cookies with the same attributes.

The cookie's Secure flag was already set conditionally based on HTTPS or configured ssl_cert — only SameSite was missing.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Opus 4.7 (1M context)

Generated-by: Claude Opus 4.7 (1M context) following the guidelines

@potiuk potiuk requested a review from vincbeck as a code owner May 7, 2026 01:24
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label May 7, 2026
The all-admins login response set Secure (conditional on HTTPS) and
HttpOnly on the JWT cookie but omitted SameSite. JWTRefreshMiddleware
already sets samesite="lax" on the cookie it issues. Bring the login
response in line so both code paths produce cookies with the same
attributes.

The cookie's Secure flag was already set conditionally based on HTTPS
or configured ssl_cert — only SameSite was missing.
@potiuk potiuk force-pushed the f-011-samesite-login-cookie branch from 327d58c to 2b632f3 Compare May 7, 2026 02:21
@vincbeck vincbeck merged commit 314da4e into apache:main May 7, 2026
143 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants