aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-11-04 13:36:44 +0100
committerFlorian Dold <florian@dold.me>2022-11-04 13:36:51 +0100
commitb4d4285aef32bdb2d92654b535fbb2e532e47ae7 (patch)
treeab5e832887417674a489192a9b8f40d265f7ebf5 /src
parentac7e0daa2f78668e7e132b617557290283064485 (diff)
use --no-auth for libeufin sandbox
Diffstat (limited to 'src')
-rwxr-xr-xsrc/auditor/generate-auditor-basedb.sh25
-rwxr-xr-xsrc/auditor/generate-revoke-basedb.sh4
-rwxr-xr-xsrc/auditor/test-auditor.sh3
-rwxr-xr-xsrc/auditor/test-revocation.sh3
4 files changed, 7 insertions, 28 deletions
diff --git a/src/auditor/generate-auditor-basedb.sh b/src/auditor/generate-auditor-basedb.sh
index cf9cbc9c7..6ce01725c 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -16,24 +16,6 @@
set -eu
#set -x
-function get_iban() {
- export LIBEUFIN_SANDBOX_USERNAME=$1
- export LIBEUFIN_SANDBOX_PASSWORD=$2
- export LIBEUFIN_SANDBOX_URL=$BANK_URL
- cd $MY_TMP_DIR
- libeufin-cli sandbox demobank info --bank-account $1 | jq --raw-output '.iban'
- cd $ORIGIN
-}
-
-function get_payto_uri() {
- export LIBEUFIN_SANDBOX_USERNAME=$1
- export LIBEUFIN_SANDBOX_PASSWORD=$2
- export LIBEUFIN_SANDBOX_URL=$BANK_URL
- cd $MY_TMP_DIR
- libeufin-cli sandbox demobank info --bank-account $1 | jq --raw-output '.paytoUri'
- cd $ORIGIN
-}
-
# Cleanup to run whenever we exit
function exit_cleanup()
{
@@ -161,13 +143,12 @@ export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${TARGET_DB}-sandbox.sqlite3"
# Create the default demobank.
cd $MY_TMP_DIR
libeufin-sandbox config --currency "TESTKUDOS" default
-export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret
-libeufin-sandbox serve --port "1${BANK_PORT}" \
+libeufin-sandbox serve --no-auth --port "1${BANK_PORT}" \
> ${MY_TMP_DIR}/libeufin-sandbox-stdout.log \
2> ${MY_TMP_DIR}/libeufin-sandbox-stderr.log &
echo $! > ${MY_TMP_DIR}/libeufin-sandbox.pid
cd $ORIGIN
-export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/demobanks/default"
+export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/"
set +e
echo -n "Waiting for Sandbox..."
OK=0
@@ -177,7 +158,7 @@ for n in `seq 1 50`; do
if wget --timeout=1 \
--tries=3 --waitretry=0 \
-o /dev/null -O /dev/null \
- $LIBEUFIN_SANDBOX_URL;
+ ${LIBEUFIN_SANDBOX_URL}demobanks;
then
OK=1
break
diff --git a/src/auditor/generate-revoke-basedb.sh b/src/auditor/generate-revoke-basedb.sh
index 0474f2b6d..0872d81bd 100755
--- a/src/auditor/generate-revoke-basedb.sh
+++ b/src/auditor/generate-revoke-basedb.sh
@@ -152,7 +152,7 @@ libeufin-sandbox serve --port "1${BANK_PORT}" \
2> ${MY_TMP_DIR}/libeufin-sandbox-stderr.log &
echo $! > ${MY_TMP_DIR}/libeufin-sandbox.pid
cd $ORIGIN
-export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/demobanks/default"
+export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/"
set +e
echo -n "Waiting for Sandbox..."
OK=0
@@ -162,7 +162,7 @@ for n in `seq 1 50`; do
if wget --timeout=1 \
--tries=3 --waitretry=0 \
-o /dev/null -O /dev/null \
- $LIBEUFIN_SANDBOX_URL;
+ ${LIBEUFIN_SANDBOX_URL}demobanks;
then
OK=1
break
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 0390c206b..2fc97283b 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -122,8 +122,7 @@ trap exit_cleanup EXIT
function launch_libeufin () {
cd $MYDIR
export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${DB}-sandbox.sqlite3"
- export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret
- libeufin-sandbox serve --port 18082 \
+ libeufin-sandbox serve --no-auth --port 18082 \
> ${MYDIR}/libeufin-sandbox-stdout.log \
2> ${MYDIR}/libeufin-sandbox-stderr.log &
echo $! > ${MYDIR}/libeufin-sandbox.pid
diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh
index 2751b5c20..0ed79f237 100755
--- a/src/auditor/test-revocation.sh
+++ b/src/auditor/test-revocation.sh
@@ -152,8 +152,7 @@ function launch_libeufin () {
> ${MYDIR}/libeufin-nexus-stdout.log &
echo $! > ${MYDIR}/libeufin-nexus.pid
export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${DB}-sandbox.sqlite3"
- export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret
- libeufin-sandbox serve --port 18082 \
+ libeufin-sandbox serve --no-auth --port 18082 \
> ${MYDIR}/libeufin-sandbox-stdout.log \
2> ${MYDIR}/libeufin-sandbox-stderr.log &
echo $! > ${MYDIR}/libeufin-sandbox.pid