feng-tao closed pull request #4426: [AIRFLOW-XXX] Add a doc on how to add a new role in RBAC UI URL: https://github.com/apache/incubator-airflow/pull/4426
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/docs/howto/add-new-role.rst b/docs/howto/add-new-role.rst new file mode 100644 index 0000000000..2374facf19 --- /dev/null +++ b/docs/howto/add-new-role.rst @@ -0,0 +1,33 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + +.. http://www.apache.org/licenses/LICENSE-2.0 + +.. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + + +Add a new role in RBAC UI +========================= + +There are five roles created for Airflow by default: Admin, User, Op, Viewer, and Public. +The master branch adds beta support for DAG level access for RBAC UI. Each DAG comes with two permissions: read and write. + +The Admin could create a specific role which is only allowed to read / write certain DAGs. To configure a new role, go to ``Security`` tab +and click ``List Roles`` in the new UI. + +.. image:: ../img/add-role.png +.. image:: ../img/new-role.png + + +The image shows a role which could only write to example_python_operator is created. +And we could assign the given role to a new user using ``airflow users --role`` cli command. diff --git a/docs/howto/index.rst b/docs/howto/index.rst index 8a19a9ecb4..a56091ddf9 100644 --- a/docs/howto/index.rst +++ b/docs/howto/index.rst @@ -27,6 +27,7 @@ configuring an Airflow environment. .. toctree:: :maxdepth: 2 + add-new-role set-config initialize-database operator @@ -39,3 +40,4 @@ configuring an Airflow environment. run-with-systemd run-with-upstart use-test-config + diff --git a/docs/img/add-role.png b/docs/img/add-role.png new file mode 100644 index 0000000000..9969036fb5 Binary files /dev/null and b/docs/img/add-role.png differ diff --git a/docs/img/new-role.png b/docs/img/new-role.png new file mode 100644 index 0000000000..29cfc6ce30 Binary files /dev/null and b/docs/img/new-role.png differ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services