aboutsummaryrefslogtreecommitdiffstats
path: root/moon_forming/conf/mls.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 /moon_forming/conf/mls.py
parent19a69441bbcc8b5e9e334f81c66d0f3720405fdd (diff)
moon v4 re-organization
Change-Id: I73665f739f35ae18175f98d0739567e403c1fa80 Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moon_forming/conf/mls.py')
-rw-r--r--moon_forming/conf/mls.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/moon_forming/conf/mls.py b/moon_forming/conf/mls.py
new file mode 100644
index 00000000..0e6285c9
--- /dev/null
+++ b/moon_forming/conf/mls.py
@@ -0,0 +1,59 @@
+
+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"})
+ },
+ )
+}