Repository navigation
Return 403 when Keycloak UMA ticket grant returns invalid_grant - #73234
Merged
vincbeck merged 3 commits intoSep 21, 2026
Merged
Conversation
shashank-iitbhu
requested review from
bugraoz93 and
vincbeck
as code owners
September 16, 2026 06:36
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
shahar1
reviewed
Sep 17, 2026
shahar1
left a comment
Contributor
There was a problem hiding this comment.
Please fix static checks
eladkal
reviewed
Sep 21, 2026
…he#73232) Keycloak's uma-ticket grant often returns HTTP 400 invalid_grant when the nested access token used as bearer is expired. Treat that the same as 401 so the API returns 403 instead of raising AirflowException as HTTP 500. Signed-off-by: Shashank Mittal <[email protected]>
Signed-off-by: Shashank Mittal <[email protected]>
eladkal
force-pushed
the
fix-keycloak-uma-invalid-grant-500
branch
from
September 21, 2026 05:17
ea3f541 to
fecaf5e
Compare
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
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.
Keycloak's UMA
uma-ticketgrant often returns HTTP 400invalid_grant/Invalid bearer tokenwhen the nested Keycloak access token has expired._is_authorizedand_is_batch_authorizedcurrently raiseAirflowExceptionfor that 400, which the API server surfaces as HTTP 500.401 is already treated as unauthorized (#59281). 400
invalid_resourceon team resources is already treated as deny (#69028). This maps 400invalid_grantonto the same deny path so API clients get 403 instead of 500 and can remint.invalid_scopeand other unrecognized 400s still raise.closes: #73232
Was generative AI tooling used to co-author this PR?
Generated-by: Cursor following the guidelines