aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/exec.sh181
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/exec2.sh42
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/exec_varuna.sh180
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/rbac_10.py233
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py89
-rw-r--r--moonv4/tests/02_smpolicy_chaining_overhead/exec.sh55
-rw-r--r--moonv4/tests/02_smpolicy_chaining_overhead/plot.sh8
-rw-r--r--moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py2
-rw-r--r--moonv4/tests/02_smpolicy_chaining_overhead/session_10.py2
-rw-r--r--moonv4/tests/11_user_scalability/exec.sh180
-rw-r--r--moonv4/tests/11_user_scalability/exec_rbac.sh426
-rw-r--r--moonv4/tests/11_user_scalability/exec_rbac_1500.sh78
-rw-r--r--moonv4/tests/11_user_scalability/plot.sh65
-rw-r--r--moonv4/tests/11_user_scalability/rbac_10.py233
-rw-r--r--moonv4/tests/11_user_scalability/rbac_20.py371
-rw-r--r--moonv4/tests/11_user_scalability/rbac_30.py391
-rw-r--r--moonv4/tests/11_user_scalability/rbac_40.py411
-rw-r--r--moonv4/tests/11_user_scalability/rbac_50.py431
-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
-rw-r--r--moonv4/tests/11_user_scalability/session_10.py389
-rw-r--r--moonv4/tests/11_user_scalability/session_20.py744
-rw-r--r--moonv4/tests/11_user_scalability/session_30.py1086
-rw-r--r--moonv4/tests/11_user_scalability/session_40.py1428
-rw-r--r--moonv4/tests/11_user_scalability/session_50.py1770
-rw-r--r--moonv4/tests/12_tenant_scalability/exec.sh44
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_01.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_02.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_03.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_04.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_05.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_06.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_07.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_08.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_09.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_10.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_01.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_02.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_03.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_04.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_05.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_06.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_07.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_08.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_09.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_10.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_01.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_02.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_03.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_04.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_05.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_06.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_07.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_08.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_09.py89
-rw-r--r--moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/Vagrantfile32
-rw-r--r--moonv4/tests/21_slave_scalability/exec.sh25
-rw-r--r--moonv4/tests/21_slave_scalability/exec_varuna.sh47
-rw-r--r--moonv4/tests/21_slave_scalability/master.sh57
-rw-r--r--moonv4/tests/21_slave_scalability/run.sh21
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/slave.sh54
145 files changed, 11341 insertions, 7749 deletions
diff --git a/moonv4/tests/01_smpolicy_average_latency/exec.sh b/moonv4/tests/01_smpolicy_average_latency/exec.sh
index 20c3db94..eafee08a 100644
--- a/moonv4/tests/01_smpolicy_average_latency/exec.sh
+++ b/moonv4/tests/01_smpolicy_average_latency/exec.sh
@@ -2,18 +2,179 @@
TEST_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/set_authz.py
POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
-RESULT_DIR=${MOON_HOME}/tests/01_smpolicy_average_latency/ida/c6
-SCENARIO_RBAC=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_10.py
+RESULT_DIR=${MOON_HOME}/tests/01_smpolicy_average_latency/ida/08
+HOST="--limit=50 --stress-test"
+
+SCENARIO_RBAC010=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_10.py
+SCENARIO_RBAC050=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_50.py
+SCENARIO_RBAC100=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_100.py
+SCENARIO_RBAC150=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_150.py
+SCENARIO_RBAC200=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_200.py
+SCENARIO_RBAC250=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_250.py
+SCENARIO_RBAC300=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_300.py
+
SCENARIO_SESSION=${MOON_HOME}/tests/01_smpolicy_average_latency/session.py
mkdir -p ${RESULT_DIR} 2>/dev/null
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC}
-# python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC010}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_10_01.json" --write-html="${RESULT_DIR}/data_rbac_10_01.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_10_02.json" --write-html="${RESULT_DIR}/data_rbac_10_02.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_10_03.json" --write-html="${RESULT_DIR}/data_rbac_10_03.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_10_04.json" --write-html="${RESULT_DIR}/data_rbac_10_04.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_10_05.json" --write-html="${RESULT_DIR}/data_rbac_10_05.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_10_06.json" --write-html="${RESULT_DIR}/data_rbac_10_06.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_10_07.json" --write-html="${RESULT_DIR}/data_rbac_10_07.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_10_08.json" --write-html="${RESULT_DIR}/data_rbac_10_08.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_10_09.json" --write-html="${RESULT_DIR}/data_rbac_10_09.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_10_10.json" --write-html="${RESULT_DIR}/data_rbac_10_10.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_10_11.json" --write-html="${RESULT_DIR}/data_rbac_10_11.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_10_12.json" --write-html="${RESULT_DIR}/data_rbac_10_12.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_10_13.json" --write-html="${RESULT_DIR}/data_rbac_10_13.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_10_14.json" --write-html="${RESULT_DIR}/data_rbac_10_14.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_10_15.json" --write-html="${RESULT_DIR}/data_rbac_10_15.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_10_16.json" --write-html="${RESULT_DIR}/data_rbac_10_16.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_10_17.json" --write-html="${RESULT_DIR}/data_rbac_10_17.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_10_18.json" --write-html="${RESULT_DIR}/data_rbac_10_18.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_10_19.json" --write-html="${RESULT_DIR}/data_rbac_10_19.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_10_20.json" --write-html="${RESULT_DIR}/data_rbac_10_20.html" ${SCENARIO_RBAC010}
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_1.json" --write-html="${RESULT_DIR}/data_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_5.json" --write-html="${RESULT_DIR}/data_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_15.json" --write-html="${RESULT_DIR}/data_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_10.json" --write-html="${RESULT_DIR}/data_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_20.json" --write-html="${RESULT_DIR}/data_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_25.json" --write-html="${RESULT_DIR}/data_25.html" ${SCENARIO_RBAC}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC050}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_50_01.json" --write-html="${RESULT_DIR}/data_rbac_50_01.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_50_02.json" --write-html="${RESULT_DIR}/data_rbac_50_02.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_50_03.json" --write-html="${RESULT_DIR}/data_rbac_50_03.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_50_04.json" --write-html="${RESULT_DIR}/data_rbac_50_04.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_50_05.json" --write-html="${RESULT_DIR}/data_rbac_50_05.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_50_06.json" --write-html="${RESULT_DIR}/data_rbac_50_06.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_50_07.json" --write-html="${RESULT_DIR}/data_rbac_50_07.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_50_08.json" --write-html="${RESULT_DIR}/data_rbac_50_08.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_50_09.json" --write-html="${RESULT_DIR}/data_rbac_50_09.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_50_10.json" --write-html="${RESULT_DIR}/data_rbac_50_10.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_50_11.json" --write-html="${RESULT_DIR}/data_rbac_50_11.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_50_12.json" --write-html="${RESULT_DIR}/data_rbac_50_12.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_50_13.json" --write-html="${RESULT_DIR}/data_rbac_50_13.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_50_14.json" --write-html="${RESULT_DIR}/data_rbac_50_14.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_50_15.json" --write-html="${RESULT_DIR}/data_rbac_50_15.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_50_16.json" --write-html="${RESULT_DIR}/data_rbac_50_16.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_50_17.json" --write-html="${RESULT_DIR}/data_rbac_50_17.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_50_18.json" --write-html="${RESULT_DIR}/data_rbac_50_18.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_50_19.json" --write-html="${RESULT_DIR}/data_rbac_50_19.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_50_20.json" --write-html="${RESULT_DIR}/data_rbac_50_20.html" ${SCENARIO_RBAC050}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC100}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_100_01.json" --write-html="${RESULT_DIR}/data_rbac_100_01.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_100_02.json" --write-html="${RESULT_DIR}/data_rbac_100_02.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_100_03.json" --write-html="${RESULT_DIR}/data_rbac_100_03.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_100_04.json" --write-html="${RESULT_DIR}/data_rbac_100_04.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_100_05.json" --write-html="${RESULT_DIR}/data_rbac_100_05.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_100_06.json" --write-html="${RESULT_DIR}/data_rbac_100_06.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_100_07.json" --write-html="${RESULT_DIR}/data_rbac_100_07.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_100_08.json" --write-html="${RESULT_DIR}/data_rbac_100_08.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_100_09.json" --write-html="${RESULT_DIR}/data_rbac_100_09.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_100_10.json" --write-html="${RESULT_DIR}/data_rbac_100_10.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_100_11.json" --write-html="${RESULT_DIR}/data_rbac_100_11.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_100_12.json" --write-html="${RESULT_DIR}/data_rbac_100_12.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_100_13.json" --write-html="${RESULT_DIR}/data_rbac_100_13.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_100_14.json" --write-html="${RESULT_DIR}/data_rbac_100_14.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_100_15.json" --write-html="${RESULT_DIR}/data_rbac_100_15.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_100_16.json" --write-html="${RESULT_DIR}/data_rbac_100_16.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_100_17.json" --write-html="${RESULT_DIR}/data_rbac_100_17.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_100_18.json" --write-html="${RESULT_DIR}/data_rbac_100_18.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_100_19.json" --write-html="${RESULT_DIR}/data_rbac_100_19.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_100_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC100}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC150}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_150_01.json" --write-html="${RESULT_DIR}/data_rbac_150_01.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_150_02.json" --write-html="${RESULT_DIR}/data_rbac_150_02.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_150_03.json" --write-html="${RESULT_DIR}/data_rbac_150_03.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_150_04.json" --write-html="${RESULT_DIR}/data_rbac_150_04.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_150_05.json" --write-html="${RESULT_DIR}/data_rbac_150_05.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_150_06.json" --write-html="${RESULT_DIR}/data_rbac_150_06.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_150_07.json" --write-html="${RESULT_DIR}/data_rbac_150_07.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_150_08.json" --write-html="${RESULT_DIR}/data_rbac_150_08.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_150_09.json" --write-html="${RESULT_DIR}/data_rbac_150_09.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_150_10.json" --write-html="${RESULT_DIR}/data_rbac_150_10.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_150_11.json" --write-html="${RESULT_DIR}/data_rbac_150_11.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_150_12.json" --write-html="${RESULT_DIR}/data_rbac_150_12.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_150_13.json" --write-html="${RESULT_DIR}/data_rbac_150_13.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_150_14.json" --write-html="${RESULT_DIR}/data_rbac_150_14.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_150_15.json" --write-html="${RESULT_DIR}/data_rbac_150_15.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_150_16.json" --write-html="${RESULT_DIR}/data_rbac_150_16.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_150_17.json" --write-html="${RESULT_DIR}/data_rbac_150_17.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_150_18.json" --write-html="${RESULT_DIR}/data_rbac_150_18.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_150_19.json" --write-html="${RESULT_DIR}/data_rbac_150_19.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_150_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC150}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC200}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_200_01.json" --write-html="${RESULT_DIR}/data_rbac_200_01.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_200_02.json" --write-html="${RESULT_DIR}/data_rbac_200_02.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_200_03.json" --write-html="${RESULT_DIR}/data_rbac_200_03.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_200_04.json" --write-html="${RESULT_DIR}/data_rbac_200_04.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_200_05.json" --write-html="${RESULT_DIR}/data_rbac_200_05.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_200_06.json" --write-html="${RESULT_DIR}/data_rbac_200_06.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_200_07.json" --write-html="${RESULT_DIR}/data_rbac_200_07.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_200_08.json" --write-html="${RESULT_DIR}/data_rbac_200_08.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_200_09.json" --write-html="${RESULT_DIR}/data_rbac_200_09.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_200_10.json" --write-html="${RESULT_DIR}/data_rbac_200_10.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_200_11.json" --write-html="${RESULT_DIR}/data_rbac_200_11.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_200_12.json" --write-html="${RESULT_DIR}/data_rbac_200_12.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_200_13.json" --write-html="${RESULT_DIR}/data_rbac_200_13.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_200_14.json" --write-html="${RESULT_DIR}/data_rbac_200_14.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_200_15.json" --write-html="${RESULT_DIR}/data_rbac_200_15.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_200_16.json" --write-html="${RESULT_DIR}/data_rbac_200_16.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_200_17.json" --write-html="${RESULT_DIR}/data_rbac_200_17.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_200_18.json" --write-html="${RESULT_DIR}/data_rbac_200_18.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_200_19.json" --write-html="${RESULT_DIR}/data_rbac_200_19.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_200_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC200}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC250}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_250_01.json" --write-html="${RESULT_DIR}/data_rbac_250_01.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_250_02.json" --write-html="${RESULT_DIR}/data_rbac_250_02.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_250_03.json" --write-html="${RESULT_DIR}/data_rbac_250_03.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_250_04.json" --write-html="${RESULT_DIR}/data_rbac_250_04.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_250_05.json" --write-html="${RESULT_DIR}/data_rbac_250_05.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_250_06.json" --write-html="${RESULT_DIR}/data_rbac_250_06.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_250_07.json" --write-html="${RESULT_DIR}/data_rbac_250_07.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_250_08.json" --write-html="${RESULT_DIR}/data_rbac_250_08.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_250_09.json" --write-html="${RESULT_DIR}/data_rbac_250_09.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_250_10.json" --write-html="${RESULT_DIR}/data_rbac_250_10.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_250_11.json" --write-html="${RESULT_DIR}/data_rbac_250_11.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_250_12.json" --write-html="${RESULT_DIR}/data_rbac_250_12.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_250_13.json" --write-html="${RESULT_DIR}/data_rbac_250_13.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_250_14.json" --write-html="${RESULT_DIR}/data_rbac_250_14.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_250_15.json" --write-html="${RESULT_DIR}/data_rbac_250_15.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_250_16.json" --write-html="${RESULT_DIR}/data_rbac_250_16.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_250_17.json" --write-html="${RESULT_DIR}/data_rbac_250_17.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_250_18.json" --write-html="${RESULT_DIR}/data_rbac_250_18.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_250_19.json" --write-html="${RESULT_DIR}/data_rbac_250_19.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_250_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC250}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC300}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_300_01.json" --write-html="${RESULT_DIR}/data_rbac_300_01.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_300_02.json" --write-html="${RESULT_DIR}/data_rbac_300_02.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_300_03.json" --write-html="${RESULT_DIR}/data_rbac_300_03.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_300_04.json" --write-html="${RESULT_DIR}/data_rbac_300_04.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_300_05.json" --write-html="${RESULT_DIR}/data_rbac_300_05.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_300_06.json" --write-html="${RESULT_DIR}/data_rbac_300_06.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_300_07.json" --write-html="${RESULT_DIR}/data_rbac_300_07.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_300_08.json" --write-html="${RESULT_DIR}/data_rbac_300_08.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_300_09.json" --write-html="${RESULT_DIR}/data_rbac_300_09.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_300_10.json" --write-html="${RESULT_DIR}/data_rbac_300_10.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_300_11.json" --write-html="${RESULT_DIR}/data_rbac_300_11.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_300_12.json" --write-html="${RESULT_DIR}/data_rbac_300_12.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_300_13.json" --write-html="${RESULT_DIR}/data_rbac_300_13.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_300_14.json" --write-html="${RESULT_DIR}/data_rbac_300_14.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_300_15.json" --write-html="${RESULT_DIR}/data_rbac_300_15.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_300_16.json" --write-html="${RESULT_DIR}/data_rbac_300_16.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_300_17.json" --write-html="${RESULT_DIR}/data_rbac_300_17.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_300_18.json" --write-html="${RESULT_DIR}/data_rbac_300_18.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_300_19.json" --write-html="${RESULT_DIR}/data_rbac_300_19.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_300_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC300}
+#
diff --git a/moonv4/tests/01_smpolicy_average_latency/exec2.sh b/moonv4/tests/01_smpolicy_average_latency/exec2.sh
new file mode 100644
index 00000000..7c17f53a
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/exec2.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+HOST=
+
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+
+if [ -n "$HOST" ]; then
+ RESULT_DIR=${MOON_HOME}/tests/01_smpolicy_average_latency/${HOST}/10
+ ARGS="--host=${HOST} --limit=100 -t";
+else
+ RESULT_DIR=${MOON_HOME}/tests/01_smpolicy_average_latency/localhost/10
+ ARGS="--limit=100 -t";
+fi
+CPT="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20"
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+#mv ${RESULT_DIR}/docker_stats.rst ${RESULT_DIR}/docker_stats.rst.bak 2>/dev/null
+
+#for SC_INDEX in 01 02 03 04 05 06 07 08 09 10;
+for SC_INDEX in 01;
+do
+ SC=scenario/10/rbac_10_tenant_${SC_INDEX}.py
+ echo "Testing ${SC}"
+ FILE=${SC##*/}
+ FILE=${FILE%.py}
+ echo "Testing ${FILE}" >> ${RESULT_DIR}/docker_stats.rst
+ echo "===========================" >> ${RESULT_DIR}/docker_stats.rst
+ echo "" >> ${RESULT_DIR}/docker_stats.rst
+ python3 ${POPULATE_SCRIPT} ${SC}
+ for cpt in ${CPT};
+ do
+ python3 ${TEST_SCRIPT} ${ARGS} --request-per-second ${cpt} --write="${RESULT_DIR}/data_${FILE}_$cpt.json" ${SC}
+ done
+ #if [ -n "$HOST" ]; then
+ # ssh $HOST docker stats --no-stream --format \"table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.PIDs}}\" >> ${RESULT_DIR}/docker_stats.rst;
+ #else
+ # docker stats --no-stream --format "table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.PIDs}}" >> ${RESULT_DIR}/docker_stats.rst;
+ #fi
+ #echo "" >> ${RESULT_DIR}/docker_stats.rst
+done
+
diff --git a/moonv4/tests/01_smpolicy_average_latency/exec_varuna.sh b/moonv4/tests/01_smpolicy_average_latency/exec_varuna.sh
new file mode 100644
index 00000000..f889f4d7
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/exec_varuna.sh
@@ -0,0 +1,180 @@
+#!/usr/bin/env bash
+
+TEST_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/set_authz.py
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+RESULT_DIR=${MOON_HOME}/tests/01_smpolicy_average_latency/varuna/ida/02
+HOST="--host=varuna"
+
+SCENARIO_RBAC010=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_10.py
+SCENARIO_RBAC050=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_50.py
+SCENARIO_RBAC100=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_100.py
+SCENARIO_RBAC150=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_150.py
+SCENARIO_RBAC200=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_200.py
+SCENARIO_RBAC250=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_250.py
+SCENARIO_RBAC300=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_300.py
+
+SCENARIO_SESSION=${MOON_HOME}/tests/01_smpolicy_average_latency/session.py
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC010}
+
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_10_01.json" --write-html="${RESULT_DIR}/data_rbac_10_01.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_10_02.json" --write-html="${RESULT_DIR}/data_rbac_10_02.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_10_03.json" --write-html="${RESULT_DIR}/data_rbac_10_03.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_10_04.json" --write-html="${RESULT_DIR}/data_rbac_10_04.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_10_05.json" --write-html="${RESULT_DIR}/data_rbac_10_05.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_10_06.json" --write-html="${RESULT_DIR}/data_rbac_10_06.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_10_07.json" --write-html="${RESULT_DIR}/data_rbac_10_07.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_10_08.json" --write-html="${RESULT_DIR}/data_rbac_10_08.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_10_09.json" --write-html="${RESULT_DIR}/data_rbac_10_09.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_10_10.json" --write-html="${RESULT_DIR}/data_rbac_10_10.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_10_11.json" --write-html="${RESULT_DIR}/data_rbac_10_11.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_10_12.json" --write-html="${RESULT_DIR}/data_rbac_10_12.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_10_13.json" --write-html="${RESULT_DIR}/data_rbac_10_13.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_10_14.json" --write-html="${RESULT_DIR}/data_rbac_10_14.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_10_15.json" --write-html="${RESULT_DIR}/data_rbac_10_15.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_10_16.json" --write-html="${RESULT_DIR}/data_rbac_10_16.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_10_17.json" --write-html="${RESULT_DIR}/data_rbac_10_17.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_10_18.json" --write-html="${RESULT_DIR}/data_rbac_10_18.html" ${SCENARIO_RBAC010}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_10_19.json" --write-html="${RESULT_DIR}/data_rbac_10_19.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_10_20.json" --write-html="${RESULT_DIR}/data_rbac_10_20.html" ${SCENARIO_RBAC010}
+
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC050}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_50_01.json" --write-html="${RESULT_DIR}/data_rbac_50_01.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_50_02.json" --write-html="${RESULT_DIR}/data_rbac_50_02.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_50_03.json" --write-html="${RESULT_DIR}/data_rbac_50_03.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_50_04.json" --write-html="${RESULT_DIR}/data_rbac_50_04.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_50_05.json" --write-html="${RESULT_DIR}/data_rbac_50_05.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_50_06.json" --write-html="${RESULT_DIR}/data_rbac_50_06.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_50_07.json" --write-html="${RESULT_DIR}/data_rbac_50_07.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_50_08.json" --write-html="${RESULT_DIR}/data_rbac_50_08.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_50_09.json" --write-html="${RESULT_DIR}/data_rbac_50_09.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_50_10.json" --write-html="${RESULT_DIR}/data_rbac_50_10.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_50_11.json" --write-html="${RESULT_DIR}/data_rbac_50_11.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_50_12.json" --write-html="${RESULT_DIR}/data_rbac_50_12.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_50_13.json" --write-html="${RESULT_DIR}/data_rbac_50_13.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_50_14.json" --write-html="${RESULT_DIR}/data_rbac_50_14.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_50_15.json" --write-html="${RESULT_DIR}/data_rbac_50_15.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_50_16.json" --write-html="${RESULT_DIR}/data_rbac_50_16.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_50_17.json" --write-html="${RESULT_DIR}/data_rbac_50_17.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_50_18.json" --write-html="${RESULT_DIR}/data_rbac_50_18.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_50_19.json" --write-html="${RESULT_DIR}/data_rbac_50_19.html" ${SCENARIO_RBAC050}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_50_20.json" --write-html="${RESULT_DIR}/data_rbac_50_20.html" ${SCENARIO_RBAC050}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC100}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_100_01.json" --write-html="${RESULT_DIR}/data_rbac_100_01.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_100_02.json" --write-html="${RESULT_DIR}/data_rbac_100_02.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_100_03.json" --write-html="${RESULT_DIR}/data_rbac_100_03.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_100_04.json" --write-html="${RESULT_DIR}/data_rbac_100_04.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_100_05.json" --write-html="${RESULT_DIR}/data_rbac_100_05.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_100_06.json" --write-html="${RESULT_DIR}/data_rbac_100_06.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_100_07.json" --write-html="${RESULT_DIR}/data_rbac_100_07.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_100_08.json" --write-html="${RESULT_DIR}/data_rbac_100_08.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_100_09.json" --write-html="${RESULT_DIR}/data_rbac_100_09.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_100_10.json" --write-html="${RESULT_DIR}/data_rbac_100_10.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_100_11.json" --write-html="${RESULT_DIR}/data_rbac_100_11.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_100_12.json" --write-html="${RESULT_DIR}/data_rbac_100_12.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_100_13.json" --write-html="${RESULT_DIR}/data_rbac_100_13.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_100_14.json" --write-html="${RESULT_DIR}/data_rbac_100_14.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_100_15.json" --write-html="${RESULT_DIR}/data_rbac_100_15.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_100_16.json" --write-html="${RESULT_DIR}/data_rbac_100_16.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_100_17.json" --write-html="${RESULT_DIR}/data_rbac_100_17.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_100_18.json" --write-html="${RESULT_DIR}/data_rbac_100_18.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_100_19.json" --write-html="${RESULT_DIR}/data_rbac_100_19.html" ${SCENARIO_RBAC100}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_100_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC100}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC150}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_150_01.json" --write-html="${RESULT_DIR}/data_rbac_150_01.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_150_02.json" --write-html="${RESULT_DIR}/data_rbac_150_02.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_150_03.json" --write-html="${RESULT_DIR}/data_rbac_150_03.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_150_04.json" --write-html="${RESULT_DIR}/data_rbac_150_04.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_150_05.json" --write-html="${RESULT_DIR}/data_rbac_150_05.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_150_06.json" --write-html="${RESULT_DIR}/data_rbac_150_06.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_150_07.json" --write-html="${RESULT_DIR}/data_rbac_150_07.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_150_08.json" --write-html="${RESULT_DIR}/data_rbac_150_08.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_150_09.json" --write-html="${RESULT_DIR}/data_rbac_150_09.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_150_10.json" --write-html="${RESULT_DIR}/data_rbac_150_10.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_150_11.json" --write-html="${RESULT_DIR}/data_rbac_150_11.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_150_12.json" --write-html="${RESULT_DIR}/data_rbac_150_12.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_150_13.json" --write-html="${RESULT_DIR}/data_rbac_150_13.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_150_14.json" --write-html="${RESULT_DIR}/data_rbac_150_14.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_150_15.json" --write-html="${RESULT_DIR}/data_rbac_150_15.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_150_16.json" --write-html="${RESULT_DIR}/data_rbac_150_16.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_150_17.json" --write-html="${RESULT_DIR}/data_rbac_150_17.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_150_18.json" --write-html="${RESULT_DIR}/data_rbac_150_18.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_150_19.json" --write-html="${RESULT_DIR}/data_rbac_150_19.html" ${SCENARIO_RBAC150}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_150_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC150}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC200}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_200_01.json" --write-html="${RESULT_DIR}/data_rbac_200_01.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_200_02.json" --write-html="${RESULT_DIR}/data_rbac_200_02.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_200_03.json" --write-html="${RESULT_DIR}/data_rbac_200_03.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_200_04.json" --write-html="${RESULT_DIR}/data_rbac_200_04.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_200_05.json" --write-html="${RESULT_DIR}/data_rbac_200_05.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_200_06.json" --write-html="${RESULT_DIR}/data_rbac_200_06.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_200_07.json" --write-html="${RESULT_DIR}/data_rbac_200_07.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_200_08.json" --write-html="${RESULT_DIR}/data_rbac_200_08.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_200_09.json" --write-html="${RESULT_DIR}/data_rbac_200_09.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_200_10.json" --write-html="${RESULT_DIR}/data_rbac_200_10.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_200_11.json" --write-html="${RESULT_DIR}/data_rbac_200_11.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_200_12.json" --write-html="${RESULT_DIR}/data_rbac_200_12.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_200_13.json" --write-html="${RESULT_DIR}/data_rbac_200_13.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_200_14.json" --write-html="${RESULT_DIR}/data_rbac_200_14.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_200_15.json" --write-html="${RESULT_DIR}/data_rbac_200_15.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_200_16.json" --write-html="${RESULT_DIR}/data_rbac_200_16.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_200_17.json" --write-html="${RESULT_DIR}/data_rbac_200_17.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_200_18.json" --write-html="${RESULT_DIR}/data_rbac_200_18.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_200_19.json" --write-html="${RESULT_DIR}/data_rbac_200_19.html" ${SCENARIO_RBAC200}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_200_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC200}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC250}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_250_01.json" --write-html="${RESULT_DIR}/data_rbac_250_01.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_250_02.json" --write-html="${RESULT_DIR}/data_rbac_250_02.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_250_03.json" --write-html="${RESULT_DIR}/data_rbac_250_03.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_250_04.json" --write-html="${RESULT_DIR}/data_rbac_250_04.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_250_05.json" --write-html="${RESULT_DIR}/data_rbac_250_05.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_250_06.json" --write-html="${RESULT_DIR}/data_rbac_250_06.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_250_07.json" --write-html="${RESULT_DIR}/data_rbac_250_07.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_250_08.json" --write-html="${RESULT_DIR}/data_rbac_250_08.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_250_09.json" --write-html="${RESULT_DIR}/data_rbac_250_09.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_250_10.json" --write-html="${RESULT_DIR}/data_rbac_250_10.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_250_11.json" --write-html="${RESULT_DIR}/data_rbac_250_11.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_250_12.json" --write-html="${RESULT_DIR}/data_rbac_250_12.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_250_13.json" --write-html="${RESULT_DIR}/data_rbac_250_13.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_250_14.json" --write-html="${RESULT_DIR}/data_rbac_250_14.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_250_15.json" --write-html="${RESULT_DIR}/data_rbac_250_15.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_250_16.json" --write-html="${RESULT_DIR}/data_rbac_250_16.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_250_17.json" --write-html="${RESULT_DIR}/data_rbac_250_17.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_250_18.json" --write-html="${RESULT_DIR}/data_rbac_250_18.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_250_19.json" --write-html="${RESULT_DIR}/data_rbac_250_19.html" ${SCENARIO_RBAC250}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_250_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC250}
+#
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC300}
+#
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_300_01.json" --write-html="${RESULT_DIR}/data_rbac_300_01.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_300_02.json" --write-html="${RESULT_DIR}/data_rbac_300_02.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_300_03.json" --write-html="${RESULT_DIR}/data_rbac_300_03.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_300_04.json" --write-html="${RESULT_DIR}/data_rbac_300_04.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_300_05.json" --write-html="${RESULT_DIR}/data_rbac_300_05.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_300_06.json" --write-html="${RESULT_DIR}/data_rbac_300_06.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_300_07.json" --write-html="${RESULT_DIR}/data_rbac_300_07.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_300_08.json" --write-html="${RESULT_DIR}/data_rbac_300_08.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_300_09.json" --write-html="${RESULT_DIR}/data_rbac_300_09.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_300_10.json" --write-html="${RESULT_DIR}/data_rbac_300_10.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_300_11.json" --write-html="${RESULT_DIR}/data_rbac_300_11.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_300_12.json" --write-html="${RESULT_DIR}/data_rbac_300_12.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_300_13.json" --write-html="${RESULT_DIR}/data_rbac_300_13.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_300_14.json" --write-html="${RESULT_DIR}/data_rbac_300_14.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_300_15.json" --write-html="${RESULT_DIR}/data_rbac_300_15.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_300_16.json" --write-html="${RESULT_DIR}/data_rbac_300_16.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_300_17.json" --write-html="${RESULT_DIR}/data_rbac_300_17.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_300_18.json" --write-html="${RESULT_DIR}/data_rbac_300_18.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_300_19.json" --write-html="${RESULT_DIR}/data_rbac_300_19.html" ${SCENARIO_RBAC300}
+#python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_300_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC300}
+#
diff --git a/moonv4/tests/01_smpolicy_average_latency/rbac_10.py b/moonv4/tests/01_smpolicy_average_latency/rbac_10.py
deleted file mode 100644
index ef5dd9b2..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/rbac_10.py
+++ /dev/null
@@ -1,233 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
-}
-objects = {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
-}
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "*": ""
-}}
-object_data = {"id": {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
- "*": ""
-}}
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {
- "user0": ({"role": "employee"}, {"role": "*"}),
- "user1": ({"role": "employee"}, {"role": "*"}),
- "user2": ({"role": "dev1"}, {"role": "*"}),
- "user3": ({"role": "dev1"}, {"role": "*"}),
- "user4": ({"role": "dev1"}, {"role": "*"}),
- "user5": ({"role": "dev1"}, {"role": "*"}),
- "user6": ({"role": "dev2"}, {"role": "*"}),
- "user7": ({"role": "dev2"}, {"role": "*"}),
- "user8": ({"role": "dev2"}, {"role": "*"}),
- "user9": ({"role": "dev2"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0": ({"id": "vm0"}, {"id": "*"}),
- "vm1": ({"id": "vm1"}, {"id": "*"}),
- "vm2": ({"id": "vm2"}, {"id": "*"}),
- "vm3": ({"id": "vm3"}, {"id": "*"}),
- "vm4": ({"id": "vm4"}, {"id": "*"}),
- "vm5": ({"id": "vm5"}, {"id": "*"}),
- "vm6": ({"id": "vm6"}, {"id": "*"}),
- "vm7": ({"id": "vm7"}, {"id": "*"}),
- "vm8": ({"id": "vm8"}, {"id": "*"}),
- "vm9": ({"id": "vm9"}, {"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"},
- )
- },
- # Rules for grant all employee to do read actions to all VM except vm0
- {
- "rule": ("employee", "vm1", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm2", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm3", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm4", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm5", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm6", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm7", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm8", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm9", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev1 to do read actions to some VM
- {
- "rule": ("dev1", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev2 to do read actions to some VM
- {
- "rule": ("dev2", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py
new file mode 100644
index 00000000..b591b532
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py
new file mode 100644
index 00000000..4ca48d25
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py
new file mode 100644
index 00000000..eb424e79
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py
new file mode 100644
index 00000000..5fb860f5
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py
new file mode 100644
index 00000000..09947491
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py
new file mode 100644
index 00000000..a3f66c4f
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py
new file mode 100644
index 00000000..14d75d57
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py
new file mode 100644
index 00000000..a658bb0c
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py
new file mode 100644
index 00000000..96c3f61a
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py
new file mode 100644
index 00000000..bebdee23
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py
new file mode 100644
index 00000000..4282d4d0
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py
new file mode 100644
index 00000000..e110dd5c
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py
new file mode 100644
index 00000000..dc2195e1
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py
new file mode 100644
index 00000000..6e3e86ce
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py
new file mode 100644
index 00000000..266e3bc0
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py
new file mode 100644
index 00000000..b1227932
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py
new file mode 100644
index 00000000..794331b6
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py
new file mode 100644
index 00000000..5eab408c
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py
new file mode 100644
index 00000000..2721c092
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py
new file mode 100644
index 00000000..bcad20f7
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py
new file mode 100644
index 00000000..9917a970
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py
new file mode 100644
index 00000000..9b040abd
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py
new file mode 100644
index 00000000..4d15a6ee
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py
new file mode 100644
index 00000000..b5fba2f0
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py
new file mode 100644
index 00000000..f0f21cfe
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py
new file mode 100644
index 00000000..7ab5ecc0
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py
new file mode 100644
index 00000000..53dcb5fc
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py
new file mode 100644
index 00000000..4d70e179
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py
new file mode 100644
index 00000000..5ece9e9d
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py
new file mode 100644
index 00000000..9914e565
--- /dev/null
+++ b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+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/02_smpolicy_chaining_overhead/exec.sh b/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh
index 3a10ef4a..ffe59457 100644
--- a/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh
+++ b/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh
@@ -1,22 +1,45 @@
#!/usr/bin/env bash
-TEST_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/set_authz.py
+HOST_MASTER=varuna
+PORT_MASTER=38001
+HOST_SLAVE=172.18.0.11
+PORT_SLAVE=38001
+
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
-RESULT_DIR=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/10_users_rbac
-SCENARIO_RBAC=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/rbac_10.py
-SCENARIO_SESSION=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/session.py
+
+RESULT_DIR=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/${HOST_MASTER}
+ARGS="--limit=100 -t";
mkdir -p ${RESULT_DIR} 2>/dev/null
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC}
-# python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}
-
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_1.json" --write-html="${RESULT_DIR}/data_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_2.json" --write-html="${RESULT_DIR}/data_2.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_3.json" --write-html="${RESULT_DIR}/data_3.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_4.json" --write-html="${RESULT_DIR}/data_4.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_5.json" --write-html="${RESULT_DIR}/data_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_10.json" --write-html="${RESULT_DIR}/data_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_15.json" --write-html="${RESULT_DIR}/data_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_20.json" --write-html="${RESULT_DIR}/data_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_25.json" --write-html="${RESULT_DIR}/data_25.html" ${SCENARIO_RBAC}
+CPT="01 02 03 04 05 06 07 08 09 10"
+
+SC=rbac_10.py
+python3 ${POPULATE_SCRIPT} ${SC}
+
+#for REQ in 01 02 03 04 05 06 07 08 09 10;
+#do
+
+python3 ${TEST_SCRIPT} --host=${HOST_MASTER} --port=${PORT_SLAVE} ${ARGS} \
+ --pdp pdp01 --request-per-second 5 --write="${RESULT_DIR}/data_rbac_05_01.json" ${SC}
+
+#done
+
+echo Press enter to continue
+read A
+
+SC=session_10.py
+python3 ${POPULATE_SCRIPT} ${SC}
+
+#for REQ in 01 02 03 04 05 06 07 08 09 10;
+#do
+
+echo Press enter to continue
+read A
+
+python3 ${TEST_SCRIPT} --host=${HOST_MASTER} --port=${PORT_SLAVE} ${ARGS} \
+ --pdp pdp01 --request-per-second 5 --write="${RESULT_DIR}/data_rbac_session_05_01.json" ${SC}
+
+#done
+
diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh b/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh
index e67babce..b92b82ba 100644
--- a/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh
+++ b/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh
@@ -4,10 +4,12 @@ DIR=$1
cd ${DIR}
+python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py --help
+
python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
- --input="data_1.json,data_2.json,data_3.json,data_4.json,data_5.json,data_10.json,data_15.json,data_20.json" \
- --legend="1 req/s,2 req/s,3 req/s,4 req/s,5 req/s,10 req/s,15 req/s,20 req/s" \
- --plot-result="Deny" \
+ --input="data_1.json,data_2.json,data_3.json,data_4.json,data_5.json,data_6.json,data_7.json,data_8.json,data_9.json,data_10.json,data_11.json,data_12.json,data_13.json,data_14.json,data_15.json,data_16.json,data_17.json,data_18.json,data_19.json,data_20.json,data_21.json,data_22.json,data_23.json,data_24.json,data_25.json,data_26.json,data_27.json,data_28.json,data_29.json,data_30.json" \
+ --legend="1 req/s,2 req/s,3 req/s,4 req/s,5 req/s,6 req/s,7 req/s,8 req/s,9 req/s,10 req/s,11 req/s,12 req/s,13 req/s,14 req/s,15 req/s,16 req/s,17 req/s,18 req/s,19 req/s,20 req/s,21 req/s,22 req/s,23 req/s,24 req/s,25 req/s,26 req/s,27 req/s,28 req/s,29 req/s,30 req/s" \
+ --plot-result="*" \
--plot-average \
-d
#python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py b/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py
index ef5dd9b2..60699cc6 100644
--- a/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py
+++ b/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py
@@ -1,5 +1,5 @@
-pdp_name = "pdp1"
+pdp_name = "pdp01"
policy_name = "RBAC policy example"
model_name = "RBAC"
policy_genre = "authz"
diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py b/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py
index 5b4a64b6..d247ff19 100644
--- a/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py
+++ b/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py
@@ -1,5 +1,5 @@
-pdp_name = "pdp1"
+pdp_name = "pdp01"
policy_name = "Session policy example"
model_name = "Session"
policy_genre = "session"
diff --git a/moonv4/tests/11_user_scalability/exec.sh b/moonv4/tests/11_user_scalability/exec.sh
new file mode 100644
index 00000000..9245111c
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/exec.sh
@@ -0,0 +1,180 @@
+#!/usr/bin/env bash
+
+TEST_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/set_authz.py
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+RESULT_DIR=${MOON_HOME}/tests/01_smpolicy_average_latency/varuna/ida/01
+HOST="--host=varuna"
+
+SCENARIO_RBAC010=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_10.py
+SCENARIO_RBAC050=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_50.py
+SCENARIO_RBAC100=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_100.py
+SCENARIO_RBAC150=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_150.py
+SCENARIO_RBAC200=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_200.py
+SCENARIO_RBAC250=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_250.py
+SCENARIO_RBAC300=${MOON_HOME}/tests/01_smpolicy_average_latency/rbac_300.py
+
+SCENARIO_SESSION=${MOON_HOME}/tests/01_smpolicy_average_latency/session.py
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC010}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_10_01.json" --write-html="${RESULT_DIR}/data_rbac_10_01.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_10_02.json" --write-html="${RESULT_DIR}/data_rbac_10_02.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_10_03.json" --write-html="${RESULT_DIR}/data_rbac_10_03.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_10_04.json" --write-html="${RESULT_DIR}/data_rbac_10_04.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_10_05.json" --write-html="${RESULT_DIR}/data_rbac_10_05.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_10_06.json" --write-html="${RESULT_DIR}/data_rbac_10_06.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_10_07.json" --write-html="${RESULT_DIR}/data_rbac_10_07.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_10_08.json" --write-html="${RESULT_DIR}/data_rbac_10_08.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_10_09.json" --write-html="${RESULT_DIR}/data_rbac_10_09.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_10_10.json" --write-html="${RESULT_DIR}/data_rbac_10_10.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_10_11.json" --write-html="${RESULT_DIR}/data_rbac_10_11.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_10_12.json" --write-html="${RESULT_DIR}/data_rbac_10_12.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_10_13.json" --write-html="${RESULT_DIR}/data_rbac_10_13.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_10_14.json" --write-html="${RESULT_DIR}/data_rbac_10_14.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_10_15.json" --write-html="${RESULT_DIR}/data_rbac_10_15.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_10_16.json" --write-html="${RESULT_DIR}/data_rbac_10_16.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_10_17.json" --write-html="${RESULT_DIR}/data_rbac_10_17.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_10_18.json" --write-html="${RESULT_DIR}/data_rbac_10_18.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_10_19.json" --write-html="${RESULT_DIR}/data_rbac_10_19.html" ${SCENARIO_RBAC010}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_10_20.json" --write-html="${RESULT_DIR}/data_rbac_10_20.html" ${SCENARIO_RBAC010}
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC050}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_50_01.json" --write-html="${RESULT_DIR}/data_rbac_50_01.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_50_02.json" --write-html="${RESULT_DIR}/data_rbac_50_02.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_50_03.json" --write-html="${RESULT_DIR}/data_rbac_50_03.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_50_04.json" --write-html="${RESULT_DIR}/data_rbac_50_04.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_50_05.json" --write-html="${RESULT_DIR}/data_rbac_50_05.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_50_06.json" --write-html="${RESULT_DIR}/data_rbac_50_06.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_50_07.json" --write-html="${RESULT_DIR}/data_rbac_50_07.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_50_08.json" --write-html="${RESULT_DIR}/data_rbac_50_08.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_50_09.json" --write-html="${RESULT_DIR}/data_rbac_50_09.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_50_10.json" --write-html="${RESULT_DIR}/data_rbac_50_10.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_50_11.json" --write-html="${RESULT_DIR}/data_rbac_50_11.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_50_12.json" --write-html="${RESULT_DIR}/data_rbac_50_12.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_50_13.json" --write-html="${RESULT_DIR}/data_rbac_50_13.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_50_14.json" --write-html="${RESULT_DIR}/data_rbac_50_14.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_50_15.json" --write-html="${RESULT_DIR}/data_rbac_50_15.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_50_16.json" --write-html="${RESULT_DIR}/data_rbac_50_16.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_50_17.json" --write-html="${RESULT_DIR}/data_rbac_50_17.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_50_18.json" --write-html="${RESULT_DIR}/data_rbac_50_18.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_50_19.json" --write-html="${RESULT_DIR}/data_rbac_50_19.html" ${SCENARIO_RBAC050}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_50_20.json" --write-html="${RESULT_DIR}/data_rbac_50_20.html" ${SCENARIO_RBAC050}
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC100}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_100_01.json" --write-html="${RESULT_DIR}/data_rbac_100_01.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_100_02.json" --write-html="${RESULT_DIR}/data_rbac_100_02.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_100_03.json" --write-html="${RESULT_DIR}/data_rbac_100_03.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_100_04.json" --write-html="${RESULT_DIR}/data_rbac_100_04.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_100_05.json" --write-html="${RESULT_DIR}/data_rbac_100_05.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_100_06.json" --write-html="${RESULT_DIR}/data_rbac_100_06.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_100_07.json" --write-html="${RESULT_DIR}/data_rbac_100_07.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_100_08.json" --write-html="${RESULT_DIR}/data_rbac_100_08.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_100_09.json" --write-html="${RESULT_DIR}/data_rbac_100_09.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_100_10.json" --write-html="${RESULT_DIR}/data_rbac_100_10.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_100_11.json" --write-html="${RESULT_DIR}/data_rbac_100_11.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_100_12.json" --write-html="${RESULT_DIR}/data_rbac_100_12.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_100_13.json" --write-html="${RESULT_DIR}/data_rbac_100_13.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_100_14.json" --write-html="${RESULT_DIR}/data_rbac_100_14.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_100_15.json" --write-html="${RESULT_DIR}/data_rbac_100_15.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_100_16.json" --write-html="${RESULT_DIR}/data_rbac_100_16.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_100_17.json" --write-html="${RESULT_DIR}/data_rbac_100_17.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_100_18.json" --write-html="${RESULT_DIR}/data_rbac_100_18.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_100_19.json" --write-html="${RESULT_DIR}/data_rbac_100_19.html" ${SCENARIO_RBAC100}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_100_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC100}
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC150}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_150_01.json" --write-html="${RESULT_DIR}/data_rbac_150_01.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_150_02.json" --write-html="${RESULT_DIR}/data_rbac_150_02.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_150_03.json" --write-html="${RESULT_DIR}/data_rbac_150_03.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_150_04.json" --write-html="${RESULT_DIR}/data_rbac_150_04.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_150_05.json" --write-html="${RESULT_DIR}/data_rbac_150_05.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_150_06.json" --write-html="${RESULT_DIR}/data_rbac_150_06.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_150_07.json" --write-html="${RESULT_DIR}/data_rbac_150_07.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_150_08.json" --write-html="${RESULT_DIR}/data_rbac_150_08.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_150_09.json" --write-html="${RESULT_DIR}/data_rbac_150_09.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_150_10.json" --write-html="${RESULT_DIR}/data_rbac_150_10.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_150_11.json" --write-html="${RESULT_DIR}/data_rbac_150_11.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_150_12.json" --write-html="${RESULT_DIR}/data_rbac_150_12.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_150_13.json" --write-html="${RESULT_DIR}/data_rbac_150_13.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_150_14.json" --write-html="${RESULT_DIR}/data_rbac_150_14.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_150_15.json" --write-html="${RESULT_DIR}/data_rbac_150_15.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_150_16.json" --write-html="${RESULT_DIR}/data_rbac_150_16.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_150_17.json" --write-html="${RESULT_DIR}/data_rbac_150_17.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_150_18.json" --write-html="${RESULT_DIR}/data_rbac_150_18.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_150_19.json" --write-html="${RESULT_DIR}/data_rbac_150_19.html" ${SCENARIO_RBAC150}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_150_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC150}
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC200}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_200_01.json" --write-html="${RESULT_DIR}/data_rbac_200_01.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_200_02.json" --write-html="${RESULT_DIR}/data_rbac_200_02.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_200_03.json" --write-html="${RESULT_DIR}/data_rbac_200_03.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_200_04.json" --write-html="${RESULT_DIR}/data_rbac_200_04.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_200_05.json" --write-html="${RESULT_DIR}/data_rbac_200_05.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_200_06.json" --write-html="${RESULT_DIR}/data_rbac_200_06.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_200_07.json" --write-html="${RESULT_DIR}/data_rbac_200_07.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_200_08.json" --write-html="${RESULT_DIR}/data_rbac_200_08.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_200_09.json" --write-html="${RESULT_DIR}/data_rbac_200_09.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_200_10.json" --write-html="${RESULT_DIR}/data_rbac_200_10.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_200_11.json" --write-html="${RESULT_DIR}/data_rbac_200_11.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_200_12.json" --write-html="${RESULT_DIR}/data_rbac_200_12.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_200_13.json" --write-html="${RESULT_DIR}/data_rbac_200_13.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_200_14.json" --write-html="${RESULT_DIR}/data_rbac_200_14.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_200_15.json" --write-html="${RESULT_DIR}/data_rbac_200_15.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_200_16.json" --write-html="${RESULT_DIR}/data_rbac_200_16.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_200_17.json" --write-html="${RESULT_DIR}/data_rbac_200_17.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_200_18.json" --write-html="${RESULT_DIR}/data_rbac_200_18.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_200_19.json" --write-html="${RESULT_DIR}/data_rbac_200_19.html" ${SCENARIO_RBAC200}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_200_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC200}
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC250}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_250_01.json" --write-html="${RESULT_DIR}/data_rbac_250_01.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_250_02.json" --write-html="${RESULT_DIR}/data_rbac_250_02.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_250_03.json" --write-html="${RESULT_DIR}/data_rbac_250_03.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_250_04.json" --write-html="${RESULT_DIR}/data_rbac_250_04.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_250_05.json" --write-html="${RESULT_DIR}/data_rbac_250_05.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_250_06.json" --write-html="${RESULT_DIR}/data_rbac_250_06.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_250_07.json" --write-html="${RESULT_DIR}/data_rbac_250_07.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_250_08.json" --write-html="${RESULT_DIR}/data_rbac_250_08.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_250_09.json" --write-html="${RESULT_DIR}/data_rbac_250_09.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_250_10.json" --write-html="${RESULT_DIR}/data_rbac_250_10.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_250_11.json" --write-html="${RESULT_DIR}/data_rbac_250_11.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_250_12.json" --write-html="${RESULT_DIR}/data_rbac_250_12.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_250_13.json" --write-html="${RESULT_DIR}/data_rbac_250_13.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_250_14.json" --write-html="${RESULT_DIR}/data_rbac_250_14.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_250_15.json" --write-html="${RESULT_DIR}/data_rbac_250_15.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_250_16.json" --write-html="${RESULT_DIR}/data_rbac_250_16.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_250_17.json" --write-html="${RESULT_DIR}/data_rbac_250_17.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_250_18.json" --write-html="${RESULT_DIR}/data_rbac_250_18.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_250_19.json" --write-html="${RESULT_DIR}/data_rbac_250_19.html" ${SCENARIO_RBAC250}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_250_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC250}
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC300}
+
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_300_01.json" --write-html="${RESULT_DIR}/data_rbac_300_01.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_300_02.json" --write-html="${RESULT_DIR}/data_rbac_300_02.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_300_03.json" --write-html="${RESULT_DIR}/data_rbac_300_03.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_300_04.json" --write-html="${RESULT_DIR}/data_rbac_300_04.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_300_05.json" --write-html="${RESULT_DIR}/data_rbac_300_05.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_300_06.json" --write-html="${RESULT_DIR}/data_rbac_300_06.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_300_07.json" --write-html="${RESULT_DIR}/data_rbac_300_07.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_300_08.json" --write-html="${RESULT_DIR}/data_rbac_300_08.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_300_09.json" --write-html="${RESULT_DIR}/data_rbac_300_09.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_300_10.json" --write-html="${RESULT_DIR}/data_rbac_300_10.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_300_11.json" --write-html="${RESULT_DIR}/data_rbac_300_11.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_300_12.json" --write-html="${RESULT_DIR}/data_rbac_300_12.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_300_13.json" --write-html="${RESULT_DIR}/data_rbac_300_13.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_300_14.json" --write-html="${RESULT_DIR}/data_rbac_300_14.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_300_15.json" --write-html="${RESULT_DIR}/data_rbac_300_15.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_300_16.json" --write-html="${RESULT_DIR}/data_rbac_300_16.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_300_17.json" --write-html="${RESULT_DIR}/data_rbac_300_17.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_300_18.json" --write-html="${RESULT_DIR}/data_rbac_300_18.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_300_19.json" --write-html="${RESULT_DIR}/data_rbac_300_19.html" ${SCENARIO_RBAC300}
+python3 ${TEST_SCRIPT} ${HOST} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_300_20.json" --write-html="${RESULT_DIR}/data_rbac_100_20.html" ${SCENARIO_RBAC300}
+
diff --git a/moonv4/tests/11_user_scalability/exec_rbac.sh b/moonv4/tests/11_user_scalability/exec_rbac.sh
index 27483a3a..2c61f080 100644
--- a/moonv4/tests/11_user_scalability/exec_rbac.sh
+++ b/moonv4/tests/11_user_scalability/exec_rbac.sh
@@ -1,233 +1,207 @@
#!/usr/bin/env bash
-TEST_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/set_authz.py
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py --host=varuna --limit=100"
POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
-RESULT_DIR=${MOON_HOME}/tests/11_user_scalability/10_users_rbac
-SCENARIO_RBAC=${MOON_HOME}/tests/11_user_scalability/rbac_10.py
-SCENARIO_RBAC2=${MOON_HOME}/tests/11_user_scalability/rbac_20.py
-SCENARIO_RBAC3=${MOON_HOME}/tests/11_user_scalability/rbac_30.py
-SCENARIO_RBAC4=${MOON_HOME}/tests/11_user_scalability/rbac_40.py
-SCENARIO_RBAC5=${MOON_HOME}/tests/11_user_scalability/rbac_50.py
-SCENARIO_SESSION=${MOON_HOME}/tests/11_user_scalability/session_10.py
-SCENARIO_SESSION2=${MOON_HOME}/tests/11_user_scalability/session_20.py
-SCENARIO_SESSION3=${MOON_HOME}/tests/11_user_scalability/session_30.py
-SCENARIO_SESSION4=${MOON_HOME}/tests/11_user_scalability/session_40.py
-SCENARIO_SESSION5=${MOON_HOME}/tests/11_user_scalability/session_50.py
+RESULT_DIR=${MOON_HOME}/tests/11_user_scalability/varuna/01
+
+SCENARIO_RBAC_10=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_10.py
+SCENARIO_RBAC_20=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_20.py
+SCENARIO_RBAC_30=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_30.py
+SCENARIO_RBAC_40=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_40.py
+SCENARIO_RBAC_50=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_50.py
+SCENARIO_RBAC_100=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_100.py
+SCENARIO_RBAC_250=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_250.py
+SCENARIO_RBAC_500=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_500.py
+SCENARIO_RBAC_750=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_750.py
+SCENARIO_RBAC_1000=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_1000.py
+SCENARIO_RBAC_1500=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_1500.py
+
+SCENARIO_SESSION_10=${MOON_HOME}/tests/11_user_scalability/scenario/session_10.py
+SCENARIO_SESSION_50=${MOON_HOME}/tests/11_user_scalability/scenario/session_50.py
+SCENARIO_SESSION_100=${MOON_HOME}/tests/11_user_scalability/scenario/session_100.py
+SCENARIO_SESSION_150=${MOON_HOME}/tests/11_user_scalability/scenario/session_150.py
+SCENARIO_SESSION_200=${MOON_HOME}/tests/11_user_scalability/scenario/session_200.py
+SCENARIO_SESSION_250=${MOON_HOME}/tests/11_user_scalability/scenario/session_250.py
+SCENARIO_SESSION_300=${MOON_HOME}/tests/11_user_scalability/scenario/session_300.py
+SCENARIO_SESSION_500=${MOON_HOME}/tests/11_user_scalability/scenario/session_500.py
+SCENARIO_SESSION_750=${MOON_HOME}/tests/11_user_scalability/scenario/session_750.py
+SCENARIO_SESSION_1000=${MOON_HOME}/tests/11_user_scalability/scenario/session_1000.py
+SCENARIO_SESSION_1500=${MOON_HOME}/tests/11_user_scalability/scenario/session_1500.py
mkdir -p ${RESULT_DIR} 2>/dev/null
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC}
-python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}
-
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_1_1.json" --write-html="${RESULT_DIR}/data_rbac_1_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_1_2.json" --write-html="${RESULT_DIR}/data_rbac_1_2.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_1_3.json" --write-html="${RESULT_DIR}/data_rbac_1_3.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_1_4.json" --write-html="${RESULT_DIR}/data_rbac_1_4.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_1_5.json" --write-html="${RESULT_DIR}/data_rbac_1_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_1_6.json" --write-html="${RESULT_DIR}/data_rbac_1_6.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_1_7.json" --write-html="${RESULT_DIR}/data_rbac_1_7.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_1_8.json" --write-html="${RESULT_DIR}/data_rbac_1_8.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_1_9.json" --write-html="${RESULT_DIR}/data_rbac_1_9.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_1_10.json" --write-html="${RESULT_DIR}/data_rbac_1_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_1_11.json" --write-html="${RESULT_DIR}/data_rbac_1_11.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_1_12.json" --write-html="${RESULT_DIR}/data_rbac_1_12.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_1_13.json" --write-html="${RESULT_DIR}/data_rbac_1_13.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_1_14.json" --write-html="${RESULT_DIR}/data_rbac_1_14.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_1_15.json" --write-html="${RESULT_DIR}/data_rbac_1_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_1_16.json" --write-html="${RESULT_DIR}/data_rbac_1_16.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_1_17.json" --write-html="${RESULT_DIR}/data_rbac_1_17.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_1_18.json" --write-html="${RESULT_DIR}/data_rbac_1_18.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_1_19.json" --write-html="${RESULT_DIR}/data_rbac_1_19.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_1_20.json" --write-html="${RESULT_DIR}/data_rbac_1_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 21 --write="${RESULT_DIR}/data_rbac_1_21.json" --write-html="${RESULT_DIR}/data_rbac_1_21.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 22 --write="${RESULT_DIR}/data_rbac_1_22.json" --write-html="${RESULT_DIR}/data_rbac_1_22.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 23 --write="${RESULT_DIR}/data_rbac_1_23.json" --write-html="${RESULT_DIR}/data_rbac_1_23.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 24 --write="${RESULT_DIR}/data_rbac_1_24.json" --write-html="${RESULT_DIR}/data_rbac_1_24.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_rbac_1_25.json" --write-html="${RESULT_DIR}/data_rbac_1_25.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 26 --write="${RESULT_DIR}/data_rbac_1_26.json" --write-html="${RESULT_DIR}/data_rbac_1_26.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 27 --write="${RESULT_DIR}/data_rbac_1_27.json" --write-html="${RESULT_DIR}/data_rbac_1_27.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 28 --write="${RESULT_DIR}/data_rbac_1_28.json" --write-html="${RESULT_DIR}/data_rbac_1_28.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 29 --write="${RESULT_DIR}/data_rbac_1_29.json" --write-html="${RESULT_DIR}/data_rbac_1_29.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 30 --write="${RESULT_DIR}/data_rbac_1_30.json" --write-html="${RESULT_DIR}/data_rbac_1_30.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 31 --write="${RESULT_DIR}/data_rbac_1_31.json" --write-html="${RESULT_DIR}/data_rbac_1_31.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 32 --write="${RESULT_DIR}/data_rbac_1_32.json" --write-html="${RESULT_DIR}/data_rbac_1_32.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 33 --write="${RESULT_DIR}/data_rbac_1_33.json" --write-html="${RESULT_DIR}/data_rbac_1_33.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 34 --write="${RESULT_DIR}/data_rbac_1_34.json" --write-html="${RESULT_DIR}/data_rbac_1_34.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 35 --write="${RESULT_DIR}/data_rbac_1_35.json" --write-html="${RESULT_DIR}/data_rbac_1_35.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 36 --write="${RESULT_DIR}/data_rbac_1_36.json" --write-html="${RESULT_DIR}/data_rbac_1_36.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 37 --write="${RESULT_DIR}/data_rbac_1_37.json" --write-html="${RESULT_DIR}/data_rbac_1_37.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 38 --write="${RESULT_DIR}/data_rbac_1_38.json" --write-html="${RESULT_DIR}/data_rbac_1_38.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 39 --write="${RESULT_DIR}/data_rbac_1_39.json" --write-html="${RESULT_DIR}/data_rbac_1_39.html" ${SCENARIO_RBAC}
-
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC2}
-python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION2}
-
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_2_1.json" --write-html="${RESULT_DIR}/data_rbac_2_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_2_2.json" --write-html="${RESULT_DIR}/data_rbac_2_2.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_2_3.json" --write-html="${RESULT_DIR}/data_rbac_2_3.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_2_4.json" --write-html="${RESULT_DIR}/data_rbac_2_4.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_2_5.json" --write-html="${RESULT_DIR}/data_rbac_2_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_2_6.json" --write-html="${RESULT_DIR}/data_rbac_2_6.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_2_7.json" --write-html="${RESULT_DIR}/data_rbac_2_7.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_2_8.json" --write-html="${RESULT_DIR}/data_rbac_2_8.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_2_9.json" --write-html="${RESULT_DIR}/data_rbac_2_9.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_2_10.json" --write-html="${RESULT_DIR}/data_rbac_2_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_2_11.json" --write-html="${RESULT_DIR}/data_rbac_2_11.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_2_12.json" --write-html="${RESULT_DIR}/data_rbac_2_12.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_2_13.json" --write-html="${RESULT_DIR}/data_rbac_2_13.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_2_14.json" --write-html="${RESULT_DIR}/data_rbac_2_14.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_2_15.json" --write-html="${RESULT_DIR}/data_rbac_2_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_2_16.json" --write-html="${RESULT_DIR}/data_rbac_2_16.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_2_17.json" --write-html="${RESULT_DIR}/data_rbac_2_17.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_2_18.json" --write-html="${RESULT_DIR}/data_rbac_2_18.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_2_19.json" --write-html="${RESULT_DIR}/data_rbac_2_19.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_2_20.json" --write-html="${RESULT_DIR}/data_rbac_2_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 21 --write="${RESULT_DIR}/data_rbac_2_21.json" --write-html="${RESULT_DIR}/data_rbac_2_21.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 22 --write="${RESULT_DIR}/data_rbac_2_22.json" --write-html="${RESULT_DIR}/data_rbac_2_22.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 23 --write="${RESULT_DIR}/data_rbac_2_23.json" --write-html="${RESULT_DIR}/data_rbac_2_23.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 24 --write="${RESULT_DIR}/data_rbac_2_24.json" --write-html="${RESULT_DIR}/data_rbac_2_24.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_rbac_2_25.json" --write-html="${RESULT_DIR}/data_rbac_2_25.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 26 --write="${RESULT_DIR}/data_rbac_2_26.json" --write-html="${RESULT_DIR}/data_rbac_2_26.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 27 --write="${RESULT_DIR}/data_rbac_2_27.json" --write-html="${RESULT_DIR}/data_rbac_2_27.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 28 --write="${RESULT_DIR}/data_rbac_2_28.json" --write-html="${RESULT_DIR}/data_rbac_2_28.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 29 --write="${RESULT_DIR}/data_rbac_2_29.json" --write-html="${RESULT_DIR}/data_rbac_2_29.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 30 --write="${RESULT_DIR}/data_rbac_2_30.json" --write-html="${RESULT_DIR}/data_rbac_2_30.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 31 --write="${RESULT_DIR}/data_rbac_2_31.json" --write-html="${RESULT_DIR}/data_rbac_2_31.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 32 --write="${RESULT_DIR}/data_rbac_2_32.json" --write-html="${RESULT_DIR}/data_rbac_2_32.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 33 --write="${RESULT_DIR}/data_rbac_2_33.json" --write-html="${RESULT_DIR}/data_rbac_2_33.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 34 --write="${RESULT_DIR}/data_rbac_2_34.json" --write-html="${RESULT_DIR}/data_rbac_2_34.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 35 --write="${RESULT_DIR}/data_rbac_2_35.json" --write-html="${RESULT_DIR}/data_rbac_2_35.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 36 --write="${RESULT_DIR}/data_rbac_2_36.json" --write-html="${RESULT_DIR}/data_rbac_2_36.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 37 --write="${RESULT_DIR}/data_rbac_2_37.json" --write-html="${RESULT_DIR}/data_rbac_2_37.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 38 --write="${RESULT_DIR}/data_rbac_2_38.json" --write-html="${RESULT_DIR}/data_rbac_2_38.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 39 --write="${RESULT_DIR}/data_rbac_2_39.json" --write-html="${RESULT_DIR}/data_rbac_2_39.html" ${SCENARIO_RBAC}
-
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC3}
-python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION3}
-
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_3_1.json" --write-html="${RESULT_DIR}/data_rbac_3_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_3_2.json" --write-html="${RESULT_DIR}/data_rbac_3_2.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_3_3.json" --write-html="${RESULT_DIR}/data_rbac_3_3.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_3_4.json" --write-html="${RESULT_DIR}/data_rbac_3_4.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_3_5.json" --write-html="${RESULT_DIR}/data_rbac_3_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_3_6.json" --write-html="${RESULT_DIR}/data_rbac_3_6.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_3_7.json" --write-html="${RESULT_DIR}/data_rbac_3_7.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_3_8.json" --write-html="${RESULT_DIR}/data_rbac_3_8.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_3_9.json" --write-html="${RESULT_DIR}/data_rbac_3_9.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_3_10.json" --write-html="${RESULT_DIR}/data_rbac_3_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_3_11.json" --write-html="${RESULT_DIR}/data_rbac_3_11.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_3_12.json" --write-html="${RESULT_DIR}/data_rbac_3_12.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_3_13.json" --write-html="${RESULT_DIR}/data_rbac_3_13.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_3_14.json" --write-html="${RESULT_DIR}/data_rbac_3_14.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_3_15.json" --write-html="${RESULT_DIR}/data_rbac_3_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_3_16.json" --write-html="${RESULT_DIR}/data_rbac_3_16.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_3_17.json" --write-html="${RESULT_DIR}/data_rbac_3_17.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_3_18.json" --write-html="${RESULT_DIR}/data_rbac_3_18.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_3_19.json" --write-html="${RESULT_DIR}/data_rbac_3_19.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_3_20.json" --write-html="${RESULT_DIR}/data_rbac_3_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 21 --write="${RESULT_DIR}/data_rbac_3_21.json" --write-html="${RESULT_DIR}/data_rbac_3_21.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 22 --write="${RESULT_DIR}/data_rbac_3_22.json" --write-html="${RESULT_DIR}/data_rbac_3_22.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 23 --write="${RESULT_DIR}/data_rbac_3_23.json" --write-html="${RESULT_DIR}/data_rbac_3_23.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 24 --write="${RESULT_DIR}/data_rbac_3_24.json" --write-html="${RESULT_DIR}/data_rbac_3_24.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_rbac_3_25.json" --write-html="${RESULT_DIR}/data_rbac_3_25.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 26 --write="${RESULT_DIR}/data_rbac_3_26.json" --write-html="${RESULT_DIR}/data_rbac_3_26.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 27 --write="${RESULT_DIR}/data_rbac_3_27.json" --write-html="${RESULT_DIR}/data_rbac_3_27.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 28 --write="${RESULT_DIR}/data_rbac_3_28.json" --write-html="${RESULT_DIR}/data_rbac_3_28.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 29 --write="${RESULT_DIR}/data_rbac_3_29.json" --write-html="${RESULT_DIR}/data_rbac_3_29.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 30 --write="${RESULT_DIR}/data_rbac_3_30.json" --write-html="${RESULT_DIR}/data_rbac_3_30.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 31 --write="${RESULT_DIR}/data_rbac_3_31.json" --write-html="${RESULT_DIR}/data_rbac_3_31.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 32 --write="${RESULT_DIR}/data_rbac_3_32.json" --write-html="${RESULT_DIR}/data_rbac_3_32.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 33 --write="${RESULT_DIR}/data_rbac_3_33.json" --write-html="${RESULT_DIR}/data_rbac_3_33.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 34 --write="${RESULT_DIR}/data_rbac_3_34.json" --write-html="${RESULT_DIR}/data_rbac_3_34.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 35 --write="${RESULT_DIR}/data_rbac_3_35.json" --write-html="${RESULT_DIR}/data_rbac_3_35.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 36 --write="${RESULT_DIR}/data_rbac_3_36.json" --write-html="${RESULT_DIR}/data_rbac_3_36.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 37 --write="${RESULT_DIR}/data_rbac_3_37.json" --write-html="${RESULT_DIR}/data_rbac_3_37.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 38 --write="${RESULT_DIR}/data_rbac_3_38.json" --write-html="${RESULT_DIR}/data_rbac_3_38.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 39 --write="${RESULT_DIR}/data_rbac_3_39.json" --write-html="${RESULT_DIR}/data_rbac_3_39.html" ${SCENARIO_RBAC}
-
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC4}
-python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION4}
-
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_4_1.json" --write-html="${RESULT_DIR}/data_rbac_4_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_4_2.json" --write-html="${RESULT_DIR}/data_rbac_4_2.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_4_3.json" --write-html="${RESULT_DIR}/data_rbac_4_3.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_4_4.json" --write-html="${RESULT_DIR}/data_rbac_4_4.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_4_5.json" --write-html="${RESULT_DIR}/data_rbac_4_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_4_6.json" --write-html="${RESULT_DIR}/data_rbac_4_6.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_4_7.json" --write-html="${RESULT_DIR}/data_rbac_4_7.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_4_8.json" --write-html="${RESULT_DIR}/data_rbac_4_8.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_4_9.json" --write-html="${RESULT_DIR}/data_rbac_4_9.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_4_10.json" --write-html="${RESULT_DIR}/data_rbac_4_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_4_11.json" --write-html="${RESULT_DIR}/data_rbac_4_11.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_4_12.json" --write-html="${RESULT_DIR}/data_rbac_4_12.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_4_13.json" --write-html="${RESULT_DIR}/data_rbac_4_13.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_4_14.json" --write-html="${RESULT_DIR}/data_rbac_4_14.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_4_15.json" --write-html="${RESULT_DIR}/data_rbac_4_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_4_16.json" --write-html="${RESULT_DIR}/data_rbac_4_16.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_4_17.json" --write-html="${RESULT_DIR}/data_rbac_4_17.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_4_18.json" --write-html="${RESULT_DIR}/data_rbac_4_18.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_4_19.json" --write-html="${RESULT_DIR}/data_rbac_4_19.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_4_20.json" --write-html="${RESULT_DIR}/data_rbac_4_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 21 --write="${RESULT_DIR}/data_rbac_4_21.json" --write-html="${RESULT_DIR}/data_rbac_4_21.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 22 --write="${RESULT_DIR}/data_rbac_4_22.json" --write-html="${RESULT_DIR}/data_rbac_4_22.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 23 --write="${RESULT_DIR}/data_rbac_4_23.json" --write-html="${RESULT_DIR}/data_rbac_4_23.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 24 --write="${RESULT_DIR}/data_rbac_4_24.json" --write-html="${RESULT_DIR}/data_rbac_4_24.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_rbac_4_25.json" --write-html="${RESULT_DIR}/data_rbac_4_25.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 26 --write="${RESULT_DIR}/data_rbac_4_26.json" --write-html="${RESULT_DIR}/data_rbac_4_26.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 27 --write="${RESULT_DIR}/data_rbac_4_27.json" --write-html="${RESULT_DIR}/data_rbac_4_27.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 28 --write="${RESULT_DIR}/data_rbac_4_28.json" --write-html="${RESULT_DIR}/data_rbac_4_28.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 29 --write="${RESULT_DIR}/data_rbac_4_29.json" --write-html="${RESULT_DIR}/data_rbac_4_29.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 30 --write="${RESULT_DIR}/data_rbac_4_30.json" --write-html="${RESULT_DIR}/data_rbac_4_30.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 31 --write="${RESULT_DIR}/data_rbac_4_31.json" --write-html="${RESULT_DIR}/data_rbac_4_31.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 32 --write="${RESULT_DIR}/data_rbac_4_32.json" --write-html="${RESULT_DIR}/data_rbac_4_32.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 33 --write="${RESULT_DIR}/data_rbac_4_33.json" --write-html="${RESULT_DIR}/data_rbac_4_33.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 34 --write="${RESULT_DIR}/data_rbac_4_34.json" --write-html="${RESULT_DIR}/data_rbac_4_34.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 35 --write="${RESULT_DIR}/data_rbac_4_35.json" --write-html="${RESULT_DIR}/data_rbac_4_35.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 36 --write="${RESULT_DIR}/data_rbac_4_36.json" --write-html="${RESULT_DIR}/data_rbac_4_36.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 37 --write="${RESULT_DIR}/data_rbac_4_37.json" --write-html="${RESULT_DIR}/data_rbac_4_37.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 38 --write="${RESULT_DIR}/data_rbac_4_38.json" --write-html="${RESULT_DIR}/data_rbac_4_38.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 39 --write="${RESULT_DIR}/data_rbac_4_39.json" --write-html="${RESULT_DIR}/data_rbac_4_39.html" ${SCENARIO_RBAC}
-
-python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC5}
-python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION5}
-
-python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_5_1.json" --write-html="${RESULT_DIR}/data_rbac_5_1.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_5_2.json" --write-html="${RESULT_DIR}/data_rbac_5_2.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_5_3.json" --write-html="${RESULT_DIR}/data_rbac_5_3.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_5_4.json" --write-html="${RESULT_DIR}/data_rbac_5_4.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_5_5.json" --write-html="${RESULT_DIR}/data_rbac_5_5.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_5_6.json" --write-html="${RESULT_DIR}/data_rbac_5_6.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_5_7.json" --write-html="${RESULT_DIR}/data_rbac_5_7.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_5_8.json" --write-html="${RESULT_DIR}/data_rbac_5_8.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_5_9.json" --write-html="${RESULT_DIR}/data_rbac_5_9.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_5_10.json" --write-html="${RESULT_DIR}/data_rbac_5_10.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_5_11.json" --write-html="${RESULT_DIR}/data_rbac_5_11.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_5_12.json" --write-html="${RESULT_DIR}/data_rbac_5_12.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_5_13.json" --write-html="${RESULT_DIR}/data_rbac_5_13.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_5_14.json" --write-html="${RESULT_DIR}/data_rbac_5_14.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_5_15.json" --write-html="${RESULT_DIR}/data_rbac_5_15.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_5_16.json" --write-html="${RESULT_DIR}/data_rbac_5_16.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_5_17.json" --write-html="${RESULT_DIR}/data_rbac_5_17.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_5_18.json" --write-html="${RESULT_DIR}/data_rbac_5_18.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_5_19.json" --write-html="${RESULT_DIR}/data_rbac_5_19.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_5_20.json" --write-html="${RESULT_DIR}/data_rbac_5_20.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 21 --write="${RESULT_DIR}/data_rbac_5_21.json" --write-html="${RESULT_DIR}/data_rbac_5_21.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 22 --write="${RESULT_DIR}/data_rbac_5_22.json" --write-html="${RESULT_DIR}/data_rbac_5_22.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 23 --write="${RESULT_DIR}/data_rbac_5_23.json" --write-html="${RESULT_DIR}/data_rbac_5_23.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 24 --write="${RESULT_DIR}/data_rbac_5_24.json" --write-html="${RESULT_DIR}/data_rbac_5_24.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_rbac_5_25.json" --write-html="${RESULT_DIR}/data_rbac_5_25.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 26 --write="${RESULT_DIR}/data_rbac_5_26.json" --write-html="${RESULT_DIR}/data_rbac_5_26.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 27 --write="${RESULT_DIR}/data_rbac_5_27.json" --write-html="${RESULT_DIR}/data_rbac_5_27.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 28 --write="${RESULT_DIR}/data_rbac_5_28.json" --write-html="${RESULT_DIR}/data_rbac_5_28.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 29 --write="${RESULT_DIR}/data_rbac_5_29.json" --write-html="${RESULT_DIR}/data_rbac_5_29.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 30 --write="${RESULT_DIR}/data_rbac_5_30.json" --write-html="${RESULT_DIR}/data_rbac_5_30.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 31 --write="${RESULT_DIR}/data_rbac_5_31.json" --write-html="${RESULT_DIR}/data_rbac_5_31.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 32 --write="${RESULT_DIR}/data_rbac_5_32.json" --write-html="${RESULT_DIR}/data_rbac_5_32.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 33 --write="${RESULT_DIR}/data_rbac_5_33.json" --write-html="${RESULT_DIR}/data_rbac_5_33.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 34 --write="${RESULT_DIR}/data_rbac_5_34.json" --write-html="${RESULT_DIR}/data_rbac_5_34.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 35 --write="${RESULT_DIR}/data_rbac_5_35.json" --write-html="${RESULT_DIR}/data_rbac_5_35.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 36 --write="${RESULT_DIR}/data_rbac_5_36.json" --write-html="${RESULT_DIR}/data_rbac_5_36.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 37 --write="${RESULT_DIR}/data_rbac_5_37.json" --write-html="${RESULT_DIR}/data_rbac_5_37.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 38 --write="${RESULT_DIR}/data_rbac_5_38.json" --write-html="${RESULT_DIR}/data_rbac_5_38.html" ${SCENARIO_RBAC}
-python3 ${TEST_SCRIPT} --request-per-second 39 --write="${RESULT_DIR}/data_rbac_5_39.json" --write-html="${RESULT_DIR}/data_rbac_5_39.html" ${SCENARIO_RBAC}
+NUMBER=10
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_10}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_10}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_10}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_10}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_10}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_10}
+echo "====================================================="
+
+NUMBER=20
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_20}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_20}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_20}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_20}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_20}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_20}
+echo "====================================================="
+
+NUMBER=30
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_30}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_30}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_30}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_30}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_30}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_30}
+echo "====================================================="
+
+NUMBER=40
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_40}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_40}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_40}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_40}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_40}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_40}
+echo "====================================================="
+
+NUMBER=50
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_50}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_50}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_50}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_50}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_50}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_50}
+echo "====================================================="
+
+NUMBER=100
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_100}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_100}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_100}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_100}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_100}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_100}
+echo "====================================================="
+
+NUMBER=250
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_250}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_250}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_250}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_250}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_250}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_250}
+echo "====================================================="
+
+NUMBER=500
+
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_500}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_500}
+echo "====================================================="
+
+NUMBER=750
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_750}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_750}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_750}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_750}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_750}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_750}
+echo "====================================================="
+
+NUMBER=1000
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_1000}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_1000}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_1000}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_1000}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_1000}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_1000}
+echo "====================================================="
+
+NUMBER=1500
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_1500}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_1500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_1500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_1500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_1500}
+echo "====================================================="
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_1500}
+echo "====================================================="
diff --git a/moonv4/tests/11_user_scalability/exec_rbac_1500.sh b/moonv4/tests/11_user_scalability/exec_rbac_1500.sh
new file mode 100644
index 00000000..270a8422
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/exec_rbac_1500.sh
@@ -0,0 +1,78 @@
+#!/usr/bin/env bash
+
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py --limit=100 --host=varuna"
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+RESULT_DIR=${MOON_HOME}/tests/11_user_scalability/results/1500
+
+SCENARIO_RBAC_10=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_10.py
+SCENARIO_RBAC_50=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_50.py
+SCENARIO_RBAC_100=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_100.py
+SCENARIO_RBAC_150=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_150.py
+SCENARIO_RBAC_200=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_200.py
+SCENARIO_RBAC_250=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_250.py
+SCENARIO_RBAC_300=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_300.py
+SCENARIO_RBAC_500=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_500.py
+SCENARIO_RBAC_750=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_750.py
+SCENARIO_RBAC_1000=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_1000.py
+SCENARIO_RBAC_1500=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_1500.py
+SCENARIO_RBAC_3000=${MOON_HOME}/tests/11_user_scalability/scenario/rbac_3000.py
+
+SCENARIO_SESSION_10=${MOON_HOME}/tests/11_user_scalability/scenario/session_10.py
+SCENARIO_SESSION_50=${MOON_HOME}/tests/11_user_scalability/scenario/session_50.py
+SCENARIO_SESSION_100=${MOON_HOME}/tests/11_user_scalability/scenario/session_100.py
+SCENARIO_SESSION_150=${MOON_HOME}/tests/11_user_scalability/scenario/session_150.py
+SCENARIO_SESSION_200=${MOON_HOME}/tests/11_user_scalability/scenario/session_200.py
+SCENARIO_SESSION_250=${MOON_HOME}/tests/11_user_scalability/scenario/session_250.py
+SCENARIO_SESSION_300=${MOON_HOME}/tests/11_user_scalability/scenario/session_300.py
+SCENARIO_SESSION_500=${MOON_HOME}/tests/11_user_scalability/scenario/session_500.py
+SCENARIO_SESSION_750=${MOON_HOME}/tests/11_user_scalability/scenario/session_750.py
+SCENARIO_SESSION_1000=${MOON_HOME}/tests/11_user_scalability/scenario/session_1000.py
+SCENARIO_SESSION_1500=${MOON_HOME}/tests/11_user_scalability/scenario/session_1500.py
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+
+NUMBER=3000
+
+python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC_3000}
+#python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION}_${NUMBER}
+
+python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_rbac_${NUMBER}_01.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_01.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_rbac_${NUMBER}_02.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_02.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_rbac_${NUMBER}_03.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_03.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_rbac_${NUMBER}_04.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_04.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_rbac_${NUMBER}_05.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_05.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 6 --write="${RESULT_DIR}/data_rbac_${NUMBER}_06.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_06.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 7 --write="${RESULT_DIR}/data_rbac_${NUMBER}_07.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_07.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 8 --write="${RESULT_DIR}/data_rbac_${NUMBER}_08.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_08.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 9 --write="${RESULT_DIR}/data_rbac_${NUMBER}_09.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_09.html" ${SCENARIO_RBAC_1500}
+python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_rbac_${NUMBER}_10.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_10.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 11 --write="${RESULT_DIR}/data_rbac_${NUMBER}_11.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_11.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 12 --write="${RESULT_DIR}/data_rbac_${NUMBER}_12.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_12.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 13 --write="${RESULT_DIR}/data_rbac_${NUMBER}_13.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_13.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 14 --write="${RESULT_DIR}/data_rbac_${NUMBER}_14.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_14.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_rbac_${NUMBER}_15.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_15.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 16 --write="${RESULT_DIR}/data_rbac_${NUMBER}_16.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_16.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 17 --write="${RESULT_DIR}/data_rbac_${NUMBER}_17.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_17.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 18 --write="${RESULT_DIR}/data_rbac_${NUMBER}_18.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_18.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 19 --write="${RESULT_DIR}/data_rbac_${NUMBER}_19.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_19.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_rbac_${NUMBER}_20.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_20.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 21 --write="${RESULT_DIR}/data_rbac_${NUMBER}_21.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_21.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 22 --write="${RESULT_DIR}/data_rbac_${NUMBER}_22.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_22.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 23 --write="${RESULT_DIR}/data_rbac_${NUMBER}_23.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_23.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 24 --write="${RESULT_DIR}/data_rbac_${NUMBER}_24.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_24.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_rbac_${NUMBER}_25.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_25.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 26 --write="${RESULT_DIR}/data_rbac_${NUMBER}_26.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_26.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 27 --write="${RESULT_DIR}/data_rbac_${NUMBER}_27.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_27.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 28 --write="${RESULT_DIR}/data_rbac_${NUMBER}_28.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_28.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 29 --write="${RESULT_DIR}/data_rbac_${NUMBER}_29.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_29.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 30 --write="${RESULT_DIR}/data_rbac_${NUMBER}_30.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_30.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 31 --write="${RESULT_DIR}/data_rbac_${NUMBER}_31.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_31.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 32 --write="${RESULT_DIR}/data_rbac_${NUMBER}_32.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_32.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 33 --write="${RESULT_DIR}/data_rbac_${NUMBER}_33.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_33.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 34 --write="${RESULT_DIR}/data_rbac_${NUMBER}_34.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_34.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 35 --write="${RESULT_DIR}/data_rbac_${NUMBER}_35.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_35.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 36 --write="${RESULT_DIR}/data_rbac_${NUMBER}_36.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_36.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 37 --write="${RESULT_DIR}/data_rbac_${NUMBER}_37.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_37.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 38 --write="${RESULT_DIR}/data_rbac_${NUMBER}_38.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_38.html" ${SCENARIO_RBAC_1500}
+#python3 ${TEST_SCRIPT} --request-per-second 39 --write="${RESULT_DIR}/data_rbac_${NUMBER}_39.json" --write-html="${RESULT_DIR}/data_rbac_${NUMBER}_39.html" ${SCENARIO_RBAC_1500}
+
diff --git a/moonv4/tests/11_user_scalability/plot.sh b/moonv4/tests/11_user_scalability/plot.sh
index 1eb120c6..e1601bfa 100644
--- a/moonv4/tests/11_user_scalability/plot.sh
+++ b/moonv4/tests/11_user_scalability/plot.sh
@@ -2,7 +2,7 @@
DIR=$1
-cd ${DIR}
+# cd ${DIR}
#JSON=data_1_1.json,data_1_5.json,data_1_10.json,data_1_15.json,data_1_20.json,data_1_25.json,data_2_1.json,data_2_5.json,data_2_10.json,data_2_15.json,data_2_20.json,data_2_25.json
#LEGEND="rbac 1 req/s,rbac 5 req/s,rbac 10 req/s,rbac 15 req/s,rbac 20 req/s,rbac 25 req/s,rbac+session 1 req/s,rbac+session 5 req/s,rbac+session 10 req/s,rbac+session 15 req/s,rbac+session 20 req/s,rbac+session 25 req/s"
@@ -10,11 +10,66 @@ cd ${DIR}
# --input="${JSON}" \
# --legend="${LEGEND}" \
# -d
-JSON=data_1_1.json,data_1_5.json,data_1_10.json,data_2_1.json,data_2_5.json,data_2_10.json
-LEGEND="rbac 1 req/s,rbac 5 req/s,rbac 10 req/s,rbac+session 1 req/s,rbac+session 5 req/s,rbac+session 10 req/s"
+
+cd results/01
+
+JSON=data_rbac_1_01.json,data_rbac_2_01.json,data_rbac_3_01.json,data_rbac_4_01.json,data_rbac_5_01.json
+LEGEND="10 users,20 users,30 users,40 users,50 users"
+python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
+ --legend="${LEGEND}" \
+ --plot-result="*" \
+ --write-html="rbac_10-50users_1reqs.html" \
+ digraph \
+ average \
+ "${JSON}"
+
+sleep 1
+
+JSON=data_rbac_1_10.json,data_rbac_2_10.json,data_rbac_3_10.json,data_rbac_4_10.json,data_rbac_5_10.json
+LEGEND="10 users,20 users,30 users,40 users,50 users"
+python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
+ --legend="${LEGEND}" \
+ --plot-result="*" \
+ --write-html="rbac_10-50users_10reqs.html" \
+ digraph \
+ average \
+ "${JSON}"
+
+sleep 1
+
+JSON=data_rbac_1_20.json,data_rbac_2_20.json,data_rbac_3_20.json,data_rbac_4_20.json,data_rbac_5_20.json
+LEGEND="10 users,20 users,30 users,40 users,50 users"
+python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
+ --legend="${LEGEND}" \
+ --plot-result="*" \
+ --write-html="rbac_20-50users_20reqs.html" \
+ digraph \
+ average \
+ "${JSON}"
+
+sleep 1
+
+JSON=data_rbac_1_30.json,data_rbac_2_30.json,data_rbac_3_30.json,data_rbac_4_30.json,data_rbac_5_30.json
+LEGEND="10 users,20 users,30 users,40 users,50 users"
+python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
+ --legend="${LEGEND}" \
+ --plot-result="*" \
+ --write-html="rbac_30-50users_30reqs.html" \
+ digraph \
+ average \
+ "${JSON}"
+
+sleep 1
+
+JSON=data_rbac_1_39.json,data_rbac_2_39.json,data_rbac_3_39.json,data_rbac_4_39.json,data_rbac_5_39.json
+LEGEND="10 users,20 users,30 users,40 users,50 users"
python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \
- --input="${JSON}" \
--legend="${LEGEND}" \
- -d
+ --plot-result="*" \
+ --write-html="rbac_39-50users_39reqs.html" \
+ digraph \
+ average \
+ "${JSON}"
+sleep 1
diff --git a/moonv4/tests/11_user_scalability/rbac_10.py b/moonv4/tests/11_user_scalability/rbac_10.py
deleted file mode 100644
index ef5dd9b2..00000000
--- a/moonv4/tests/11_user_scalability/rbac_10.py
+++ /dev/null
@@ -1,233 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
-}
-objects = {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
-}
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "*": ""
-}}
-object_data = {"id": {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
- "*": ""
-}}
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {
- "user0": ({"role": "employee"}, {"role": "*"}),
- "user1": ({"role": "employee"}, {"role": "*"}),
- "user2": ({"role": "dev1"}, {"role": "*"}),
- "user3": ({"role": "dev1"}, {"role": "*"}),
- "user4": ({"role": "dev1"}, {"role": "*"}),
- "user5": ({"role": "dev1"}, {"role": "*"}),
- "user6": ({"role": "dev2"}, {"role": "*"}),
- "user7": ({"role": "dev2"}, {"role": "*"}),
- "user8": ({"role": "dev2"}, {"role": "*"}),
- "user9": ({"role": "dev2"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0": ({"id": "vm0"}, {"id": "*"}),
- "vm1": ({"id": "vm1"}, {"id": "*"}),
- "vm2": ({"id": "vm2"}, {"id": "*"}),
- "vm3": ({"id": "vm3"}, {"id": "*"}),
- "vm4": ({"id": "vm4"}, {"id": "*"}),
- "vm5": ({"id": "vm5"}, {"id": "*"}),
- "vm6": ({"id": "vm6"}, {"id": "*"}),
- "vm7": ({"id": "vm7"}, {"id": "*"}),
- "vm8": ({"id": "vm8"}, {"id": "*"}),
- "vm9": ({"id": "vm9"}, {"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"},
- )
- },
- # Rules for grant all employee to do read actions to all VM except vm0
- {
- "rule": ("employee", "vm1", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm2", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm3", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm4", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm5", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm6", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm7", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm8", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm9", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev1 to do read actions to some VM
- {
- "rule": ("dev1", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev2 to do read actions to some VM
- {
- "rule": ("dev2", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/rbac_20.py b/moonv4/tests/11_user_scalability/rbac_20.py
deleted file mode 100644
index b1a72769..00000000
--- a/moonv4/tests/11_user_scalability/rbac_20.py
+++ /dev/null
@@ -1,371 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
-}
-objects = {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
-}
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-object_data = {"id": {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
- "*": ""
-}}
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {
- "user0": ({"role": "employee"}, {"role": "*"}),
- "user1": ({"role": "employee"}, {"role": "*"}),
- "user2": ({"role": "dev1"}, {"role": "*"}),
- "user3": ({"role": "dev1"}, {"role": "*"}),
- "user4": ({"role": "dev1"}, {"role": "*"}),
- "user5": ({"role": "dev1"}, {"role": "*"}),
- "user6": ({"role": "dev2"}, {"role": "*"}),
- "user7": ({"role": "dev2"}, {"role": "*"}),
- "user8": ({"role": "dev2"}, {"role": "*"}),
- "user9": ({"role": "dev2"}, {"role": "*"}),
- "user10": ({"role": "employee"}, {"role": "*"}),
- "user11": ({"role": "employee"}, {"role": "*"}),
- "user12": ({"role": "dev3"}, {"role": "*"}),
- "user13": ({"role": "dev3"}, {"role": "*"}),
- "user14": ({"role": "dev4"}, {"role": "*"}),
- "user15": ({"role": "dev4"}, {"role": "*"}),
- "user16": ({"role": "dev5"}, {"role": "*"}),
- "user17": ({"role": "dev6"}, {"role": "*"}),
- "user18": ({"role": "dev7"}, {"role": "*"}),
- "user19": ({"role": "dev8"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0": ({"id": "vm0"}, {"id": "*"}),
- "vm1": ({"id": "vm1"}, {"id": "*"}),
- "vm2": ({"id": "vm2"}, {"id": "*"}),
- "vm3": ({"id": "vm3"}, {"id": "*"}),
- "vm4": ({"id": "vm4"}, {"id": "*"}),
- "vm5": ({"id": "vm5"}, {"id": "*"}),
- "vm6": ({"id": "vm6"}, {"id": "*"}),
- "vm7": ({"id": "vm7"}, {"id": "*"}),
- "vm8": ({"id": "vm8"}, {"id": "*"}),
- "vm9": ({"id": "vm9"}, {"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"},
- )
- },
- # Rules for grant all employee to do read actions to all VM except vm0
- {
- "rule": ("employee", "vm1", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm2", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm3", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm4", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm5", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm6", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm7", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm8", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm9", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev1 to do read actions to some VM
- {
- "rule": ("dev1", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev2 to do read actions to some VM
- {
- "rule": ("dev2", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev3 to do read actions to some VM
- {
- "rule": ("dev3", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev4 to do read actions to some VM
- {
- "rule": ("dev4", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev5 to do read actions to some VM
- {
- "rule": ("dev5", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev6 to do read actions to some VM
- {
- "rule": ("dev6", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/rbac_30.py b/moonv4/tests/11_user_scalability/rbac_30.py
deleted file mode 100644
index 36b45def..00000000
--- a/moonv4/tests/11_user_scalability/rbac_30.py
+++ /dev/null
@@ -1,391 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
-}
-objects = {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
-}
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-object_data = {"id": {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
- "*": ""
-}}
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {
- "user0": ({"role": "employee"}, {"role": "*"}),
- "user1": ({"role": "employee"}, {"role": "*"}),
- "user2": ({"role": "dev1"}, {"role": "*"}),
- "user3": ({"role": "dev1"}, {"role": "*"}),
- "user4": ({"role": "dev1"}, {"role": "*"}),
- "user5": ({"role": "dev1"}, {"role": "*"}),
- "user6": ({"role": "dev2"}, {"role": "*"}),
- "user7": ({"role": "dev2"}, {"role": "*"}),
- "user8": ({"role": "dev2"}, {"role": "*"}),
- "user9": ({"role": "dev2"}, {"role": "*"}),
- "user10": ({"role": "employee"}, {"role": "*"}),
- "user11": ({"role": "employee"}, {"role": "*"}),
- "user12": ({"role": "dev3"}, {"role": "*"}),
- "user13": ({"role": "dev3"}, {"role": "*"}),
- "user14": ({"role": "dev4"}, {"role": "*"}),
- "user15": ({"role": "dev4"}, {"role": "*"}),
- "user16": ({"role": "dev5"}, {"role": "*"}),
- "user17": ({"role": "dev6"}, {"role": "*"}),
- "user18": ({"role": "dev7"}, {"role": "*"}),
- "user19": ({"role": "dev8"}, {"role": "*"}),
- "user20": ({"role": "employee"}, {"role": "*"}),
- "user21": ({"role": "employee"}, {"role": "*"}),
- "user22": ({"role": "dev3"}, {"role": "*"}),
- "user23": ({"role": "dev3"}, {"role": "*"}),
- "user24": ({"role": "dev4"}, {"role": "*"}),
- "user25": ({"role": "dev4"}, {"role": "*"}),
- "user26": ({"role": "dev5"}, {"role": "*"}),
- "user27": ({"role": "dev6"}, {"role": "*"}),
- "user28": ({"role": "dev7"}, {"role": "*"}),
- "user29": ({"role": "dev8"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0": ({"id": "vm0"}, {"id": "*"}),
- "vm1": ({"id": "vm1"}, {"id": "*"}),
- "vm2": ({"id": "vm2"}, {"id": "*"}),
- "vm3": ({"id": "vm3"}, {"id": "*"}),
- "vm4": ({"id": "vm4"}, {"id": "*"}),
- "vm5": ({"id": "vm5"}, {"id": "*"}),
- "vm6": ({"id": "vm6"}, {"id": "*"}),
- "vm7": ({"id": "vm7"}, {"id": "*"}),
- "vm8": ({"id": "vm8"}, {"id": "*"}),
- "vm9": ({"id": "vm9"}, {"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"},
- )
- },
- # Rules for grant all employee to do read actions to all VM except vm0
- {
- "rule": ("employee", "vm1", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm2", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm3", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm4", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm5", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm6", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm7", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm8", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm9", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev1 to do read actions to some VM
- {
- "rule": ("dev1", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev2 to do read actions to some VM
- {
- "rule": ("dev2", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev3 to do read actions to some VM
- {
- "rule": ("dev3", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev4 to do read actions to some VM
- {
- "rule": ("dev4", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev5 to do read actions to some VM
- {
- "rule": ("dev5", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev6 to do read actions to some VM
- {
- "rule": ("dev6", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/rbac_40.py b/moonv4/tests/11_user_scalability/rbac_40.py
deleted file mode 100644
index aa50b309..00000000
--- a/moonv4/tests/11_user_scalability/rbac_40.py
+++ /dev/null
@@ -1,411 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
- "user30": "",
- "user31": "",
- "user32": "",
- "user33": "",
- "user34": "",
- "user35": "",
- "user36": "",
- "user37": "",
- "user38": "",
- "user39": "",
-}
-objects = {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
-}
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-object_data = {"id": {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
- "*": ""
-}}
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {
- "user0": ({"role": "employee"}, {"role": "*"}),
- "user1": ({"role": "employee"}, {"role": "*"}),
- "user2": ({"role": "dev1"}, {"role": "*"}),
- "user3": ({"role": "dev1"}, {"role": "*"}),
- "user4": ({"role": "dev1"}, {"role": "*"}),
- "user5": ({"role": "dev1"}, {"role": "*"}),
- "user6": ({"role": "dev2"}, {"role": "*"}),
- "user7": ({"role": "dev2"}, {"role": "*"}),
- "user8": ({"role": "dev2"}, {"role": "*"}),
- "user9": ({"role": "dev2"}, {"role": "*"}),
- "user10": ({"role": "employee"}, {"role": "*"}),
- "user11": ({"role": "employee"}, {"role": "*"}),
- "user12": ({"role": "dev3"}, {"role": "*"}),
- "user13": ({"role": "dev3"}, {"role": "*"}),
- "user14": ({"role": "dev4"}, {"role": "*"}),
- "user15": ({"role": "dev4"}, {"role": "*"}),
- "user16": ({"role": "dev5"}, {"role": "*"}),
- "user17": ({"role": "dev6"}, {"role": "*"}),
- "user18": ({"role": "dev7"}, {"role": "*"}),
- "user19": ({"role": "dev8"}, {"role": "*"}),
- "user20": ({"role": "employee"}, {"role": "*"}),
- "user21": ({"role": "employee"}, {"role": "*"}),
- "user22": ({"role": "dev3"}, {"role": "*"}),
- "user23": ({"role": "dev3"}, {"role": "*"}),
- "user24": ({"role": "dev4"}, {"role": "*"}),
- "user25": ({"role": "dev4"}, {"role": "*"}),
- "user26": ({"role": "dev5"}, {"role": "*"}),
- "user27": ({"role": "dev6"}, {"role": "*"}),
- "user28": ({"role": "dev7"}, {"role": "*"}),
- "user29": ({"role": "dev8"}, {"role": "*"}),
- "user30": ({"role": "employee"}, {"role": "*"}),
- "user31": ({"role": "employee"}, {"role": "*"}),
- "user32": ({"role": "dev3"}, {"role": "*"}),
- "user33": ({"role": "dev3"}, {"role": "*"}),
- "user34": ({"role": "dev4"}, {"role": "*"}),
- "user35": ({"role": "dev4"}, {"role": "*"}),
- "user36": ({"role": "dev5"}, {"role": "*"}),
- "user37": ({"role": "dev6"}, {"role": "*"}),
- "user38": ({"role": "dev7"}, {"role": "*"}),
- "user39": ({"role": "dev8"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0": ({"id": "vm0"}, {"id": "*"}),
- "vm1": ({"id": "vm1"}, {"id": "*"}),
- "vm2": ({"id": "vm2"}, {"id": "*"}),
- "vm3": ({"id": "vm3"}, {"id": "*"}),
- "vm4": ({"id": "vm4"}, {"id": "*"}),
- "vm5": ({"id": "vm5"}, {"id": "*"}),
- "vm6": ({"id": "vm6"}, {"id": "*"}),
- "vm7": ({"id": "vm7"}, {"id": "*"}),
- "vm8": ({"id": "vm8"}, {"id": "*"}),
- "vm9": ({"id": "vm9"}, {"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"},
- )
- },
- # Rules for grant all employee to do read actions to all VM except vm0
- {
- "rule": ("employee", "vm1", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm2", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm3", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm4", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm5", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm6", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm7", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm8", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm9", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev1 to do read actions to some VM
- {
- "rule": ("dev1", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev2 to do read actions to some VM
- {
- "rule": ("dev2", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev3 to do read actions to some VM
- {
- "rule": ("dev3", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev4 to do read actions to some VM
- {
- "rule": ("dev4", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev5 to do read actions to some VM
- {
- "rule": ("dev5", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev6 to do read actions to some VM
- {
- "rule": ("dev6", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/rbac_50.py b/moonv4/tests/11_user_scalability/rbac_50.py
deleted file mode 100644
index 6aa00073..00000000
--- a/moonv4/tests/11_user_scalability/rbac_50.py
+++ /dev/null
@@ -1,431 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
- "user30": "",
- "user31": "",
- "user32": "",
- "user33": "",
- "user34": "",
- "user35": "",
- "user36": "",
- "user37": "",
- "user38": "",
- "user39": "",
- "user40": "",
- "user41": "",
- "user42": "",
- "user43": "",
- "user44": "",
- "user45": "",
- "user46": "",
- "user47": "",
- "user48": "",
- "user49": "",
-}
-objects = {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
-}
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-object_data = {"id": {
- "vm0": "",
- "vm1": "",
- "vm2": "",
- "vm3": "",
- "vm4": "",
- "vm5": "",
- "vm6": "",
- "vm7": "",
- "vm8": "",
- "vm9": "",
- "*": ""
-}}
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {
- "user0": ({"role": "employee"}, {"role": "*"}),
- "user1": ({"role": "employee"}, {"role": "*"}),
- "user2": ({"role": "dev1"}, {"role": "*"}),
- "user3": ({"role": "dev1"}, {"role": "*"}),
- "user4": ({"role": "dev1"}, {"role": "*"}),
- "user5": ({"role": "dev1"}, {"role": "*"}),
- "user6": ({"role": "dev2"}, {"role": "*"}),
- "user7": ({"role": "dev2"}, {"role": "*"}),
- "user8": ({"role": "dev2"}, {"role": "*"}),
- "user9": ({"role": "dev2"}, {"role": "*"}),
- "user10": ({"role": "employee"}, {"role": "*"}),
- "user11": ({"role": "employee"}, {"role": "*"}),
- "user12": ({"role": "dev3"}, {"role": "*"}),
- "user13": ({"role": "dev3"}, {"role": "*"}),
- "user14": ({"role": "dev4"}, {"role": "*"}),
- "user15": ({"role": "dev4"}, {"role": "*"}),
- "user16": ({"role": "dev5"}, {"role": "*"}),
- "user17": ({"role": "dev6"}, {"role": "*"}),
- "user18": ({"role": "dev7"}, {"role": "*"}),
- "user19": ({"role": "dev8"}, {"role": "*"}),
- "user20": ({"role": "employee"}, {"role": "*"}),
- "user21": ({"role": "employee"}, {"role": "*"}),
- "user22": ({"role": "dev3"}, {"role": "*"}),
- "user23": ({"role": "dev3"}, {"role": "*"}),
- "user24": ({"role": "dev4"}, {"role": "*"}),
- "user25": ({"role": "dev4"}, {"role": "*"}),
- "user26": ({"role": "dev5"}, {"role": "*"}),
- "user27": ({"role": "dev6"}, {"role": "*"}),
- "user28": ({"role": "dev7"}, {"role": "*"}),
- "user29": ({"role": "dev8"}, {"role": "*"}),
- "user30": ({"role": "employee"}, {"role": "*"}),
- "user31": ({"role": "employee"}, {"role": "*"}),
- "user32": ({"role": "dev3"}, {"role": "*"}),
- "user33": ({"role": "dev3"}, {"role": "*"}),
- "user34": ({"role": "dev4"}, {"role": "*"}),
- "user35": ({"role": "dev4"}, {"role": "*"}),
- "user36": ({"role": "dev5"}, {"role": "*"}),
- "user37": ({"role": "dev6"}, {"role": "*"}),
- "user38": ({"role": "dev7"}, {"role": "*"}),
- "user39": ({"role": "dev8"}, {"role": "*"}),
- "user40": ({"role": "employee"}, {"role": "*"}),
- "user41": ({"role": "employee"}, {"role": "*"}),
- "user42": ({"role": "dev3"}, {"role": "*"}),
- "user43": ({"role": "dev3"}, {"role": "*"}),
- "user44": ({"role": "dev4"}, {"role": "*"}),
- "user45": ({"role": "dev4"}, {"role": "*"}),
- "user46": ({"role": "dev5"}, {"role": "*"}),
- "user47": ({"role": "dev6"}, {"role": "*"}),
- "user48": ({"role": "dev7"}, {"role": "*"}),
- "user49": ({"role": "dev8"}, {"role": "*"}),
-}
-object_assignments = {
- "vm0": ({"id": "vm0"}, {"id": "*"}),
- "vm1": ({"id": "vm1"}, {"id": "*"}),
- "vm2": ({"id": "vm2"}, {"id": "*"}),
- "vm3": ({"id": "vm3"}, {"id": "*"}),
- "vm4": ({"id": "vm4"}, {"id": "*"}),
- "vm5": ({"id": "vm5"}, {"id": "*"}),
- "vm6": ({"id": "vm6"}, {"id": "*"}),
- "vm7": ({"id": "vm7"}, {"id": "*"}),
- "vm8": ({"id": "vm8"}, {"id": "*"}),
- "vm9": ({"id": "vm9"}, {"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"},
- )
- },
- # Rules for grant all employee to do read actions to all VM except vm0
- {
- "rule": ("employee", "vm1", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm2", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm3", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm4", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm5", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm6", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm7", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm8", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("employee", "vm9", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev1 to do read actions to some VM
- {
- "rule": ("dev1", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev1", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev2 to do read actions to some VM
- {
- "rule": ("dev2", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev2", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev3 to do read actions to some VM
- {
- "rule": ("dev3", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev3", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev4 to do read actions to some VM
- {
- "rule": ("dev4", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev4", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev5 to do read actions to some VM
- {
- "rule": ("dev5", "vm1", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm2", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm3", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev5", "vm4", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- # Rules for grant all dev6 to do read actions to some VM
- {
- "rule": ("dev6", "vm5", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm6", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm7", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm8", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("dev6", "vm9", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/scenario/rbac_10.py b/moonv4/tests/11_user_scalability/scenario/rbac_10.py
new file mode 100644
index 00000000..d764b715
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_10.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..7197e2d0
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_100.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..fb136f39
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_1000.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..3221db07
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_150.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..f6b298d0
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_1500.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..6f6e15d1
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_20.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..3e355d3f
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_200.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..614fbf52
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_250.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..7f663060
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_30.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..4413da67
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_300.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..f51b78c4
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_3000.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..4503217b
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_40.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..01b13005
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_50.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..5ad2959f
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_500.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..3fb509d6
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/rbac_750.py
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..c119ba08
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_10.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..fa4e29d5
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_100.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..71c892a7
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_1000.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..b15fd8d2
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_150.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..8282d9f3
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_1500.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..08a25b0d
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_200.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..b007d067
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_250.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..bf894ec1
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_300.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..e6e91b39
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_50.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..34346323
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_500.py
@@ -0,0 +1,69 @@
+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
new file mode 100644
index 00000000..1a5aef28
--- /dev/null
+++ b/moonv4/tests/11_user_scalability/scenario/session_750.py
@@ -0,0 +1,69 @@
+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
+ )
+ })
diff --git a/moonv4/tests/11_user_scalability/session_10.py b/moonv4/tests/11_user_scalability/session_10.py
deleted file mode 100644
index 5b4a64b6..00000000
--- a/moonv4/tests/11_user_scalability/session_10.py
+++ /dev/null
@@ -1,389 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
-}
-objects = {"admin": "", "employee": "", "dev1": "", "dev2": "", }
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
-}}
-object_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "*": ""
-}}
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {
- "user0": ({"subjectid": "user0"}, ),
- "user1": ({"subjectid": "user1"}, ),
- "user2": ({"subjectid": "user2"}, ),
- "user3": ({"subjectid": "user3"}, ),
- "user4": ({"subjectid": "user4"}, ),
- "user5": ({"subjectid": "user5"}, ),
- "user6": ({"subjectid": "user6"}, ),
- "user7": ({"subjectid": "user7"}, ),
- "user8": ({"subjectid": "user8"}, ),
- "user9": ({"subjectid": "user9"}, ),
-}
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"}),
- "employee": ({"role": "employee"}, {"role": "*"}),
- "dev1": ({"role": "employee"}, {"role": "dev1"}, {"role": "*"}),
- "dev2": ({"role": "employee"}, {"role": "dev2"}, {"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": (
- {
- "rule": ("user0", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user1", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user2", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev2", "*"),
- "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/session_20.py b/moonv4/tests/11_user_scalability/session_20.py
deleted file mode 100644
index d548f29e..00000000
--- a/moonv4/tests/11_user_scalability/session_20.py
+++ /dev/null
@@ -1,744 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
-}
-objects = {"admin": "", "employee": "", "dev1": "", "dev3": "",
- "dev4": "", "dev5": "", "dev6": "", "dev7": "", "dev8": ""}
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
-}}
-object_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {
- "user0": ({"subjectid": "user0"}, ),
- "user1": ({"subjectid": "user1"}, ),
- "user2": ({"subjectid": "user2"}, ),
- "user3": ({"subjectid": "user3"}, ),
- "user4": ({"subjectid": "user4"}, ),
- "user5": ({"subjectid": "user5"}, ),
- "user6": ({"subjectid": "user6"}, ),
- "user7": ({"subjectid": "user7"}, ),
- "user8": ({"subjectid": "user8"}, ),
- "user9": ({"subjectid": "user9"}, ),
- "user10": ({"subjectid": "user10"}, ),
- "user11": ({"subjectid": "user11"}, ),
- "user12": ({"subjectid": "user12"}, ),
- "user13": ({"subjectid": "user13"}, ),
- "user14": ({"subjectid": "user14"}, ),
- "user15": ({"subjectid": "user15"}, ),
- "user16": ({"subjectid": "user16"}, ),
- "user17": ({"subjectid": "user17"}, ),
- "user18": ({"subjectid": "user18"}, ),
- "user19": ({"subjectid": "user19"}, ),
-}
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"}),
- "employee": ({"role": "employee"}, {"role": "*"}),
- "dev1": ({"role": "employee"}, {"role": "dev1"}, {"role": "*"}),
- "dev2": ({"role": "employee"}, {"role": "dev2"}, {"role": "*"}),
- "dev3": ({"role": "employee"}, {"role": "dev3"}, {"role": "*"}),
- "dev4": ({"role": "employee"}, {"role": "dev4"}, {"role": "*"}),
- "dev5": ({"role": "employee"}, {"role": "dev5"}, {"role": "*"}),
- "dev6": ({"role": "employee"}, {"role": "dev6"}, {"role": "*"}),
- "dev7": ({"role": "employee"}, {"role": "dev7"}, {"role": "*"}),
- "dev8": ({"role": "employee"}, {"role": "dev8"}, {"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": (
- {
- "rule": ("user0", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user1", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user2", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user10", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user11", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/session_30.py b/moonv4/tests/11_user_scalability/session_30.py
deleted file mode 100644
index 9b1e68bc..00000000
--- a/moonv4/tests/11_user_scalability/session_30.py
+++ /dev/null
@@ -1,1086 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
-}
-objects = {"admin": "", "employee": "", "dev1": "", "dev3": "",
- "dev4": "", "dev5": "", "dev6": "", "dev7": "", "dev8": ""}
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
-}}
-object_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {
- "user0": ({"subjectid": "user0"}, ),
- "user1": ({"subjectid": "user1"}, ),
- "user2": ({"subjectid": "user2"}, ),
- "user3": ({"subjectid": "user3"}, ),
- "user4": ({"subjectid": "user4"}, ),
- "user5": ({"subjectid": "user5"}, ),
- "user6": ({"subjectid": "user6"}, ),
- "user7": ({"subjectid": "user7"}, ),
- "user8": ({"subjectid": "user8"}, ),
- "user9": ({"subjectid": "user9"}, ),
- "user10": ({"subjectid": "user10"}, ),
- "user11": ({"subjectid": "user11"}, ),
- "user12": ({"subjectid": "user12"}, ),
- "user13": ({"subjectid": "user13"}, ),
- "user14": ({"subjectid": "user14"}, ),
- "user15": ({"subjectid": "user15"}, ),
- "user16": ({"subjectid": "user16"}, ),
- "user17": ({"subjectid": "user17"}, ),
- "user18": ({"subjectid": "user18"}, ),
- "user19": ({"subjectid": "user19"}, ),
- "user20": ({"subjectid": "user20"}, ),
- "user21": ({"subjectid": "user21"}, ),
- "user22": ({"subjectid": "user22"}, ),
- "user23": ({"subjectid": "user23"}, ),
- "user24": ({"subjectid": "user24"}, ),
- "user25": ({"subjectid": "user25"}, ),
- "user26": ({"subjectid": "user26"}, ),
- "user27": ({"subjectid": "user27"}, ),
- "user28": ({"subjectid": "user28"}, ),
- "user29": ({"subjectid": "user29"}, ),
-}
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"}),
- "employee": ({"role": "employee"}, {"role": "*"}),
- "dev1": ({"role": "employee"}, {"role": "dev1"}, {"role": "*"}),
- "dev2": ({"role": "employee"}, {"role": "dev2"}, {"role": "*"}),
- "dev3": ({"role": "employee"}, {"role": "dev3"}, {"role": "*"}),
- "dev4": ({"role": "employee"}, {"role": "dev4"}, {"role": "*"}),
- "dev5": ({"role": "employee"}, {"role": "dev5"}, {"role": "*"}),
- "dev6": ({"role": "employee"}, {"role": "dev6"}, {"role": "*"}),
- "dev7": ({"role": "employee"}, {"role": "dev7"}, {"role": "*"}),
- "dev8": ({"role": "employee"}, {"role": "dev8"}, {"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": (
- {
- "rule": ("user0", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user1", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user2", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user10", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user11", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user20", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user21", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/session_40.py b/moonv4/tests/11_user_scalability/session_40.py
deleted file mode 100644
index 95d2afe0..00000000
--- a/moonv4/tests/11_user_scalability/session_40.py
+++ /dev/null
@@ -1,1428 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
- "user30": "",
- "user31": "",
- "user32": "",
- "user33": "",
- "user34": "",
- "user35": "",
- "user36": "",
- "user37": "",
- "user38": "",
- "user39": "",
-}
-objects = {"admin": "", "employee": "", "dev1": "", "dev3": "",
- "dev4": "", "dev5": "", "dev6": "", "dev7": "", "dev8": ""}
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
- "user30": "",
- "user31": "",
- "user32": "",
- "user33": "",
- "user34": "",
- "user35": "",
- "user36": "",
- "user37": "",
- "user38": "",
- "user39": "",
-}}
-object_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {
- "user0": ({"subjectid": "user0"}, ),
- "user1": ({"subjectid": "user1"}, ),
- "user2": ({"subjectid": "user2"}, ),
- "user3": ({"subjectid": "user3"}, ),
- "user4": ({"subjectid": "user4"}, ),
- "user5": ({"subjectid": "user5"}, ),
- "user6": ({"subjectid": "user6"}, ),
- "user7": ({"subjectid": "user7"}, ),
- "user8": ({"subjectid": "user8"}, ),
- "user9": ({"subjectid": "user9"}, ),
- "user10": ({"subjectid": "user10"}, ),
- "user11": ({"subjectid": "user11"}, ),
- "user12": ({"subjectid": "user12"}, ),
- "user13": ({"subjectid": "user13"}, ),
- "user14": ({"subjectid": "user14"}, ),
- "user15": ({"subjectid": "user15"}, ),
- "user16": ({"subjectid": "user16"}, ),
- "user17": ({"subjectid": "user17"}, ),
- "user18": ({"subjectid": "user18"}, ),
- "user19": ({"subjectid": "user19"}, ),
- "user20": ({"subjectid": "user20"},),
- "user21": ({"subjectid": "user21"},),
- "user22": ({"subjectid": "user22"},),
- "user23": ({"subjectid": "user23"},),
- "user24": ({"subjectid": "user24"},),
- "user25": ({"subjectid": "user25"},),
- "user26": ({"subjectid": "user26"},),
- "user27": ({"subjectid": "user27"},),
- "user28": ({"subjectid": "user28"},),
- "user29": ({"subjectid": "user29"},),
- "user30": ({"subjectid": "user30"},),
- "user31": ({"subjectid": "user31"},),
- "user32": ({"subjectid": "user32"},),
- "user33": ({"subjectid": "user33"},),
- "user34": ({"subjectid": "user34"},),
- "user35": ({"subjectid": "user35"},),
- "user36": ({"subjectid": "user36"},),
- "user37": ({"subjectid": "user37"},),
- "user38": ({"subjectid": "user38"},),
- "user39": ({"subjectid": "user39"},),
-}
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"}),
- "employee": ({"role": "employee"}, {"role": "*"}),
- "dev1": ({"role": "employee"}, {"role": "dev1"}, {"role": "*"}),
- "dev2": ({"role": "employee"}, {"role": "dev2"}, {"role": "*"}),
- "dev3": ({"role": "employee"}, {"role": "dev3"}, {"role": "*"}),
- "dev4": ({"role": "employee"}, {"role": "dev4"}, {"role": "*"}),
- "dev5": ({"role": "employee"}, {"role": "dev5"}, {"role": "*"}),
- "dev6": ({"role": "employee"}, {"role": "dev6"}, {"role": "*"}),
- "dev7": ({"role": "employee"}, {"role": "dev7"}, {"role": "*"}),
- "dev8": ({"role": "employee"}, {"role": "dev8"}, {"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": (
- {
- "rule": ("user0", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user1", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user2", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user10", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user11", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user20", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user21", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user30", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user31", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user32", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user32", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user32", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user33", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user33", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user33", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user34", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user34", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user34", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user35", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user35", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user35", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user36", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user36", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user36", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user37", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user37", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user37", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user38", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user38", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user38", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user39", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user39", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user39", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/11_user_scalability/session_50.py b/moonv4/tests/11_user_scalability/session_50.py
deleted file mode 100644
index e4c7967b..00000000
--- a/moonv4/tests/11_user_scalability/session_50.py
+++ /dev/null
@@ -1,1770 +0,0 @@
-
-pdp_name = "pdp1"
-policy_name = "Session policy example"
-model_name = "Session"
-policy_genre = "session"
-
-subjects = {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
- "user30": "",
- "user31": "",
- "user32": "",
- "user33": "",
- "user34": "",
- "user35": "",
- "user36": "",
- "user37": "",
- "user38": "",
- "user39": "",
- "user40": "",
- "user41": "",
- "user42": "",
- "user43": "",
- "user44": "",
- "user45": "",
- "user46": "",
- "user47": "",
- "user48": "",
- "user49": "",
-}
-objects = {"admin": "", "employee": "", "dev1": "", "dev3": "",
- "dev4": "", "dev5": "", "dev6": "", "dev7": "", "dev8": ""}
-actions = {"activate": "", "deactivate": ""}
-
-subject_categories = {"subjectid": "", }
-object_categories = {"role": "", }
-action_categories = {"session-action": "", }
-
-subject_data = {"subjectid": {
- "user0": "",
- "user1": "",
- "user2": "",
- "user3": "",
- "user4": "",
- "user5": "",
- "user6": "",
- "user7": "",
- "user8": "",
- "user9": "",
- "user10": "",
- "user11": "",
- "user12": "",
- "user13": "",
- "user14": "",
- "user15": "",
- "user16": "",
- "user17": "",
- "user18": "",
- "user19": "",
- "user20": "",
- "user21": "",
- "user22": "",
- "user23": "",
- "user24": "",
- "user25": "",
- "user26": "",
- "user27": "",
- "user28": "",
- "user29": "",
- "user30": "",
- "user31": "",
- "user32": "",
- "user33": "",
- "user34": "",
- "user35": "",
- "user36": "",
- "user37": "",
- "user38": "",
- "user39": "",
- "user40": "",
- "user41": "",
- "user42": "",
- "user43": "",
- "user44": "",
- "user45": "",
- "user46": "",
- "user47": "",
- "user48": "",
- "user49": "",
-}}
-object_data = {"role": {
- "admin": "",
- "employee": "",
- "dev1": "",
- "dev2": "",
- "dev3": "",
- "dev4": "",
- "dev5": "",
- "dev6": "",
- "dev7": "",
- "dev8": "",
- "*": ""
-}}
-action_data = {"session-action": {"activate": "", "deactivate": "", "*": ""}}
-
-subject_assignments = {
- "user0": ({"subjectid": "user0"}, ),
- "user1": ({"subjectid": "user1"}, ),
- "user2": ({"subjectid": "user2"}, ),
- "user3": ({"subjectid": "user3"}, ),
- "user4": ({"subjectid": "user4"}, ),
- "user5": ({"subjectid": "user5"}, ),
- "user6": ({"subjectid": "user6"}, ),
- "user7": ({"subjectid": "user7"}, ),
- "user8": ({"subjectid": "user8"}, ),
- "user9": ({"subjectid": "user9"}, ),
- "user10": ({"subjectid": "user10"}, ),
- "user11": ({"subjectid": "user11"}, ),
- "user12": ({"subjectid": "user12"}, ),
- "user13": ({"subjectid": "user13"}, ),
- "user14": ({"subjectid": "user14"}, ),
- "user15": ({"subjectid": "user15"}, ),
- "user16": ({"subjectid": "user16"}, ),
- "user17": ({"subjectid": "user17"}, ),
- "user18": ({"subjectid": "user18"}, ),
- "user19": ({"subjectid": "user19"}, ),
- "user20": ({"subjectid": "user20"}, ),
- "user21": ({"subjectid": "user21"}, ),
- "user22": ({"subjectid": "user22"}, ),
- "user23": ({"subjectid": "user23"}, ),
- "user24": ({"subjectid": "user24"}, ),
- "user25": ({"subjectid": "user25"}, ),
- "user26": ({"subjectid": "user26"}, ),
- "user27": ({"subjectid": "user27"}, ),
- "user28": ({"subjectid": "user28"}, ),
- "user29": ({"subjectid": "user29"}, ),
- "user30": ({"subjectid": "user30"}, ),
- "user31": ({"subjectid": "user31"}, ),
- "user32": ({"subjectid": "user32"}, ),
- "user33": ({"subjectid": "user33"}, ),
- "user34": ({"subjectid": "user34"}, ),
- "user35": ({"subjectid": "user35"}, ),
- "user36": ({"subjectid": "user36"}, ),
- "user37": ({"subjectid": "user37"}, ),
- "user38": ({"subjectid": "user38"}, ),
- "user39": ({"subjectid": "user39"}, ),
- "user40": ({"subjectid": "user40"}, ),
- "user41": ({"subjectid": "user41"}, ),
- "user42": ({"subjectid": "user42"}, ),
- "user43": ({"subjectid": "user43"}, ),
- "user44": ({"subjectid": "user44"}, ),
- "user45": ({"subjectid": "user45"}, ),
- "user46": ({"subjectid": "user46"}, ),
- "user47": ({"subjectid": "user47"}, ),
- "user48": ({"subjectid": "user48"}, ),
- "user49": ({"subjectid": "user49"}, ),
-}
-object_assignments = {"admin": ({"role": "admin"}, {"role": "*"}),
- "employee": ({"role": "employee"}, {"role": "*"}),
- "dev1": ({"role": "employee"}, {"role": "dev1"}, {"role": "*"}),
- "dev2": ({"role": "employee"}, {"role": "dev2"}, {"role": "*"}),
- "dev3": ({"role": "employee"}, {"role": "dev3"}, {"role": "*"}),
- "dev4": ({"role": "employee"}, {"role": "dev4"}, {"role": "*"}),
- "dev5": ({"role": "employee"}, {"role": "dev5"}, {"role": "*"}),
- "dev6": ({"role": "employee"}, {"role": "dev6"}, {"role": "*"}),
- "dev7": ({"role": "employee"}, {"role": "dev7"}, {"role": "*"}),
- "dev8": ({"role": "employee"}, {"role": "dev8"}, {"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": (
- {
- "rule": ("user0", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user1", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user2", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user2", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user3", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user4", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user5", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user6", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user7", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user8", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "employee", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev1", "*"),
- "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
- )
- },
- {
- "rule": ("user9", "dev2", "*"),
- "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
- )
- },
- {
- "rule": ("user10", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user11", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user12", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user13", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user14", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user15", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user16", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user17", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user18", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user19", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user1
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user20", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user21", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user22", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user23", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user24", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user25", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user26", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user27", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user28", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user29", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user2
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user30", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user31", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user32", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user32", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user32", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user33", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user33", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user33", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user34", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user34", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user34", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user35", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user35", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user35", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user36", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user36", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user36", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user37", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user37", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user37", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user38", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user38", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user38", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user39", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user39", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user39", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user3
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user40", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user41", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "delete",
- "target": "rbac:role:employee" # delete the role employee from the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user42", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user42", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user42", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user43", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user43", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user43", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user44", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user44", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user44", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user45", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user45", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user45", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user46", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user46", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user46", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user47", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user47", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user47", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user48", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user48", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user48", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user49", "employee", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user49", "dev3", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- {
- "rule": ("user49", "dev4", "*"),
- "instructions": (
- {
- "update": {
- "operation": "add",
- "target": "rbac:role:admin" # add the role admin to the current user4
- }
- },
- {"chain": {"name": "rbac"}} # chain with the meta_rule named rbac
- )
- },
- )
-}
-
-
diff --git a/moonv4/tests/12_tenant_scalability/exec.sh b/moonv4/tests/12_tenant_scalability/exec.sh
new file mode 100644
index 00000000..4f907625
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/exec.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+HOST=varuna
+PORT=38001
+
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+
+if [ -n "$HOST" ]; then
+ RESULT_DIR=${MOON_HOME}/tests/12_tenant_scalability/${HOST}/50
+ ARGS="--host=${HOST} --host-authz=${HOST} --limit=100 -t";
+else
+ RESULT_DIR=${MOON_HOME}/tests/12_tenant_scalability/localhost/50
+ ARGS="--limit=100 --host-authz=localhost -t";
+fi
+CPT="01 02 03 04 05 06 07 08 09 10"
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+mv ${RESULT_DIR}/docker_stats.rst ${RESULT_DIR}/docker_stats.rst.bak 2>/dev/null
+
+for SC_INDEX in 01 02 03 04 05 06 07 08 09 10;
+#for SC_INDEX in 01;
+do
+ SC=scenario/50/rbac_50_tenant_${SC_INDEX}.py
+ let PORT++
+ echo "Testing ${SC} on port ${PORT}"
+ FILE=${SC##*/}
+ FILE=${FILE%.py}
+ echo "Testing ${FILE}" >> ${RESULT_DIR}/docker_stats.rst
+ echo "===========================" >> ${RESULT_DIR}/docker_stats.rst
+ echo "" >> ${RESULT_DIR}/docker_stats.rst
+ python3 ${POPULATE_SCRIPT} ${SC}
+ for cpt in ${CPT};
+ do
+ python3 ${TEST_SCRIPT} ${ARGS} --port-authz=${PORT} --pdp pdp${SC_INDEX} --request-per-second ${cpt} --write="${RESULT_DIR}/data_${FILE}_$cpt.json" ${SC}
+ done
+ if [ -n "$HOST" ]; then
+ ssh varuna docker stats --no-stream --format \"table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.PIDs}}\" >> ${RESULT_DIR}/docker_stats.rst;
+ else
+ docker stats --no-stream --format "table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.PIDs}}" >> ${RESULT_DIR}/docker_stats.rst;
+ fi
+ echo "" >> ${RESULT_DIR}/docker_stats.rst
+done
+
diff --git a/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_01.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_01.py
new file mode 100644
index 00000000..b591b532
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_02.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_02.py
new file mode 100644
index 00000000..4ca48d25
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_03.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_03.py
new file mode 100644
index 00000000..eb424e79
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_04.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_04.py
new file mode 100644
index 00000000..5fb860f5
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_05.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_05.py
new file mode 100644
index 00000000..09947491
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_06.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_06.py
new file mode 100644
index 00000000..a3f66c4f
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_07.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_07.py
new file mode 100644
index 00000000..14d75d57
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_08.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_08.py
new file mode 100644
index 00000000..a658bb0c
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_09.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_09.py
new file mode 100644
index 00000000..96c3f61a
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/10/rbac_10_tenant_10.py b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_10.py
new file mode 100644
index 00000000..bebdee23
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/10/rbac_10_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_01.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_01.py
new file mode 100644
index 00000000..4282d4d0
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_02.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_02.py
new file mode 100644
index 00000000..e110dd5c
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_03.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_03.py
new file mode 100644
index 00000000..dc2195e1
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_04.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_04.py
new file mode 100644
index 00000000..6e3e86ce
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_05.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_05.py
new file mode 100644
index 00000000..266e3bc0
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_06.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_06.py
new file mode 100644
index 00000000..b1227932
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_07.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_07.py
new file mode 100644
index 00000000..794331b6
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_08.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_08.py
new file mode 100644
index 00000000..5eab408c
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_09.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_09.py
new file mode 100644
index 00000000..2721c092
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/100/rbac_100_tenant_10.py b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_10.py
new file mode 100644
index 00000000..bcad20f7
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/100/rbac_100_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_01.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_01.py
new file mode 100644
index 00000000..9917a970
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_02.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_02.py
new file mode 100644
index 00000000..9b040abd
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_03.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_03.py
new file mode 100644
index 00000000..4d15a6ee
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_04.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_04.py
new file mode 100644
index 00000000..b5fba2f0
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_05.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_05.py
new file mode 100644
index 00000000..f0f21cfe
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_06.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_06.py
new file mode 100644
index 00000000..7ab5ecc0
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_07.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_07.py
new file mode 100644
index 00000000..53dcb5fc
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_08.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_08.py
new file mode 100644
index 00000000..4d70e179
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_09.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_09.py
new file mode 100644
index 00000000..5ece9e9d
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+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/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py
new file mode 100644
index 00000000..9914e565
--- /dev/null
+++ b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+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/21_slave_scalability/Vagrantfile b/moonv4/tests/21_slave_scalability/Vagrantfile
new file mode 100644
index 00000000..dee19395
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/Vagrantfile
@@ -0,0 +1,32 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure("2") do |config|
+ config.vm.box = "ubuntu/xenial64"
+
+ # Create a private network, which allows host-only access to the machine
+ # using a specific IP.
+ # config.vm.network "private_network", ip: "192.168.33.10"
+
+ config.vm.provider "virtualbox" do |vb|
+ # # Display the VirtualBox GUI when booting the machine
+ # vb.gui = true
+ #
+ # # Customize the amount of memory on the VM:
+ vb.memory = "4096"
+ vb.cpus = "1"
+ end
+
+ config.vm.define "master" do |master|
+ master.vm.box = "ubuntu/xenial64"
+ master.vm.provision "shell", path: "master.sh"
+ master.vm.network "private_network", ip: "192.168.33.10", virtualbox__intnet: "internal"
+ end
+
+ config.vm.define "slave1" do |slave1|
+ slave1.vm.box = "ubuntu/xenial64"
+ slave1.vm.provision "shell", path: "slave.sh slave1"
+ slave1.vm.network "private_network", ip: "192.168.33.11", virtualbox__intnet: "internal"
+ end
+
+end
diff --git a/moonv4/tests/21_slave_scalability/exec.sh b/moonv4/tests/21_slave_scalability/exec.sh
new file mode 100644
index 00000000..e41e178b
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/exec.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+HOST=varuna
+
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+
+RESULT_DIR=${MOON_HOME}/tests/21_slave_scalability/${HOST}
+ARGS="--host=127.0.0.1 --port=38100 --limit=100 -t";
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+
+CPT="01 02 03 04 05 06 07 08 09 10"
+
+SC=scenario/10/rbac_10_tenant_01.py
+python3 ${POPULATE_SCRIPT} ${SC}
+
+for REQ in 01 02 03 04 05 06 07 08 09 10;
+do
+ python3 ${TEST_SCRIPT} ${ARGS} --pdp pdp01 --request-per-second ${REQ} --write="${RESULT_DIR}/data_master_${REQ}.json" ${SC}
+
+ ARGS="--host=127.0.0.1 --port=38101 --limit=100 -t";
+ python3 ${TEST_SCRIPT} ${ARGS} --pdp pdp01 --request-per-second ${REQ} --write="${RESULT_DIR}/data_slave_${REQ}.json" ${SC}
+done
+
diff --git a/moonv4/tests/21_slave_scalability/exec_varuna.sh b/moonv4/tests/21_slave_scalability/exec_varuna.sh
new file mode 100644
index 00000000..c2f0ac33
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/exec_varuna.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+HOST_MASTER=varuna
+PORT_MASTER=38001
+HOST_SLAVE=172.18.0.11
+PORT_SLAVE=38001
+
+TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
+POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
+
+RESULT_DIR=${MOON_HOME}/tests/21_slave_scalability/${HOST_MASTER}_${HOST_SLAVE}
+ARGS="--limit=100";
+
+mkdir -p ${RESULT_DIR} 2>/dev/null
+
+CPT="01 02 03 04 05 06 07 08 09 10"
+
+SC=scenario/10/rbac_10_tenant_01.py
+python3 ${POPULATE_SCRIPT} ${SC}
+
+#cd ${MOON_HOME}
+
+for REQ in 01 02 03 04 05 06 07 08 09 10;
+do
+
+# ${MOON_HOME}/bin/start.sh &
+#
+# echo "waiting for Orchestrator..."
+# echo -e "\033[35m"
+# sed '/Starting MQ server with topic: orchestrator/q' <(tail -f /tmp/orchestrator.log)
+# echo -e "\033[m"
+
+ python3 ${TEST_SCRIPT} --host=${HOST_SLAVE} --port=${PORT_SLAVE} ${ARGS} --pdp pdp01 --request-per-second 5 --write="${RESULT_DIR}/data_slave_05_${REQ}.json" ${SC}
+# python3 ../../moon_interface/tests/apitests/plot_json.py latency "${RESULT_DIR}/data_slave_05_${REQ}.json" -w
+
+# kill $(cat moon_orchestrator.pid)
+#
+# echo "waiting for Orchestrator..."
+# echo -e "\033[35m"
+# sed '/Moon orchestrator: offline/q' <(tail -f /tmp/orchestrator.log)
+# echo -e "\033[m"
+
+ echo ================================= Restart Moon =================================
+ read A
+
+done
+
diff --git a/moonv4/tests/21_slave_scalability/master.sh b/moonv4/tests/21_slave_scalability/master.sh
new file mode 100644
index 00000000..3799d631
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/master.sh
@@ -0,0 +1,57 @@
+#!/usr/bin/env bash
+
+apt-get update
+apt-get install -y python3-dev python3-pip git
+pip3 install pip --upgrade
+echo 127.0.0.1 messenger db keystone | tee -a /etc/hosts
+apt-get install -y apt-transport-https ca-certificates curl software-properties-common
+apt-get update
+
+curl -sSL https://get.docker.com | sh
+docker run hello-world
+groupadd docker
+gpasswd -a ${USER} docker
+service docker restart
+
+cd
+git clone https://git.opnfv.org/moon
+cd moon/moonv4
+export MOON_HOME=$(pwd)
+mkdir /etc/moon
+cp -r $(pwd)/moon_orchestrator/conf/* /etc/moon/
+cp /vagrant/conf/moon_master.conf /et/moon/moon.conf
+
+docker network create -d bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 moon
+#docker load -i /vagrant/keystone.tar
+
+#docker run -dti --net=moon --hostname messenger --name messenger --link messenger:messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -p 5671:5671 -p 5672:5672 rabbitmq:3-management
+#docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
+docker pull rabbitmq:3-management
+docker pull mysql:latest
+docker pull asteroide/keystone_mitaka:latest
+
+bash ${MOON_HOME}/bin/build_all.sh
+
+pip3 install pip --upgrade
+source ${MOON_HOME}/bin/build_all.sh
+pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_db-0.1.0.tar.gz --upgrade
+pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_utilities-0.1.0.tar.gz --upgrade
+
+cd ${MOON_HOME}/moon_orchestrator
+pip3 install -r requirements.txt --upgrade
+pip3 install . --upgrade
+
+#echo "waiting for Database (it may take time)..."
+#echo -e "\033[35m"
+#sed '/ready for connections/q' <(docker logs db -f)
+#echo -e "\033[m"
+#
+#echo "waiting for Messenger (it may take time)..."
+#echo -e "\033[35m"
+#sed '/Server startup complete;/q' <(docker logs messenger -f)
+#echo -e "\033[m"
+#
+#
+#docker run -dti --net moon --name keystone --hostname=keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone_mitaka:latest
+#
+#echo moon_orchestrator
diff --git a/moonv4/tests/21_slave_scalability/run.sh b/moonv4/tests/21_slave_scalability/run.sh
new file mode 100644
index 00000000..a46efdc5
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/run.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+docker run -dti --net=moon --hostname messenger --name messenger --link messenger:messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -p 5671:5671 -p 5672:5672 rabbitmq:3-management
+docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
+
+echo "waiting for Database (it may take time)..."
+echo -e "\033[35m"
+sed '/ready for connections/q' <(docker logs db -f)
+echo -e "\033[m"
+
+echo "waiting for Messenger (it may take time)..."
+echo -e "\033[35m"
+sed '/Server startup complete;/q' <(docker logs messenger -f)
+echo -e "\033[m"
+
+
+docker run -dti --net moon --name keystone --hostname=keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 asteroide/keystone_mitaka:latest
+
+moon_db_manager up
+
+moon_orchestrator
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py
new file mode 100644
index 00000000..b591b532
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_02.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py
new file mode 100644
index 00000000..4ca48d25
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_03.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py
new file mode 100644
index 00000000..eb424e79
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_04.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py
new file mode 100644
index 00000000..5fb860f5
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_05.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py
new file mode 100644
index 00000000..09947491
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_06.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py
new file mode 100644
index 00000000..a3f66c4f
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_07.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py
new file mode 100644
index 00000000..14d75d57
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_08.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py
new file mode 100644
index 00000000..a658bb0c
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_09.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py
new file mode 100644
index 00000000..96c3f61a
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/10/rbac_10_tenant_10.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py
new file mode 100644
index 00000000..bebdee23
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 10
+OBJECT_NUMBER = 10
+ROLE_NUMBER = 5
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_01.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py
new file mode 100644
index 00000000..4282d4d0
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_02.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py
new file mode 100644
index 00000000..e110dd5c
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_03.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py
new file mode 100644
index 00000000..dc2195e1
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_04.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py
new file mode 100644
index 00000000..6e3e86ce
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_05.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py
new file mode 100644
index 00000000..266e3bc0
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_06.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py
new file mode 100644
index 00000000..b1227932
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_07.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py
new file mode 100644
index 00000000..794331b6
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_08.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py
new file mode 100644
index 00000000..5eab408c
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_09.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py
new file mode 100644
index 00000000..2721c092
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/100/rbac_100_tenant_10.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py
new file mode 100644
index 00000000..bcad20f7
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+policy_name = "RBAC policy example"
+model_name = "RBAC"
+policy_genre = "authz"
+
+SUBJECT_NUMBER = 100
+OBJECT_NUMBER = 100
+ROLE_NUMBER = 20
+
+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/21_slave_scalability/scenario/50/rbac_50_tenant_01.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py
new file mode 100644
index 00000000..9917a970
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp01"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_02.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py
new file mode 100644
index 00000000..9b040abd
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp02"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_03.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py
new file mode 100644
index 00000000..4d15a6ee
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp03"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_04.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py
new file mode 100644
index 00000000..b5fba2f0
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp04"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_05.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py
new file mode 100644
index 00000000..f0f21cfe
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp05"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_06.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py
new file mode 100644
index 00000000..7ab5ecc0
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp06"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_07.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py
new file mode 100644
index 00000000..53dcb5fc
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp07"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_08.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py
new file mode 100644
index 00000000..4d70e179
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp08"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_09.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py
new file mode 100644
index 00000000..5ece9e9d
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp09"
+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/21_slave_scalability/scenario/50/rbac_50_tenant_10.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py
new file mode 100644
index 00000000..9914e565
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py
@@ -0,0 +1,89 @@
+import random
+
+pdp_name = "pdp10"
+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/21_slave_scalability/slave.sh b/moonv4/tests/21_slave_scalability/slave.sh
new file mode 100644
index 00000000..26a97fd0
--- /dev/null
+++ b/moonv4/tests/21_slave_scalability/slave.sh
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+
+SLAVE_NAME=$1
+
+apt-get update
+apt-get install -y python3-dev python3-pip git
+pip3 install pip --upgrade
+echo 127.0.0.1 messenger db keystone | tee -a /etc/hosts
+apt-get install -y apt-transport-https ca-certificates curl software-properties-common
+apt-get update
+
+curl -sSL https://get.docker.com | sh
+docker run hello-world
+groupadd docker
+gpasswd -a ${USER} docker
+service docker restart
+
+cd
+git clone https://git.opnfv.org/moon
+cd moon/moonv4
+export MOON_HOME=$(pwd)
+sudo ln -s $(pwd)/moon_orchestrator/conf /etc/moon
+sudo cp /vagrant/conf/moon_${SLAVE_NAME}.conf /et/moon/moon.conf
+
+docker network create -d bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 moon
+docker load -i /vagrant/keystone.tar
+
+docker run -dti --net=moon --hostname messenger --name messenger --link messenger:messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -p 5671:5671 -p 5672:5672 rabbitmq:3-management
+docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
+
+bash ${MOON_HOME}/bin/build_all.sh
+
+cd ${MOON_HOME}/moon_orchestrator
+pip3 install pip --upgrade
+source ${MOON_HOME}/bin/build_all.sh
+pip3 install -r requirements.txt --upgrade
+pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_db-0.1.0.tar.gz --upgrade
+pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_utilities-0.1.0.tar.gz --upgrade
+pip3 install . --upgrade
+
+echo "waiting for Database (it may take time)..."
+echo -e "\033[35m"
+sed '/ready for connections/q' <(docker logs db -f)
+echo -e "\033[m"
+
+echo "waiting for Messenger (it may take time)..."
+echo -e "\033[35m"
+sed '/Server startup complete;/q' <(docker logs messenger -f)
+echo -e "\033[m"
+
+
+docker run -dti --net moon --name keystone --hostname=keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone_mitaka:latest
+
+echo moon_orchestrator