vikram2784
vikram2784

Reputation: 822

How to use the User role in Airflow 1.10 RBAC?

I have been trying to look at how to use the User role. It says here, that it is for users with DAG ownership. So I created a couple of users with usernames ABC and XYZ and assigned them with User role.

Here's my DAG:

DEFAULT_ARGS = {
    'owner': 'ABC',
    ...,
    ...
}

dag = DAG(
    'test_dag',
    default_args=DEFAULT_ARGS,
    ...,
    ...
)

When I logged in as XYZ, I expected the DAG test_dag to be hidden. If not hidden then at least to be in inactive state, since test_dag belongs to ABC. But as a XYZ, I'm able to operate test_dag.

Am I missing anything out here?

Upvotes: 4

Views: 4131

Answers (2)

Kamil R
Kamil R

Reputation: 447

Are you using password authentication? If so, this is probably a bug, that is still not fixed: JIRA. It was also discussed here: How to allow airflow dags for concrete user(s) only

You can try to use LDAP or OAuth as you authentication method. This might resolve your problem.

Upvotes: 0

kaxil
kaxil

Reputation: 18884

Make sure you are using the new RBAC UI. Verify that you have the following in your airflow.cfg file

[webserver]
rbac = True
authenticate = True
filter_by_owner = True

Upvotes: 1

Related Questions