aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/tests/11_user_scalability/scenario
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2017-07-26 08:55:58 +0200
committerasteroide <thomas.duval@orange.com>2017-07-26 08:55:58 +0200
commit00bfa61e3a3cd0fef6038ba297b92f6bc3f6b6c7 (patch)
treefe81ee751616e57da745b90900ad3e43d150c2a1 /moonv4/tests/11_user_scalability/scenario
parentc6cbfea94f51536b11e46bfe7053e1fb96c0a968 (diff)
Delete test data from repository.
Change-Id: Ie3da4f813a50df34b64e2d2a7d26e737720c98a6
Diffstat (limited to 'moonv4/tests/11_user_scalability/scenario')
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_10.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_100.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_1000.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_150.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_1500.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_20.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_200.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_250.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_30.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_300.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_3000.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_40.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_50.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_500.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/rbac_750.py89
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_10.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_100.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_1000.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_150.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_1500.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_200.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_250.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_300.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_50.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_500.py69
-rw-r--r--moonv4/tests/11_user_scalability/scenario/session_750.py69
26 files changed, 0 insertions, 2094 deletions
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_10.py b/moonv4/tests/11_user_scalability/scenario/rbac_10.py
deleted file mode 100644
index d764b715..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_10.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_100.py b/moonv4/tests/11_user_scalability/scenario/rbac_100.py
deleted file mode 100644
index 7197e2d0..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_100.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 50
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_1000.py b/moonv4/tests/11_user_scalability/scenario/rbac_1000.py
deleted file mode 100644
index fb136f39..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_1000.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 1000
-OBJECT_NUMBER = 1000
-ROLE_NUMBER = 700
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_150.py b/moonv4/tests/11_user_scalability/scenario/rbac_150.py
deleted file mode 100644
index 3221db07..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_150.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 150
-OBJECT_NUMBER = 150
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_1500.py b/moonv4/tests/11_user_scalability/scenario/rbac_1500.py
deleted file mode 100644
index f6b298d0..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_1500.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 1500
-OBJECT_NUMBER = 1500
-ROLE_NUMBER = 1000
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_20.py b/moonv4/tests/11_user_scalability/scenario/rbac_20.py
deleted file mode 100644
index 6f6e15d1..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_20.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 20
-OBJECT_NUMBER = 20
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_200.py b/moonv4/tests/11_user_scalability/scenario/rbac_200.py
deleted file mode 100644
index 3e355d3f..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_200.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 200
-OBJECT_NUMBER = 200
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_250.py b/moonv4/tests/11_user_scalability/scenario/rbac_250.py
deleted file mode 100644
index 614fbf52..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_250.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 250
-OBJECT_NUMBER = 250
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_30.py b/moonv4/tests/11_user_scalability/scenario/rbac_30.py
deleted file mode 100644
index 7f663060..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_30.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 30
-OBJECT_NUMBER = 30
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_300.py b/moonv4/tests/11_user_scalability/scenario/rbac_300.py
deleted file mode 100644
index 4413da67..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_300.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 300
-OBJECT_NUMBER = 300
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_3000.py b/moonv4/tests/11_user_scalability/scenario/rbac_3000.py
deleted file mode 100644
index f51b78c4..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_3000.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 3000
-OBJECT_NUMBER = 3000
-ROLE_NUMBER = 1000
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_40.py b/moonv4/tests/11_user_scalability/scenario/rbac_40.py
deleted file mode 100644
index 4503217b..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_40.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 40
-OBJECT_NUMBER = 40
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_50.py b/moonv4/tests/11_user_scalability/scenario/rbac_50.py
deleted file mode 100644
index 01b13005..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_50.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_500.py b/moonv4/tests/11_user_scalability/scenario/rbac_500.py
deleted file mode 100644
index 5ad2959f..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_500.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 500
-OBJECT_NUMBER = 500
-ROLE_NUMBER = 200
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_750.py b/moonv4/tests/11_user_scalability/scenario/rbac_750.py
deleted file mode 100644
index 3fb509d6..00000000
--- a/moonv4/tests/11_user_scalability/scenario/rbac_750.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 750
-OBJECT_NUMBER = 750
-ROLE_NUMBER = 500
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/11_user_scalability/scenario/session_10.py b/moonv4/tests/11_user_scalability/scenario/session_10.py
deleted file mode 100644
index c119ba08..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_10.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_100.py b/moonv4/tests/11_user_scalability/scenario/session_100.py
deleted file mode 100644
index fa4e29d5..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_100.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 50
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_1000.py b/moonv4/tests/11_user_scalability/scenario/session_1000.py
deleted file mode 100644
index 71c892a7..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_1000.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 1000
-OBJECT_NUMBER = 1000
-ROLE_NUMBER = 700
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_150.py b/moonv4/tests/11_user_scalability/scenario/session_150.py
deleted file mode 100644
index b15fd8d2..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_150.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 150
-OBJECT_NUMBER = 150
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_1500.py b/moonv4/tests/11_user_scalability/scenario/session_1500.py
deleted file mode 100644
index 8282d9f3..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_1500.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 1500
-OBJECT_NUMBER = 1500
-ROLE_NUMBER = 1000
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_200.py b/moonv4/tests/11_user_scalability/scenario/session_200.py
deleted file mode 100644
index 08a25b0d..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_200.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 200
-OBJECT_NUMBER = 200
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_250.py b/moonv4/tests/11_user_scalability/scenario/session_250.py
deleted file mode 100644
index b007d067..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_250.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 250
-OBJECT_NUMBER = 250
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_300.py b/moonv4/tests/11_user_scalability/scenario/session_300.py
deleted file mode 100644
index bf894ec1..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_300.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 300
-OBJECT_NUMBER = 300
-ROLE_NUMBER = 100
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_50.py b/moonv4/tests/11_user_scalability/scenario/session_50.py
deleted file mode 100644
index e6e91b39..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_50.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_500.py b/moonv4/tests/11_user_scalability/scenario/session_500.py
deleted file mode 100644
index 34346323..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_500.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 500
-OBJECT_NUMBER = 500
-ROLE_NUMBER = 200
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })
diff --git a/moonv4/tests/11_user_scalability/scenario/session_750.py b/moonv4/tests/11_user_scalability/scenario/session_750.py
deleted file mode 100644
index 1a5aef28..00000000
--- a/moonv4/tests/11_user_scalability/scenario/session_750.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import random
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-SUBJECT_NUMBER = 750
-OBJECT_NUMBER = 750
-ROLE_NUMBER = 500
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {"admin": "", }
-for _id in range(ROLE_NUMBER):
- objects["role{}".format(_id)] = ""
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {}}
-for _id in range(SUBJECT_NUMBER):
- subject_data["subjectid"]["user{}".format(_id)] = ""
-
-object_data = {"role": {
- "admin": "",
- "*": ""
-}}
-for _id in range(ROLE_NUMBER):
- object_data["role"]["role{}".format(_id)] = ""
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- subject_assignments["user{}".format(_id)] = ({"subjectid": "user{}".format(_id)}, )
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"})}
-for _id in range(ROLE_NUMBER):
- _role = "role{}".format(_id)
- object_assignments[_role] = ({"role": _role}, {"role": "*"})
-action_assignments = {"activate": ({"session-action": "activate"}, {"session-action": "*"}, ),
- "deactivate": ({"session-action": "deactivate"}, {"session-action": "*"}, )
- }
-
-meta_rule = {
- "session": {"id": "", "value": ("subjectid", "role", "session-action")},
-}
-
-rules = {
- "session": []
-}
-
-for _id in range(SUBJECT_NUMBER):
- _subject = "user{}".format(_id)
- _object = "role{}".format(random.choice(range(ROLE_NUMBER)))
- rules["session"].append({
- "rule": (_subject, _object, "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- })