Move keycloak JWT tokens to separate cookies - #70550
Merged
Merged
Conversation
stephen-bracken
force-pushed
the
keycloak-separate-cookie
branch
13 times, most recently
from
July 29, 2026 10:58
c5e74e5 to
459a2cc
Compare
stephen-bracken
marked this pull request as ready for review
July 29, 2026 10:58
stephen-bracken
force-pushed
the
keycloak-separate-cookie
branch
2 times, most recently
from
July 29, 2026 12:42
cd87392 to
c4a7a8d
Compare
vincbeck
approved these changes
Jul 29, 2026
vincbeck
left a comment
Contributor
There was a problem hiding this comment.
Code looks pretty solid!
stephen-bracken
force-pushed
the
keycloak-separate-cookie
branch
2 times, most recently
from
July 29, 2026 13:29
664b0f5 to
f709188
Compare
stephen-bracken
force-pushed
the
keycloak-separate-cookie
branch
from
July 29, 2026 14:18
f709188 to
e82a163
Compare
Contributor
Author
|
@vincbeck I need to do a followup PR on this, I don't think the cookie is being retrieved correctly here unfortunately |
Contributor
|
Please do. Please also do some testing before, that would avoid this kind of situation |
2 tasks
2 tasks
This was referenced Aug 2, 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.
Move Keycloak JWT tokens out of Airflow JWT
closes: #61771
The Keycloak
access_tokenandrefresh_tokenfields of the Airflow JWT make the cookie set in the browser very large. Most browsers use a cookie size limit of 4096 bytes by default, so with a modest number of claims on the Keycloak JWTs the Airflow JWT will easily fill this limit. If we convert theKeycloakAuthManagerUserinto a pydantic model, FastAPI can automatically insert the values of cookies into the appropriate fields when the user is being requested.https://fastapi.tiangolo.com/tutorial/cookie-param-models/#cookies-with-a-pydantic-model
Was generative AI tooling used to co-author this PR?