From eba100151bdb07cdb3855a9f08e858e18c35055f Mon Sep 17 00:00:00 2001 From: aldbr Date: Tue, 6 Feb 2024 18:17:56 +0100 Subject: [PATCH] feat: add the state key to run_local --- run_local.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run_local.sh b/run_local.sh index 94fe4db88..30d812257 100755 --- a/run_local.sh +++ b/run_local.sh @@ -10,6 +10,8 @@ mkdir -p "${tmp_dir}/signing-key" "${tmp_dir}/cs_store/" signing_key="${tmp_dir}/signing-key/rsa256.key" ssh-keygen -P "" -t rsa -b 4096 -m PEM -f "${signing_key}" +state_key="$(head -c 32 /dev/urandom | base64)" + # Make a fake CS dirac internal generate-cs "${tmp_dir}/cs_store/initialRepo" @@ -31,6 +33,7 @@ export DIRACX_DB_URL_JOBLOGGINGDB="sqlite+aiosqlite:///:memory:" export DIRACX_DB_URL_SANDBOXMETADATADB="sqlite+aiosqlite:///:memory:" export DIRACX_DB_URL_TASKQUEUEDB="sqlite+aiosqlite:///:memory:" export DIRACX_SERVICE_AUTH_TOKEN_KEY="file://${signing_key}" +export DIRACX_SERVICE_AUTH_STATE_KEY="${state_key}" export DIRACX_SERVICE_AUTH_ALLOWED_REDIRECTS='["http://'$(hostname| tr -s '[:upper:]' '[:lower:]')':8000/docs/oauth2-redirect"]' export DIRACX_SANDBOX_STORE_BUCKET_NAME=sandboxes export DIRACX_SANDBOX_STORE_AUTO_CREATE_BUCKET=true