You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "trongchata (via GitHub)" <gi...@apache.org> on 2025/10/13 16:44:25 UTC
[D] Enable multiple Authentication method in Airflow 3 [airflow]
GitHub user trongchata created a discussion: Enable multiple Authentication method in Airflow 3
### Description
## context
Now we have deployed airflow 3 and integrated with OAuth2 SSO. But we still have a requirement for triggering the DAG via RESTful from python code.
## requirement
Is there any possible to enable two types of Authentication method for Airflow 3?
Or
Is there any possible we deploy two api-server, one with OAuth2 and another one with LDAP username/password ?
Both of these two airflow api-server service need to connect to same airflow db.
Thank you
### Use case/motivation
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
GitHub link: https://github.com/apache/airflow/discussions/56594
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Enable multiple Authentication method in Airflow 3 [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
GitHub user potiuk added a comment to the discussion: Enable multiple Authentication method in Airflow 3
Converted to a discussion
GitHub link: https://github.com/apache/airflow/discussions/56594#discussioncomment-14667643
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Enable multiple Authentication method in Airflow 3 [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
GitHub user potiuk added a comment to the discussion: Enable multiple Authentication method in Airflow 3
> Any minimal example or clarification on how to properly configure both methods would be greatly appreciated :).
No example/clarification for now, but if you figure it out, documenting it back woudl be cool. Generally speaking - you need to write your custom auth manager https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/auth-manager/index.html#writing-your-own-auth-manager using essentiallly strategy pattern https://refactoring.guru/design-patterns/strategy
Strategy pattern means that you can instantiate two Auth Manager and based on strategy defined by you your custom auth manager will route auth manger method calls that it will receive to either one or the other.
That's the theory - you are the first to want it and maybe implementing it, so once you do it, documenting it would be a great contribution.
GitHub link: https://github.com/apache/airflow/discussions/56594#discussioncomment-14897433
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Enable multiple Authentication method in Airflow 3 [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
GitHub user boring-cyborg[bot] added a comment to the discussion: Enable multiple Authentication method in Airflow 3
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
GitHub link: https://github.com/apache/airflow/discussions/56594#discussioncomment-14667634
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Enable multiple Authentication method in Airflow 3 [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
GitHub user potiuk added a comment to the discussion: Enable multiple Authentication method in Airflow 3
You can write your own AuthManager that would cover that scenario.
GitHub link: https://github.com/apache/airflow/discussions/56594#discussioncomment-14667635
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Enable multiple Authentication method in Airflow 3 [airflow]
Posted by "aeroyorch (via GitHub)" <gi...@apache.org>.
GitHub user aeroyorch added a comment to the discussion: Enable multiple Authentication method in Airflow 3
We also want to support both local users and Keycloak authentication in Airflow. From the FAB docs, it seems possible to integrate multiple auth mechanisms, but I haven’t found a concrete example of how to configure more than one at the same time.
You mentioned this can be done with a custom AuthManager, but I couldn’t find an example in the documentation. Should we, for instance, enable ```AUTH_API_LOGIN_ALLOW_MULTIPLE_PROVIDERS``` to support both local and OAuth logins?
Any minimal example or clarification on how to properly configure both methods would be greatly appreciated :).
GitHub link: https://github.com/apache/airflow/discussions/56594#discussioncomment-14895387
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Enable multiple Authentication method in Airflow 3 [airflow]
Posted by "bkarankar (via GitHub)" <gi...@apache.org>.
GitHub user bkarankar added a comment to the discussion: Enable multiple Authentication method in Airflow 3
do u need two auth, one for web and api?
u can get the settings from https://github.com/bkarankar/Nexoryx_Airflow3, it has multiple auth configured
GitHub link: https://github.com/apache/airflow/discussions/56594#discussioncomment-17219223
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org