Member-only story
Create Airflow roles with permissions from cli
Create roles with dag-level permissions for Airflow directly from cli instead of UI
Become admin
Airflow offers a way to manage permissions for multiple users via the RBAC roles. These permissions can be edited directly from the UI of Airflow (RBAC is activated by default using Airflow ≥ 2.0.
The roles can be accessed only if the connected user has the role Admin.
By default, when you connect to Airflow for the first time, the role is Op, which is the second higher role after Admin. This role does not have sufficient permissions to manage roles. In order to become Admin, use this command:
airflow users add-role -e your_email -r Admin
Now that you are Admin, refresh the Airflow page and you should access the Security menu with the roles and permissions.
You shall see that it is possible to edit roles and permissions directly from the UI. It is also possible to create dag-level permissions, which are permissions applied only for a given dag. Now imagine you want some users to only…