Skip to content

Return 403 when the Keycloak access token is expired#59281

Merged
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:vincbeck/keycloak_refresh_api
Dec 10, 2025
Merged

Return 403 when the Keycloak access token is expired#59281
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:vincbeck/keycloak_refresh_api

Conversation

@vincbeck
Copy link
Copy Markdown
Contributor

Resolves #59277.

When calling the Airflow API using Keycloak auth manager with a Keycloak access token expired, the API returns 500. This fix makes it return 403.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Copy link
Copy Markdown
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit, not a blocker but would be good to clean

@vincbeck vincbeck force-pushed the vincbeck/keycloak_refresh_api branch from b133c5c to 9eaad61 Compare December 10, 2025 17:14
@vincbeck vincbeck merged commit f1fdcdc into apache:main Dec 10, 2025
82 checks passed
@vincbeck vincbeck deleted the vincbeck/keycloak_refresh_api branch December 10, 2025 17:39
jhgoebbert pushed a commit to jhgoebbert/airflow_Owen-CH-Leung that referenced this pull request Feb 8, 2026
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keycloak provider gives 500 on expired access token

3 participants