-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Update auth manager documentation to reflect Airflow 3 changes #52586
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This pull request updates the auth manager documentation to reflect changes introduced in Airflow 3. Key changes include the addition of a "User representation" section, updated authentication and authorization methods, and new optional methods for enhanced functionality.
Co-authored-by: Copilot <[email protected]>
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.
left a few suggestions for clarification, but thank you for putting this together! I'll aim to try adding some more doc info in the coming weeks for the other aspects discussed in the linked issue.
:class:`~airflow.api_fastapi.auth.managers.base_auth_manager.BaseAuthManager` defines an authentication manager, | ||
parameterized by a user class T representing the authenticated user type. | ||
Auth manager implementations (subclasses of :class:`~airflow.api_fastapi.auth.managers.base_auth_manager.BaseAuthManager`) | ||
should specify the associated concrete user type. Each auth manager has its own user type definition. |
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.
maybe worth noting that the concrete user type should be a subclass of airflow.api_fastapi.auth.managers.models.base_user.BaseUser
|
||
JWT token management by auth managers | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
The auth manager is responsible for creating the JWT token needed to interact with Airflow public API. | ||
To achieve this, the auth manager **must** provide an endpoint to create this JWT token. This endpoint must be | ||
available at ``POST /auth/token`` | ||
To achieve this, the auth manager **must** provide an endpoint to create this JWT token. This endpoint is usually |
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.
If the token generation endpoint path doesn't strictly have to be at /auth/token
, it might be worth clarifying if what dictates how Airflow determines which custom auth manager endpoint to use for token generation.
Related #51971.
Auth manager doc has not been updated to reflect Airflow 3 status.
^ 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.