Access control in Airflow

Viewed 23

i have a problem with airflow.

Does Admin creates variables and controls access to each variable for each user?

Example: admin create Variable a, b and user userA, userB

Does admin can create role that allow userAread, edit variable a, can't edit b and userB read, edit B, can't edit a

1 Answers

Interesting question!

Part 1

As an admin you can create the following permissions enter image description here.

So perhaps you can first ensure the users cannot delete Variables.

Part 2

If User A and only User A knows the Variable value. I would take advantage of a lesser-known Airflow feature to mask sensitive fields. I have provided 2 URLs for ways to approach this. So essentially the variable output will be masked, allowing User A to only know the answer. User B will see a variable exists however the value is masked. I believe you might also have to ensure you restrict CLI access.

source a source b

Part 3

FYI - Airflow can automatically obfuscate any values when the variable name contains either secret or password. The check for this value is case-insensitive, so the value of a variable with a name containing SECRET will also be hidden.

Related