Skip to content

Extend KeycloakJWTMiddleware from JWTRefreshMiddleware - #70707

Merged
vincbeck merged 1 commit into
apache:mainfrom
stephen-bracken:pass-request
Nov 23, 2026
Merged

vincbeck merged 1 commit into
apache:mainfrom
stephen-bracken:pass-request

Conversation

@stephen-bracken

@stephen-bracken stephen-bracken commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

related: #70550 #70783

Extend the JWTRefreshMiddleware.refresh_user() interface in KeycloakJWTMiddleware

Make KeycloakAuthManager.get_jwt_middleware() return KeycloakJWTMiddleware, inheriting from JWTRefreshMiddleware to maintain the jwt flow and remove bypassing the flow in the base middleware. This also incorporates changes from #74856 to speed up api server operations.

Preserve fixes from #76353 and #73695 in KeycloakJWTMiddleware.refresh_user(), and move subject validation to KeycloakAuthManager._attach_keycloak_tokens() to ensure that the Keycloak token subject always matches the user id.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
  • No

@stephen-bracken stephen-bracken changed the title Resolve Keycloak tokens from request cookies in get_user_from_token() Resolve Keycloak tokens from request cookies in KeycloakAuthManager.get_user_from_token(), add request object to resolve_user_from_token() Jul 29, 2026
@stephen-bracken
stephen-bracken force-pushed the pass-request branch 4 times, most recently from 1c0cc45 to 1a9cf0d Compare July 29, 2026 23:38
@stephen-bracken
stephen-bracken force-pushed the pass-request branch 3 times, most recently from bf78928 to 3669a91 Compare July 30, 2026 10:15
@stephen-bracken stephen-bracken changed the title Resolve Keycloak tokens from request cookies in KeycloakAuthManager.get_user_from_token(), add request object to resolve_user_from_token() Override JWTRefreshMiddleware in KeycloakAuthManager to handle Keycloak JWT Cookies Jul 30, 2026
@stephen-bracken
stephen-bracken force-pushed the pass-request branch 4 times, most recently from d225f24 to bf8b4ff Compare July 31, 2026 14:56
@stephen-bracken
stephen-bracken force-pushed the pass-request branch 2 times, most recently from 7cdf80a to 5909a7c Compare July 31, 2026 18:46
@stephen-bracken
stephen-bracken force-pushed the pass-request branch 6 times, most recently from 4231c16 to 7064369 Compare August 12, 2026 19:21
@stephen-bracken stephen-bracken changed the title Override JWTRefreshMiddleware in KeycloakAuthManager to handle Keycloak JWT Cookies Make KeycloakJWTMiddleware inherit from JWTRefreshMiddleware Aug 12, 2026
@stephen-bracken
stephen-bracken force-pushed the pass-request branch 3 times, most recently from 95a2c08 to 352362f Compare August 12, 2026 19:33
Comment thread airflow-core/src/airflow/__init__.py Resolved
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Fork CI: green. CI for the latest commit passed in your fork. The pull request is ready for maintainer review.

Pull requests from contributors run their CI in the contributor's own fork. GitHub Actions is free and has no minute limit on public forks, while the CI capacity of the Apache Software Foundation is shared by every ASF project and is finite.

Fork CI tested this branch merged with main at 7da664565f, as project CI would, 0 commits behind main when the run turned green.

Latest run: https://github.com/stephen-bracken/airflow/actions/runs/44927042860

How this works: CI in your fork.


This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated.

@stephen-bracken

This comment was marked as resolved.

Comment thread docs/spelling_wordlist.txt Resolved
@stephen-bracken

Copy link
Copy Markdown
Contributor Author

@vincbeck tests are passing on 3.3.2 now, many thanks for your review on this!

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 area:providers fork ci required Gated by AIP-120: CI must pass in the contributor's fork. Managed by the fork CI reconciler. provider:keycloak ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants