Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FAB auth manager login process compatible with Airflow 3 UI #45765

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

vincbeck
Copy link
Contributor

The plan to support FAB auth manager in Airflow 3 is:

  • Create a trimmed version of the Airflow 2 Flask application in FAB provider. This is done ✅
  • Embed this Flask application in fastapi application using WSGIMiddleware when FAB auth manager is the auth manager configured in the Airflow environment. This is done ✅
  • Update the FAB provider Flask application login process to be compatible with Airflow 3 UI. This is this PR
  • Update get_url_login method in FAB auth manager to return the appropriate login URL so that the fastapi application can retrieve this value and pass it to the front-end. On the front-end, if the user is not authenticated, it will redirect the user to this URL. It will be done in a future PR.

Testing

You can test this PR by going to <endpoint>/auth/loginand enter credentials. If you get successfully authenticated you'll be redirected to Airflow 3 UI with a JWT token.


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

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Thanks for the details. Those are answering the question I had on the related PR for the SimpleAuthManager route conversion to FastAPI.

Thanks.

@vincbeck vincbeck force-pushed the vincbeck/fab_login_form branch from e0bb6ff to bd235fd Compare January 20, 2025 20:16
@vincbeck vincbeck merged commit 2d9ab54 into apache:main Jan 21, 2025
62 checks passed
@vincbeck vincbeck deleted the vincbeck/fab_login_form branch January 21, 2025 15:52
@tirkarthi tirkarthi mentioned this pull request Jan 25, 2025
5 tasks
gpathak128 pushed a commit to gpathak128/airflow that referenced this pull request Jan 29, 2025
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
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.

2 participants