Skip to content
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 sync-perm command does not sync DAG level Access Control #13376

Closed
kaxil opened this issue Dec 29, 2020 · 0 comments · Fixed by #13377
Closed

airflow sync-perm command does not sync DAG level Access Control #13376

kaxil opened this issue Dec 29, 2020 · 0 comments · Fixed by #13377
Assignees
Labels
affected_version:2.0 Issues Reported for 2.0 kind:bug This is a clearly a bug
Milestone

Comments

@kaxil
Copy link
Member

kaxil commented Dec 29, 2020

Apache Airflow version: 2.0.0

What happened:

Running sync_perm CLI command does not synchronize the permission granted through the DAG via access_control.

This is because of dag serialization. When dag serialization is enabled, the dagbag will exhibit a lazy loading behaviour.

How to reproduce it:

  1. Add access_control to a DAG where the new role has permission to see the DAG.
    access_control={
        "test": {'can_dag_read'}
    },
  1. Run airflow sync-perm.
  2. Log in as the new user and you will still not see any DAG.
  3. If you refresh the DAG, the new user will be able to DAG after they refresh their page

Expected behavior
When I run airflow sync-perm, I expect the role who has been granted read permission for the DAG to be able to see that DAG.

This is also an issue with 1.10.x with DAG Serialization enabled, so would be good to backport it too.

@kaxil kaxil added the kind:bug This is a clearly a bug label Dec 29, 2020
@kaxil kaxil self-assigned this Dec 29, 2020
@kaxil kaxil added this to the Airflow 2.0.1 milestone Dec 29, 2020
@vikramkoka vikramkoka added the affected_version:2.0 Issues Reported for 2.0 label Jan 18, 2021
kaxil added a commit that referenced this issue Jan 21, 2021
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Sep 16, 2021
…13377)

fixes apache/airflow#13376

(cherry picked from commit 1b94346fbeca619f3084d05bdc5358836ed02318)

GitOrigin-RevId: 9bd5de3202d08d501a57d931a265460a1fd652a3
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Sep 17, 2021
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Sep 23, 2021
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Nov 27, 2021
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Mar 10, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Jun 4, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Jun 7, 2022
…13377)

fixes apache/airflow#13376

(cherry picked from commit 1b94346fbeca619f3084d05bdc5358836ed02318)

GitOrigin-RevId: 9bd5de3202d08d501a57d931a265460a1fd652a3
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Jul 9, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Aug 27, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Oct 4, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
aglipska pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Oct 7, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Dec 7, 2022
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this issue Jan 27, 2023
…13377)

fixes apache/airflow#13376

GitOrigin-RevId: 1b94346fbeca619f3084d05bdc5358836ed02318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.0 Issues Reported for 2.0 kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants