diff options
Diffstat (limited to 'moonv4/moon_interface/tests/apitests/scenario/rbac.py')
-rw-r--r-- | moonv4/moon_interface/tests/apitests/scenario/rbac.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/moonv4/moon_interface/tests/apitests/scenario/rbac.py b/moonv4/moon_interface/tests/apitests/scenario/rbac.py index 073f1d65..cd08308e 100644 --- a/moonv4/moon_interface/tests/apitests/scenario/rbac.py +++ b/moonv4/moon_interface/tests/apitests/scenario/rbac.py @@ -4,7 +4,7 @@ policy_name = "RBAC policy example" model_name = "RBAC" subjects = {"user0": "", "user1": "", } -objects = {"vm0": "", } +objects = {"vm0": "", "vm1": "", } actions = {"start": "", "stop": ""} subject_categories = {"role": "", } @@ -12,11 +12,11 @@ object_categories = {"id": "", } action_categories = {"action-type": "", } subject_data = {"role": {"admin": "", "employee": ""}} -object_data = {"id": {"vm1": "", "vm2": ""}} +object_data = {"id": {"vm0": "", "vm1": ""}} action_data = {"action-type": {"vm-action": "", }} subject_assignments = {"user0": {"role": "admin"}, "user1": {"role": "employee"}, } -object_assignments = {"vm0": {"id": "vm1"}} +object_assignments = {"vm0": {"id": "vm0"}, "vm1": {"id": "vm1"}} action_assignments = {"start": {"action-type": "vm-action"}, "stop": {"action-type": "vm-action"}} meta_rule = { @@ -25,6 +25,7 @@ meta_rule = { rules = { "rbac": ( + ("admin", "vm0", "vm-action"), ("admin", "vm1", "vm-action"), ) } |