aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/tests/scenario/delegation.py
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2017-09-13 11:19:47 +0200
committerasteroide <thomas.duval@orange.com>2017-09-13 11:19:47 +0200
commit1f754ef804ffedaf1c222f9f51313b6afcbbec6e (patch)
tree489c8dafa509d3066608d2c3fc087a07d587ab27 /moonv4/tests/scenario/delegation.py
parent3595c59908df7c43fad4301545d3b9c455dffcc7 (diff)
Move test files from Interface dir to tests dir
Change-Id: Iaf697b15a8e51cd96a4a1b65d74483b7f3ac9cea
Diffstat (limited to 'moonv4/tests/scenario/delegation.py')
-rw-r--r--moonv4/tests/scenario/delegation.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/moonv4/tests/scenario/delegation.py b/moonv4/tests/scenario/delegation.py
new file mode 100644
index 00000000..839e74ce
--- /dev/null
+++ b/moonv4/tests/scenario/delegation.py
@@ -0,0 +1,40 @@
+
+pdp_name = "pdp1"
+policy_name = "Delegation policy example"
+model_name = "Delegation"
+
+subjects = {"user0": "", }
+objects = {"user1": "", }
+actions = {"delegate": ""}
+
+subject_categories = {"subjectid": "", }
+object_categories = {"delegated": "", }
+action_categories = {"delegation-action": "", }
+
+subject_data = {"subjectid": {"user0": ""}}
+object_data = {"delegated": {"user1": ""}}
+action_data = {"delegation-action": {"delegate": ""}}
+
+subject_assignments = {"user0": {"subjectid": "user0"}}
+object_assignments = {"user1": {"delegated": "user1"}}
+action_assignments = {"delegate": {"delegation-action": "delegate"}}
+
+meta_rule = {
+ "session": {"id": "", "value": ("subjectid", "delegated", "delegation-action")},
+}
+
+rules = {
+ "session": (
+ {
+ "rule": ("user0", "user1", "delegate"),
+ "instructions": (
+ {
+ "update": {"request:subject": "user1"} # update the current user with "user1"
+ },
+ {"chain": {"security_pipeline": "rbac"}}
+ )
+ },
+ )
+}
+
+