Skip to content

Conversation

@vincbeck
Copy link
Contributor

When the token is invalid, the middleware JWTRefreshMiddleware creates a 500. Handle this use case. An easy reproducible step is to not set AIRFLOW__API_AUTH__JWT_SECRET, and restarting breeze while keeping your browser open.

See discussion in Slack.


^ 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.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Oct 20, 2025
@jscheffl
Copy link
Contributor

The PR that broke it... did this go to v3-1-test and do we need to backport this?

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Can confirmt his fixes it! Thanks for helping out (faster than I was able to make my hands dirty...)

@vincbeck
Copy link
Contributor Author

The PR that broke it... did this go to v3-1-test and do we need to backport this?

No, JWTRefreshMiddleware is not in v3-1-test branch

@vincbeck vincbeck merged commit d0e6222 into apache:main Oct 20, 2025
113 checks passed
@vincbeck vincbeck deleted the vincbeck/fix_invalid_token branch October 20, 2025 20:25
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Oct 20, 2025
pierrejeambrun pushed a commit to astronomer/airflow that referenced this pull request Dec 8, 2025
@ephraimbuddy ephraimbuddy added this to the Airflow 3.1.4 milestone Dec 8, 2025
@pierrejeambrun
Copy link
Member

No, JWTRefreshMiddleware is not in v3-1-test branch

Apparently that changed, backport PR #58649, so we need to backport this too.

ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
@vincbeck
Copy link
Contributor Author

vincbeck commented Dec 8, 2025

No, JWTRefreshMiddleware is not in v3-1-test branch

Apparently that changed, backport PR #58649, so we need to backport this too.

Very good catch! I can do it

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Dec 8, 2025

@vincbeck Ephraim is on it. (same for the other PR). As he is cutting rc2

@vincbeck
Copy link
Contributor Author

vincbeck commented Dec 8, 2025

@vincbeck Ephraim is on it. (same for the other PR). As he is cutting rc2

Even better! Thanks for the heads-up

ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants