You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vandonr-amz (via GitHub)" <gi...@apache.org> on 2023/08/23 21:16:28 UTC
[GitHub] [airflow] vandonr-amz opened a new pull request, #33676: Extract the part that depends on the auth manager from the standalone command
vandonr-amz opened a new pull request, #33676:
URL: https://github.com/apache/airflow/pull/33676
only the last commit "counts", the rest is because it's stacked on top of #33481
I just moved the admin user creation, but somehow it feels like this should be the responsibility of this method:
https://github.com/apache/airflow/blob/cc360b73c904b7f24a229282458ee05112468f5d/airflow/auth/managers/fab/security_manager/modules/db.py#L61-L66
Which is already called just before we actually create the admin user !
...but `_builtin_roles` is empty when we call it, so nothing is created.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1720156794
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. "Standalone" almost by definition means "I do not need anything external to run".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1735311050
I don’t have strong feelings on this so since multiple people say this is fine I’ll flow with this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] vincbeck commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1719674280
> 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 `find_user`, `add_user` and `find_role` APIs in auth manager.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] vincbeck merged pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #33676:
URL: https://github.com/apache/airflow/pull/33676
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] vincbeck commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1733794734
@uranusjr doesit make more sense now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] vandonr-amz commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "vandonr-amz (via GitHub)" <gi...@apache.org>.
vandonr-amz commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1721456573
> I think we should simply make assumption that "standalone" option always uses FABAuthManager
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.
Do you think this is fine ?
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 `users` and `roles` CLI commands). But do we really want to introduce this restriction when it's easy to offer more flexibility ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1718738710
Why does this logic live in the override instead of the base class? The logic seems entirely generic to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] vandonr-amz commented on pull request #33676: Extract the part that depends on the auth manager from the standalone command
Posted by "vandonr-amz (via GitHub)" <gi...@apache.org>.
vandonr-amz commented on PR #33676:
URL: https://github.com/apache/airflow/pull/33676#issuecomment-1719864907
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.
In that context, it might be weird to ask them to expose `add_user` for instance. Especially if it's only for this very specific use case that will probably never happen in a corporate setting (airflow standalone is made mostly for experimenting).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org