You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/29 23:33:58 UTC

[GitHub] [airflow] kaxil opened a new issue #13376: airflow sync-perm command does not sync DAG level Access Control

kaxil opened a new issue #13376:
URL: https://github.com/apache/airflow/issues/13376


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **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'}
       },
   ```
   
   4. Run `airflow sync-perm`.
   5. Log in as the new user and you will still not see any DAG.
   6. 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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil closed issue #13376: airflow sync-perm command does not sync DAG level Access Control

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #13376:
URL: https://github.com/apache/airflow/issues/13376


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org