Bug 1068 fixed for auth_url in keystone
[osm/NBI.git] / osm_nbi / roles_to_operations.yml
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 ---
20 roles:
21
22 ##
23 # This file defines the mapping between user roles and operation permissions.
24 # It uses the following pattern:
25 #
26 #    - name: <ROLE_NAME>
27 #      permissions:
28 #        "<OPERATION>": true | false
29 #
30 # <ROLE_NAME> defines the name of the role. This name will be matched with an
31 # existing role in the RBAC system (e.g. keystone).
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 #
37 # permissions: is a dictionary of operation permissions for the role. An operation
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:
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
47 #
48 # The default and admin <OPERATION> tag is considered false if missing.
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.
53 # NOTE 2: The default <OPERATION> tag can be overridden by using more specific tags
54 #         with a different value.
55 #
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 #
60 # The node <OPERATION> tag is defined by using an internal node of the tree, i.e.
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.
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 #
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
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.
75 #    - Tags finishing in a colon will be ignored.
76 #    - The anonymous role allows to bypass the role definition for paths that
77 #      shouldn't be verified.
78 ##
79
80   - name: "system_admin"
81     permissions:
82         default: true
83         admin:   true
84
85   - name: "account_manager"
86     permissions:
87         default:  false
88         admin:    false
89         force:    true
90         tokens:   true
91         users:    true
92         projects: true
93         roles:    true
94
95   - name: "project_admin"
96     permissions:
97         default:  true
98         admin:    false
99         users:    false
100         projects: false
101         roles:    false
102
103   - name: "project_user"
104     permissions:
105         default:     false
106         admin:       false
107         force:       false
108         public:      true
109         set_project: true
110         vnfds:    true
111         nsds:  true
112         slice_templates: true
113         ns_instances:    true
114         vnf_instances:   true
115         slice_instances: true
116         users:    false
117         projects: false
118         roles:    false
119         # VIMs
120         vims:        false
121         vims:get:    true
122         vims:id:get: true
123         # VIM Accounts
124         vim_accounts:        false
125         vim_accounts:get:    true
126         vim_accounts:id:get: true
127         # SDN Controllers
128         sdn_controllers:        false
129         sdn_controllers:get:    true
130         sdn_controllers:id:get: true
131         # WIMs
132         wims:        false
133         wims:get:    true
134         wims:id:get: true
135         # WIM Accounts
136         wim_accounts:        false
137         wim_accounts:get:    true
138         wim_accounts:id:get: true
139         # PDUs
140         pduds:        false
141         pduds:get:    true
142         pduds:id:get: true
143
144   - name: "anonymous"
145     permissions: