sebastian
sebastian

Reputation: 2348

Apache Airflow - user mangement and multi-tenancy

I'm trying to create a single Apache Airflow instance that can host multiple users, that will be unable to affect one another negatively. This would include but not limited to:

Looking through the official airflow docs. I see a couple things that may help.

1) ability to create users and 2) the ability to be multi tenant.

1) If I follow the user creation process https://airflow.apache.org/security.html#web-authentication. All the users created seem to be admin, but how do I create a non admin user and control what can they do / not do? I can't seem to locate anymore documentation.

2) The link, https://airflow.apache.org/security.html#multi-tenancy, says that "You can filter the list of dags in webserver by owner name when authentication is turned on by setting ", but I don't see how I can assign dags to specific users.

Thanks for the help.

Upvotes: 5

Views: 4739

Answers (1)

tobi6
tobi6

Reputation: 8239

I think that user management doesn't work like that in Airflow but haven't worked in depth with that.

To 1: As far as I understand there are no in-build roles in Airflow. User management is firstly about authentication and access to Airflow. If needed, you might need to implement a few Flask hooks as described here: https://airflow.apache.org/security.html#roll-your-own

To 2: When creating a DAG, you set it's ownership with the

default_args = {
     owner: 'my_owner_name',
     ...

string parameter. This seems to be the part which binds DAGs to user authentication. So the user with the handle my_owner_name could list the above DAG.

Upvotes: 3

Related Questions