aboutsummaryrefslogtreecommitdiffstats
path: root/templates/moon_forming/conf/rbac.py
diff options
context:
space:
mode:
authorRHE <rebirthmonkey@gmail.com>2017-12-26 13:35:54 +0100
committerRHE <rebirthmonkey@gmail.com>2017-12-26 13:35:54 +0100
commit454e9c5f8664ea99ccea2417b6cc3ffb238cf834 (patch)
tree479a6d0fcee5ba6c17ea12370125e6681594128a /templates/moon_forming/conf/rbac.py
parent19a69441bbcc8b5e9e334f81c66d0f3720405fdd (diff)
moon v4 re-organization
Change-Id: I73665f739f35ae18175f98d0739567e403c1fa80 Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'templates/moon_forming/conf/rbac.py')
-rw-r--r--templates/moon_forming/conf/rbac.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/templates/moon_forming/conf/rbac.py b/templates/moon_forming/conf/rbac.py
deleted file mode 100644
index 25c010fd..00000000
--- a/templates/moon_forming/conf/rbac.py
+++ /dev/null
@@ -1,61 +0,0 @@
-
-pdp_name = "pdp_rbac"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {"adminuser": "", "user1": "", }
-objects = {"vm0": "", "vm1": "", }
-actions = {"start": "", "stop": ""}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "employee": "", "*": ""}}
-object_data = {"id": {"vm0": "", "vm1": "", "*": ""}}
-action_data = {"action-type": {"vm-action": "", "*": ""}}
-
-subject_assignments = {
- "adminuser":
- ({"role": "admin"}, {"role": "employee"}, {"role": "*"}),
- "user1":
- ({"role": "employee"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0":
- ({"id": "vm0"}, {"id": "*"}),
- "vm1":
- ({"id": "vm1"}, {"id": "*"})
-}
-action_assignments = {
- "start":
- ({"action-type": "vm-action"}, {"action-type": "*"}),
- "stop":
- ({"action-type": "vm-action"}, {"action-type": "*"})
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": (
- {
- "rule": ("admin", "vm0", "vm-action"),
- "instructions": (
- {"decision": "grant"},
- # "grant" to immediately exit,
- # "continue" to wait for the result of next policy
- )
- },
- {
- "rule": ("employee", "vm1", "vm-action"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-