-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Extract the part that depends on the auth manager from the standalone command #33676
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
Conversation
4a42818 to
830380e
Compare
830380e to
40375ad
Compare
|
Why does this logic live in the override instead of the base class? The logic seems entirely generic to me. |
Yeah I can see both opinions on whether we want to have this logic regardless of the auth manager used. But I think you are right and we might want to keep it. However, doing so means exposing |
|
yeah my understanding was that there was a pretty decent chance that alternative auth managers would not offer user and role management through airflow, but use their own UI/API instead. |
|
Yes. Creating and managing users is IMHO completely outside of AuthManager. I think we should simply make assumption that "standalone" option always uses FABAuthManager, hard-code it and use it directly. It makes very little sense to have "generic" Auth Manager for "standalone" airflow. Standalone means much more than "one command" - it also means "everything is self-contained" including authenticaiton/authorisation. "Standalone" almost by definition means "I do not need anything external to run". |
The current change here at least lets other auth managers work with standalone if they want to. Standalone still comes with a bit of flexibility, it uses sqlite by default for example, but can be configured to rely on a "real" DB. The alternative, if we really want standalone to only work with FAB, is to move the airflow standalone command to FAB CLI (like we did for the |
|
@uranusjr does it make more sense now? |
|
I don’t have strong feelings on this so since multiple people say this is fine I’ll flow with this. |
Moved the admin user creation to the security manager so that