-
Notifications
You must be signed in to change notification settings - Fork 2
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
Airflow OPA Authorization #446
Comments
ApproachAuthorization with OPA can be implemented for UI users:
BackgroundThe security model of Airflow involves different types of users (see Airflow Security Model):
This ticket covers only the "Authenticated UI users". Airflow uses the Flask App Builder (FAB) but the security model is decoupled from it, see AIP-56 Extensible user management. The idea for using OPA with Airflow is to re-use the authentication part of the FAB provider and just replace the authorization part. This has the advantage that the existing authentication methods are not affected. However, the roles and permissions should not be read anymore from the database but the request should be delegated to OPA. This means that the {
"user": {
"id": "test-user",
"roles": ["test-role"],
},
"action": "DELETE",
"resource-type": "DAG",
"resource-details": {
"id": "my-dag-id",
"tags": ["example1", "example2"],
"dag-folder": "/dags/marketing",
},
} The default roles and permissions (see Access control) must then be replicated in Rego. If this is not desired because e.g. they can change between Airflow versions, then these permissions could also be added to the input of the Rego rule resulting in large requests. |
Issue checklist
Possible duplicate and/or overlapping issue.
As an administrator I'd like to be able to centrally authorize actions my users are taking using (ideally) OpenPolicyAgent. However, as documented in this ticket, Airflow - like Superset - is built on Flask and as such offers its own user/role authoriziation, or Flask-related mechanisms.
Airflow does not support Open Policy Agent, which is what we use wherever possible.
Instead, it delegates access control of the webserver UI to Flask directly and offers the following authentication types:
Airflow ships with a number of default roles and it is advised to leave these unaltered.
LDAP offers authorization (via group membership) as well as authentication and is probably the most suitable way of implementing Airflow authorization, where appropriate, via Flask. It should be verified that the Flask search filters enable recursive mapping through group memberships.
The text was updated successfully, but these errors were encountered: