diff --git a/perf-scripts/common/deployment/setup/resources/postgres/create_database.sql b/perf-scripts/common/deployment/setup/resources/postgres/create_database.sql
index 5710a82..f6e1780 100644
--- a/perf-scripts/common/deployment/setup/resources/postgres/create_database.sql
+++ b/perf-scripts/common/deployment/setup/resources/postgres/create_database.sql
@@ -17,6 +17,7 @@
create database "configdb";
create database "runtimedb";
create database "userdb";
+create database "operationdb";
\c configdb
\i /home/ubuntu/thunder/dbscripts/configdb/postgres.sql
@@ -24,4 +25,6 @@ create database "userdb";
\i /home/ubuntu/thunder/dbscripts/runtimedb/postgres.sql
\c userdb
\i /home/ubuntu/thunder/dbscripts/userdb/postgres.sql
+\c operationdb
+\i /home/ubuntu/thunder/dbscripts/operationdb/postgres.sql
diff --git a/perf-scripts/common/jmeter/authenticate/Authenticate_With_Credentials.jmx b/perf-scripts/common/jmeter/authenticate/Authenticate_With_Credentials.jmx
index a49afa7..9d6d13d 100644
--- a/perf-scripts/common/jmeter/authenticate/Authenticate_With_Credentials.jmx
+++ b/perf-scripts/common/jmeter/authenticate/Authenticate_With_Credentials.jmx
@@ -78,6 +78,12 @@
${__P(noOfNodes,1)}
=
+
+ directAuthSecret
+ ${__P(directAuthSecret,)}
+ Gates the Direct API (/auth/**) since Thunder v0.48.0.
+ =
+
@@ -138,6 +144,10 @@ if (y == 0 || "active-passive".equals(deploymentType)) {
X-Server-Select
${serverNode}
+
+ Direct-Auth-Secret
+ ${directAuthSecret}
+
diff --git a/perf-scripts/common/jmeter/perf-test-thunder.sh b/perf-scripts/common/jmeter/perf-test-thunder.sh
index 141211f..19baa50 100755
--- a/perf-scripts/common/jmeter/perf-test-thunder.sh
+++ b/perf-scripts/common/jmeter/perf-test-thunder.sh
@@ -91,6 +91,12 @@ use_delay=true
jwt_token_client_secret=""
jwt_token_user_password=""
+# Gates the Direct API (/auth/**) since Thunder v0.48.0; sent as the Direct-Auth-Secret
+# header. Must match server.security.direct_auth_secret in the deployment.yaml under
+# perf-scripts//setup/resources/.
+default_direct_auth_secret="asgthunder-perf-direct-auth-secret"
+direct_auth_secret=$default_direct_auth_secret
+
# Token Type
token_issuer="Opaque"
@@ -120,7 +126,7 @@ function usage() {
echo " [-g ] [-f ] [-n ]"
echo " [-s ] [-q ] [-u ]"
echo " [-k ] [-o ]"
- echo " [-x ] [-y ]"
+ echo " [-x ] [-y ] [-a ]"
echo " [-t] [-p ] [-b ] [-z ] [-h]"
echo ""
echo "-c: Concurrency levels to test. You can give multiple options to specify multiple levels. Default \"$default_concurrent_users\"."
@@ -140,6 +146,7 @@ function usage() {
echo "-o: JWT token user password."
echo "-x: Enable burst traffic."
echo "-y: Token issuer type. Use Opaque (default) or JWT."
+ echo "-a: Direct Auth Secret gating the Direct API (/auth/**). Default \"$default_direct_auth_secret\"."
echo "-t: Estimate time without executing tests."
echo "-p: Thunder Port. Default $default_is_port."
echo "-b: Database type."
@@ -148,7 +155,7 @@ function usage() {
echo ""
}
-while getopts "c:d:w:r:j:i:e:g:f:n:s:q:u:tp:k:x:o:y:b:z:h" opts; do
+while getopts "c:d:w:r:j:i:e:g:f:n:s:q:u:tp:k:x:o:y:b:z:a:h" opts; do
case $opts in
c)
concurrent_users+=("${OPTARG}")
@@ -213,6 +220,9 @@ while getopts "c:d:w:r:j:i:e:g:f:n:s:q:u:tp:k:x:o:y:b:z:h" opts; do
y)
token_issuer=${OPTARG}
;;
+ a)
+ direct_auth_secret=${OPTARG}
+ ;;
h)
usage
exit 0
@@ -602,7 +612,7 @@ function test_scenarios() {
mkdir -p "$report_location"
time=$(expr "$test_duration" \* 60)
- declare -a jmeter_params=("concurrency=$users" "time=$time" "host=$lb_host" "port=$is_port" "noOfNodes=$noOfNodes" "noOfBurst=$burstTraffic" "deployment=$deployment" "userCount=$userCount" "useDelay=$use_delay")
+ declare -a jmeter_params=("concurrency=$users" "time=$time" "host=$lb_host" "port=$is_port" "noOfNodes=$noOfNodes" "noOfBurst=$burstTraffic" "deployment=$deployment" "userCount=$userCount" "useDelay=$use_delay" "directAuthSecret=$direct_auth_secret")
local tenantMode=${scenario[tenantMode]}
if [ "$tenantMode" = true ]; then
diff --git a/perf-scripts/single-node/setup/resources/deployment.yaml b/perf-scripts/single-node/setup/resources/deployment.yaml
index 9e8cde1..05cfceb 100644
--- a/perf-scripts/single-node/setup/resources/deployment.yaml
+++ b/perf-scripts/single-node/setup/resources/deployment.yaml
@@ -17,6 +17,12 @@
server:
hostname: "thunder.wso2.com"
port: 8090
+ security:
+ # Gates the Direct API (/auth/**) since Thunder v0.48.0. Pinned here so the JMeter
+ # client can send the matching Direct-Auth-Secret header; setup.sh honours an existing
+ # value instead of generating a random one. Must match direct_auth_secret in
+ # perf-scripts/common/jmeter/perf-test-thunder.sh.
+ direct_auth_secret: "asgthunder-perf-direct-auth-secret"
gate_client:
hostname: "thunder.wso2.com"
@@ -67,6 +73,18 @@ database:
max_open_conns: 20
max_idle_conns: 20
conn_max_lifetime: 300
+ operation:
+ type: "postgres"
+ postgres:
+ hostname: "{db_hostname}"
+ port: 5432
+ name: "operationdb"
+ username: "asgthunder"
+ password: "asgthunder"
+ sslmode: "disable"
+ max_open_conns: 20
+ max_idle_conns: 20
+ conn_max_lifetime: 300
cache:
disabled: false