Skip to content

Conversation

@vincbeck
Copy link
Contributor

This PR creates the core components of AIP-56:

  • The auth manager interface
  • The FAB auth manager

To start off, we use the auth manager for a very simple use case: retrieving the user name to display it on the UI (on the top right corner).

Resolves #32188, #32189 and #32190


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

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Jun 27, 2023
"""
Return the username associated to the user in session.

For backward compatibility reasons, the username in FAB auth manager is the concatenation of the
Copy link
Contributor

Choose a reason for hiding this comment

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

backward compatibility with what ? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Current experience :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can mention "legacy user management"


conf = initialize_config()
secrets_backend_list = initialize_secrets_backends()
auth_manager = initialize_auth_manager()
Copy link
Contributor

Choose a reason for hiding this comment

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

This module is already hugely dependent on a lot of other modules and very often creates import cycles. Does this have to be initialized here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The auth manager will be used in a lot of code/modules in Airflow. That's where I think it makes to more sense but I can move it if there is a better location to do so

@vincbeck
Copy link
Contributor Author

vincbeck commented Jul 4, 2023

Any comments/concerns/feedbacks?

@vincbeck
Copy link
Contributor Author

vincbeck commented Jul 5, 2023

@potiuk , you might be interested in this one :)

@potiuk
Copy link
Member

potiuk commented Jul 5, 2023

I think it's a great start !

@vincbeck vincbeck merged commit d3f0900 into apache:main Jul 5, 2023
@vincbeck vincbeck deleted the vincbeck/auth_manager_init branch July 5, 2023 16:52
@pierrejeambrun pierrejeambrun added the AIP-56 Extensible user management label Jul 5, 2023
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.0 milestone Jul 6, 2023
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-56 Extensible user management area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-56 - Create auth manager interface

7 participants