Revoke JWT on /auth/logout regardless of auth manager logout URL#67289
Merged
Conversation
vincbeck
approved these changes
May 21, 2026
jscheffl
approved these changes
May 21, 2026
Previously, when an auth manager's get_url_logout() returned a URL, the /auth/logout endpoint short-circuited via early return and never invoked auth_manager.revoke_token(token_str). The JWT therefore remained valid after logout for auth managers like FabAuthManager and KeycloakAuthManager that redirect to an external logout URL. Move the revoke_token call before the early return so logout reliably invalidates the JWT token regardless of which auth manager is configured.
38daa2f to
4fecf73
Compare
eladkal
approved these changes
May 22, 2026
Contributor
Backport successfully created: v3-2-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
github-actions Bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
May 22, 2026
…out URL (apache#67289) Previously, when an auth manager's get_url_logout() returned a URL, the /auth/logout endpoint short-circuited via early return and never invoked auth_manager.revoke_token(token_str). The JWT therefore remained valid after logout for auth managers like FabAuthManager and KeycloakAuthManager that redirect to an external logout URL. Move the revoke_token call before the early return so logout reliably invalidates the JWT token regardless of which auth manager is configured. (cherry picked from commit b1aec75) Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
aws-airflow-bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
May 22, 2026
…out URL (apache#67289) Previously, when an auth manager's get_url_logout() returned a URL, the /auth/logout endpoint short-circuited via early return and never invoked auth_manager.revoke_token(token_str). The JWT therefore remained valid after logout for auth managers like FabAuthManager and KeycloakAuthManager that redirect to an external logout URL. Move the revoke_token call before the early return so logout reliably invalidates the JWT token regardless of which auth manager is configured. (cherry picked from commit b1aec75) Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
jason810496
pushed a commit
that referenced
this pull request
May 23, 2026
…out URL (#67289) (#67362) Previously, when an auth manager's get_url_logout() returned a URL, the /auth/logout endpoint short-circuited via early return and never invoked auth_manager.revoke_token(token_str). The JWT therefore remained valid after logout for auth managers like FabAuthManager and KeycloakAuthManager that redirect to an external logout URL. Move the revoke_token call before the early return so logout reliably invalidates the JWT token regardless of which auth manager is configured. (cherry picked from commit b1aec75) Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
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.
The
/auth/logoutendpoint previously short-circuited via early return when an auth manager'sget_url_logout()returned a URL, andauth_manager.revoke_token(token_str)was never called.Move the
revoke_tokencall before the early return so logout reliably invalidates the JWT token regardless of which auth manager is configured. Both branches are covered by tests:test_logout_revokes_token—get_url_logout()returnsNone(existing test).test_logout_revokes_token_when_logout_url_redirects—get_url_logout()returns a URL (new test).Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines