-
Notifications
You must be signed in to change notification settings - Fork 16.4k
AIP-81 | AIP-84 | Include Token Generation Endpoints in FAB #47043
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
AIP-81 | AIP-84 | Include Token Generation Endpoints in FAB #47043
Conversation
vincbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might miss some context here but do we need to make these changes in all auth managers in regards to AIP-81? I thought we were going to use simple auth manager as auth manager for AIP-81 but from this PR I guess we want to use the auth manager configured in the environment?
providers/fab/src/airflow/providers/fab/auth_manager/api_endpoints/login.py
Show resolved
Hide resolved
providers/fab/src/airflow/providers/fab/auth_manager/api_endpoints/login.py
Outdated
Show resolved
Hide resolved
providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
Outdated
Show resolved
Hide resolved
providers/fab/src/airflow/providers/fab/auth_manager/api_endpoints/login.py
Outdated
Show resolved
Hide resolved
Thanks a lot for the early feedback! :) For AIP-81, in the end, people will get their tokens from profile pages but if they are using FAB, they won't be able to use CLI. Since the integration with FastAPI is now happening in FAB, I thought, why not support both if we can at the same time. |
b78c71a to
00a2416
Compare
|
The skeleton is here now. Please check when you have time Vincent. |
00a2416 to
8bfd861
Compare
providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/login.py
Outdated
Show resolved
Hide resolved
|
I will check the tests |
providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
Outdated
Show resolved
Hide resolved
29629a2 to
24703c0
Compare
vincbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A doc in FAB provider would super useful to explain to users how to use this API in order to get a token. This will be the only way for users to call Rest API so it will be definitely super useful!
providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
Outdated
Show resolved
Hide resolved
Thanks for the quick reviews! I will address them soon. I agree, it would be really useful, I will also include documentation. This will be kind of a breaking change in the API usage. Should we include I am surprised that the unit tests are fine in my local and not in the CI. I need to check the environment and dependencies and maybe image rebuild. |
Newsfragment is a good idea :) |
24703c0 to
5ebf893
Compare
|
I will fix the static check and test soon. It seems it still needs a couple of touches |
5ebf893 to
1d64d2e
Compare
providers/fab/tests/unit/fab/auth_manager/api_fastapi/routes/test_login.py
Outdated
Show resolved
Hide resolved
providers/fab/tests/unit/fab/auth_manager/api_fastapi/routes/test_login.py
Outdated
Show resolved
Hide resolved
…specs to pre-commit, exclude openapi specs from licence check, include unit tests
…with methods, remove refresh token logic from FAB
…enapi specs to pre-commit
… comparison to keep out of API scope, update docstring, update default values directly from conf, remove not necessary imports
…est checking providers module have tests, fix docs
e896c77 to
92cbcae
Compare
|
Thanks for the review and all the comments, Vincent! :) |
vincbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think the documentation can be updated and improved based on the discussion I started here. But that can be done in a separate PR
Thanks! I was thinking about documentation and whether should we wait for the discussion you started or not. I agree, let's improve it iteratively whenever it is needed. I can create follow-ups |
|
The errors are unrelated to this PR. Merging |
closes: #46916
relates: #47055
Remaining Work:
^ 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.rstor{issue_number}.significant.rst, in newsfragments.