blob: a97e0c1e6c5be8956810fe51f952b8631dac7075 [file] [log] [blame]
Eduardo Sousa29933fc2018-11-14 06:36:35 +00001# 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---
tierno1f029d82019-06-13 22:37:04 +000020roles:
Eduardo Sousa29933fc2018-11-14 06:36:35 +000021
22##
tierno1f029d82019-06-13 22:37:04 +000023# This file defines the mapping between user roles and operation permissions.
Eduardo Sousa29933fc2018-11-14 06:36:35 +000024# It uses the following pattern:
25#
tierno1f029d82019-06-13 22:37:04 +000026# - name: <ROLE_NAME>
27# permissions:
Eduardo Sousa29933fc2018-11-14 06:36:35 +000028# "<OPERATION>": true | false
29#
30# <ROLE_NAME> defines the name of the role. This name will be matched with an
tierno1f029d82019-06-13 22:37:04 +000031# existing role in the RBAC system (e.g. keystone).
Eduardo Sousa29933fc2018-11-14 06:36:35 +000032#
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#
tierno1f029d82019-06-13 22:37:04 +000037# permissions: is a dictionary of operation permissions for the role. An operation
Eduardo Sousa29933fc2018-11-14 06:36:35 +000038# 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:
tierno1f029d82019-06-13 22:37:04 +000044# - 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 Sousa29933fc2018-11-14 06:36:35 +000047#
tierno1f029d82019-06-13 22:37:04 +000048# The default and admin <OPERATION> tag is considered false if missing.
Eduardo Sousa29933fc2018-11-14 06:36:35 +000049# 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.
tierno1f029d82019-06-13 22:37:04 +000053# NOTE 2: The default <OPERATION> tag can be overridden by using more specific tags
Eduardo Sousa29933fc2018-11-14 06:36:35 +000054# with a different value.
55#
delacruzramo2125a312019-09-30 15:50:52 +020056# 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 Sousa29933fc2018-11-14 06:36:35 +000060# The node <OPERATION> tag is defined by using an internal node of the tree, i.e.
tierno1f029d82019-06-13 22:37:04 +000061# "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 Sousa29933fc2018-11-14 06:36:35 +000063# 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#
tierno1f029d82019-06-13 22:37:04 +000066# 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 Sousa29933fc2018-11-14 06:36:35 +000068# 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.
tierno1f029d82019-06-13 22:37:04 +000075# - Tags finishing in a colon will be ignored.
Eduardo Sousa29933fc2018-11-14 06:36:35 +000076# - The anonymous role allows to bypass the role definition for paths that
77# shouldn't be verified.
78##
79
tierno1f029d82019-06-13 22:37:04 +000080 - name: "system_admin"
81 permissions:
82 default: true
83 admin: true
Eduardo Sousa29933fc2018-11-14 06:36:35 +000084
tierno1f029d82019-06-13 22:37:04 +000085 - name: "account_manager"
86 permissions:
87 default: false
88 admin: false
delacruzramo2125a312019-09-30 15:50:52 +020089 force: true
tierno1f029d82019-06-13 22:37:04 +000090 tokens: true
91 users: true
92 projects: true
93 roles: true
Eduardo Sousa29933fc2018-11-14 06:36:35 +000094
tierno1f029d82019-06-13 22:37:04 +000095 - name: "project_admin"
96 permissions:
delacruzramo2125a312019-09-30 15:50:52 +020097 default: true
98 admin: false
tierno1f029d82019-06-13 22:37:04 +000099 projects: false
tierno1f029d82019-06-13 22:37:04 +0000100 roles: false
selvi.ja9a1fc82022-04-04 06:54:30 +0000101 # Users
102 users: false
103 users:id:patch: true
Eduardo Sousa29933fc2018-11-14 06:36:35 +0000104
tierno1f029d82019-06-13 22:37:04 +0000105 - name: "project_user"
106 permissions:
delacruzramo2125a312019-09-30 15:50:52 +0200107 default: false
108 admin: false
109 force: false
110 public: true
111 set_project: true
delacruzramocea95912019-12-04 12:54:49 +0100112 vnfds: true
113 nsds: true
delacruzramo2125a312019-09-30 15:50:52 +0200114 slice_templates: true
115 ns_instances: true
116 vnf_instances: true
117 slice_instances: true
tierno1f029d82019-06-13 22:37:04 +0000118 projects: false
delacruzramo2125a312019-09-30 15:50:52 +0200119 roles: false
selvi.ja9a1fc82022-04-04 06:54:30 +0000120 # Users
121 users: false
122 users:id:patch: true
tierno1f029d82019-06-13 22:37:04 +0000123 # VIMs
delacruzramo2125a312019-09-30 15:50:52 +0200124 vims: false
125 vims:get: true
tierno1f029d82019-06-13 22:37:04 +0000126 vims:id:get: true
127 # VIM Accounts
delacruzramo2125a312019-09-30 15:50:52 +0200128 vim_accounts: false
129 vim_accounts:get: true
tierno1f029d82019-06-13 22:37:04 +0000130 vim_accounts:id:get: true
131 # SDN Controllers
delacruzramo2125a312019-09-30 15:50:52 +0200132 sdn_controllers: false
133 sdn_controllers:get: true
tierno1f029d82019-06-13 22:37:04 +0000134 sdn_controllers:id:get: true
tiernof00430d2020-05-26 15:49:04 +0000135 # K8s clusters
136 k8sclusters: false
137 k8sclusters:get: true
138 k8sclusters:id:get: true
David Garciaecb41322021-03-31 19:10:46 +0200139 # VCA
140 vca: false
141 vca:get: true
142 vca:id:get: true
tiernof00430d2020-05-26 15:49:04 +0000143 # K8s repos
144 k8srepos: true
145 # OSM repos
146 osmrepos: true
tierno1f029d82019-06-13 22:37:04 +0000147 # WIM Accounts
delacruzramo2125a312019-09-30 15:50:52 +0200148 wim_accounts: false
149 wim_accounts:get: true
tierno1f029d82019-06-13 22:37:04 +0000150 wim_accounts:id:get: true
delacruzramo2125a312019-09-30 15:50:52 +0200151 # PDUs
152 pduds: false
153 pduds:get: true
154 pduds:id:get: true
Atul Agarwalb6480fc2021-03-18 08:19:32 +0000155 # Alarms
156 alarms: false
157 alarms:get: true
158 alarms:id:get: true
Eduardo Sousa29933fc2018-11-14 06:36:35 +0000159
tierno1f029d82019-06-13 22:37:04 +0000160 - name: "anonymous"
161 permissions: