diff options
author | WuKong <rebirthmonkey@gmail.com> | 2017-12-24 13:09:46 +0100 |
---|---|---|
committer | WuKong <rebirthmonkey@gmail.com> | 2017-12-24 13:09:46 +0100 |
commit | b2904eb52f85938a18f55520ce2b4cf4dcb0269f (patch) | |
tree | 055bcf58dc3d767fc61a870a4f859e0f740ac3db /templates/moonforming/conf | |
parent | 1b21e61269223d9a9b97112e75606b1f612a0a24 (diff) |
moon doc cleanup
Change-Id: Iccc0858e305d724fd8c3341e27f9fa90ffeb916f
Signed-off-by: WuKong <rebirthmonkey@gmail.com>
Diffstat (limited to 'templates/moonforming/conf')
-rw-r--r-- | templates/moonforming/conf/mls.py | 59 | ||||
-rw-r--r-- | templates/moonforming/conf/rbac.py | 61 |
2 files changed, 0 insertions, 120 deletions
diff --git a/templates/moonforming/conf/mls.py b/templates/moonforming/conf/mls.py deleted file mode 100644 index 0e6285c9..00000000 --- a/templates/moonforming/conf/mls.py +++ /dev/null @@ -1,59 +0,0 @@ - -pdp_name = "pdp_mls" -policy_name = "MLS Policy example" -model_name = "MLS" -policy_genre = "authz" - -subjects = {"adminuser": "", "user1": "", "user2": "", } -objects = {"vm0": "", "vm1": "", } -actions = {"start": "", "stop": ""} - -subject_categories = {"subject-security-level": "", } -object_categories = {"object-security-level": "", } -action_categories = {"action-type": "", } - -subject_data = { - "subject-security-level": {"low": "", "medium": "", "high": ""}, -} -object_data = { - "object-security-level": {"low": "", "medium": "", "high": ""}, -} -action_data = {"action-type": {"vm-action": "", "storage-action": "", }} - -subject_assignments = { - "adminuser": {"subject-security-level": "high"}, - "user1": {"subject-security-level": "medium"}, -} -object_assignments = { - "vm0": {"object-security-level": "medium"}, - "vm1": {"object-security-level": "low"}, -} -action_assignments = { - "start": {"action-type": "vm-action"}, - "stop": {"action-type": "vm-action"} -} - -meta_rule = { - "mls": { - "id": "", - "value": ("subject-security-level", - "object-security-level", - "action-type")}, -} - -rules = { - "mls": ( - { - "rule": ("high", "medium", "vm-action"), - "instructions": ({"decision": "grant"}) - }, - { - "rule": ("high", "low", "vm-action"), - "instructions": ({"decision": "grant"}) - }, - { - "rule": ("medium", "low", "vm-action"), - "instructions": ({"decision": "grant"}) - }, - ) -} diff --git a/templates/moonforming/conf/rbac.py b/templates/moonforming/conf/rbac.py deleted file mode 100644 index 25c010fd..00000000 --- a/templates/moonforming/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"}, - ) - }, - ) -} - - |