| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 1 | # Copyright 2018 Whitestack, LLC |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | # |
| 15 | # For those usages not covered by the Apache License, Version 2.0 please |
| 16 | # contact: esousa@whitestack.com or glavado@whitestack.com |
| 17 | ## |
| 18 | |
| 19 | --- |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 20 | roles: |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 21 | |
| 22 | ## |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 23 | # This file defines the mapping between user roles and operation permissions. |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 24 | # It uses the following pattern: |
| 25 | # |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 26 | # - name: <ROLE_NAME> |
| 27 | # permissions: |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 28 | # "<OPERATION>": true | false |
| 29 | # |
| 30 | # <ROLE_NAME> defines the name of the role. This name will be matched with an |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 31 | # existing role in the RBAC system (e.g. keystone). |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 32 | # |
| 33 | # NOTE: The role will only be used if there is an existing match. If there |
| 34 | # isn't a role in the system that can be matched, the operation permissions |
| 35 | # won't yield any result. |
| 36 | # |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 37 | # permissions: is a dictionary of operation permissions for the role. An operation |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 38 | # permission is defined using the following pattern: |
| 39 | # |
| 40 | # "<OPERATION>": true | false |
| 41 | # |
| 42 | # The operations are defined using an hierarchical tree. For this purpose, an |
| 43 | # <OPERATION> tag can represents the path for the following: |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 44 | # - default: what action to be taken by default, allow or deny |
| 45 | # - admin: allow or deny usin querey string ADMIN to act on behalf of other project |
| 46 | # - colon separated hierarchical tree |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 47 | # |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 48 | # The default and admin <OPERATION> tag is considered false if missing. |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 49 | # When you use this tag, all the operation permissions will be set to the value |
| 50 | # assigned. |
| 51 | # NOTE 1: The default value is false. So if a value isn't specified, it will |
| 52 | # default to false. |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 53 | # NOTE 2: The default <OPERATION> tag can be overridden by using more specific tags |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 54 | # with a different value. |
| 55 | # |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 56 | # The 'force', 'public' and 'set_project' operation tags (respectively allowing/denying |
| 57 | # the use of the query-strings FORCE, PUBLIC and SET_PROJECT), take by default the |
| 58 | # value specified by the tag 'default' (false if not specified). |
| 59 | # |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 60 | # The node <OPERATION> tag is defined by using an internal node of the tree, i.e. |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 61 | # "nsds", "users:id". A node <OPERATION> tag will affect all the nodes and leafs |
| 62 | # beneath it. It can be used to override a default <OPERATION> tag. |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 63 | # NOTE 1: It can be overridden by using a more specific tag, such as a node which |
| 64 | # is beneath it or a leaf. |
| 65 | # |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 66 | # The leaf <OPERATION> tag is defined by using a leaf of the tree, i.e. "users:post", |
| 67 | # "ns_instances:get", "vim_accounts:id:get". A leaf <OPERATION> tag will override all |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 68 | # the values defined by the parent nodes, since it is the more specific tag that can |
| 69 | # exist. |
| 70 | # |
| 71 | # General notes: |
| 72 | # - In order to find which tags are in use, check the resources_to_operations.yml. |
| 73 | # - In order to find which roles are in use, check the RBAC system. |
| 74 | # - Non existing tags will be ignored. |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 75 | # - Tags finishing in a colon will be ignored. |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 76 | # - The anonymous role allows to bypass the role definition for paths that |
| 77 | # shouldn't be verified. |
| 78 | ## |
| 79 | |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 80 | - name: "system_admin" |
| 81 | permissions: |
| 82 | default: true |
| 83 | admin: true |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 84 | |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 85 | - name: "account_manager" |
| 86 | permissions: |
| 87 | default: false |
| 88 | admin: false |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 89 | force: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 90 | tokens: true |
| 91 | users: true |
| 92 | projects: true |
| 93 | roles: true |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 94 | |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 95 | - name: "project_admin" |
| 96 | permissions: |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 97 | default: true |
| 98 | admin: false |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 99 | projects: false |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 100 | roles: false |
| selvi.j | a9a1fc8 | 2022-04-04 06:54:30 +0000 | [diff] [blame] | 101 | # Users |
| 102 | users: false |
| 103 | users:id:patch: true |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 104 | |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 105 | - name: "project_user" |
| 106 | permissions: |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 107 | default: false |
| 108 | admin: false |
| 109 | force: false |
| 110 | public: true |
| 111 | set_project: true |
| delacruzramo | cea9591 | 2019-12-04 12:54:49 +0100 | [diff] [blame] | 112 | vnfds: true |
| 113 | nsds: true |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 114 | slice_templates: true |
| 115 | ns_instances: true |
| 116 | vnf_instances: true |
| 117 | slice_instances: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 118 | projects: false |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 119 | roles: false |
| selvi.j | a9a1fc8 | 2022-04-04 06:54:30 +0000 | [diff] [blame] | 120 | # Users |
| 121 | users: false |
| 122 | users:id:patch: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 123 | # VIMs |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 124 | vims: false |
| 125 | vims:get: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 126 | vims:id:get: true |
| 127 | # VIM Accounts |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 128 | vim_accounts: false |
| 129 | vim_accounts:get: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 130 | vim_accounts:id:get: true |
| 131 | # SDN Controllers |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 132 | sdn_controllers: false |
| 133 | sdn_controllers:get: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 134 | sdn_controllers:id:get: true |
| tierno | f00430d | 2020-05-26 15:49:04 +0000 | [diff] [blame] | 135 | # K8s clusters |
| 136 | k8sclusters: false |
| 137 | k8sclusters:get: true |
| 138 | k8sclusters:id:get: true |
| David Garcia | ecb4132 | 2021-03-31 19:10:46 +0200 | [diff] [blame] | 139 | # VCA |
| 140 | vca: false |
| 141 | vca:get: true |
| 142 | vca:id:get: true |
| tierno | f00430d | 2020-05-26 15:49:04 +0000 | [diff] [blame] | 143 | # K8s repos |
| 144 | k8srepos: true |
| 145 | # OSM repos |
| 146 | osmrepos: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 147 | # WIM Accounts |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 148 | wim_accounts: false |
| 149 | wim_accounts:get: true |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 150 | wim_accounts:id:get: true |
| delacruzramo | 2125a31 | 2019-09-30 15:50:52 +0200 | [diff] [blame] | 151 | # PDUs |
| 152 | pduds: false |
| 153 | pduds:get: true |
| 154 | pduds:id:get: true |
| Atul Agarwal | b6480fc | 2021-03-18 08:19:32 +0000 | [diff] [blame] | 155 | # Alarms |
| 156 | alarms: false |
| 157 | alarms:get: true |
| 158 | alarms:id:get: true |
| Eduardo Sousa | 29933fc | 2018-11-14 06:36:35 +0000 | [diff] [blame] | 159 | |
| tierno | 1f029d8 | 2019-06-13 22:37:04 +0000 | [diff] [blame] | 160 | - name: "anonymous" |
| 161 | permissions: |