use --no-auth for libeufin sandbox

This commit is contained in:
Florian Dold 2022-11-04 13:36:44 +01:00
parent ac7e0daa2f
commit b4d4285aef
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
4 changed files with 7 additions and 28 deletions

View File

@ -16,24 +16,6 @@
set -eu set -eu
#set -x #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 # Cleanup to run whenever we exit
function exit_cleanup() function exit_cleanup()
{ {
@ -161,13 +143,12 @@ export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${TARGET_DB}-sandbox.sqlite3"
# Create the default demobank. # Create the default demobank.
cd $MY_TMP_DIR cd $MY_TMP_DIR
libeufin-sandbox config --currency "TESTKUDOS" default libeufin-sandbox config --currency "TESTKUDOS" default
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret libeufin-sandbox serve --no-auth --port "1${BANK_PORT}" \
libeufin-sandbox serve --port "1${BANK_PORT}" \
> ${MY_TMP_DIR}/libeufin-sandbox-stdout.log \ > ${MY_TMP_DIR}/libeufin-sandbox-stdout.log \
2> ${MY_TMP_DIR}/libeufin-sandbox-stderr.log & 2> ${MY_TMP_DIR}/libeufin-sandbox-stderr.log &
echo $! > ${MY_TMP_DIR}/libeufin-sandbox.pid echo $! > ${MY_TMP_DIR}/libeufin-sandbox.pid
cd $ORIGIN cd $ORIGIN
export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/demobanks/default" export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/"
set +e set +e
echo -n "Waiting for Sandbox..." echo -n "Waiting for Sandbox..."
OK=0 OK=0
@ -177,7 +158,7 @@ for n in `seq 1 50`; do
if wget --timeout=1 \ if wget --timeout=1 \
--tries=3 --waitretry=0 \ --tries=3 --waitretry=0 \
-o /dev/null -O /dev/null \ -o /dev/null -O /dev/null \
$LIBEUFIN_SANDBOX_URL; ${LIBEUFIN_SANDBOX_URL}demobanks;
then then
OK=1 OK=1
break break

View File

@ -152,7 +152,7 @@ libeufin-sandbox serve --port "1${BANK_PORT}" \
2> ${MY_TMP_DIR}/libeufin-sandbox-stderr.log & 2> ${MY_TMP_DIR}/libeufin-sandbox-stderr.log &
echo $! > ${MY_TMP_DIR}/libeufin-sandbox.pid echo $! > ${MY_TMP_DIR}/libeufin-sandbox.pid
cd $ORIGIN cd $ORIGIN
export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/demobanks/default" export LIBEUFIN_SANDBOX_URL="http://localhost:1${BANK_PORT}/"
set +e set +e
echo -n "Waiting for Sandbox..." echo -n "Waiting for Sandbox..."
OK=0 OK=0
@ -162,7 +162,7 @@ for n in `seq 1 50`; do
if wget --timeout=1 \ if wget --timeout=1 \
--tries=3 --waitretry=0 \ --tries=3 --waitretry=0 \
-o /dev/null -O /dev/null \ -o /dev/null -O /dev/null \
$LIBEUFIN_SANDBOX_URL; ${LIBEUFIN_SANDBOX_URL}demobanks;
then then
OK=1 OK=1
break break

View File

@ -122,8 +122,7 @@ trap exit_cleanup EXIT
function launch_libeufin () { function launch_libeufin () {
cd $MYDIR cd $MYDIR
export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${DB}-sandbox.sqlite3" export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${DB}-sandbox.sqlite3"
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret libeufin-sandbox serve --no-auth --port 18082 \
libeufin-sandbox serve --port 18082 \
> ${MYDIR}/libeufin-sandbox-stdout.log \ > ${MYDIR}/libeufin-sandbox-stdout.log \
2> ${MYDIR}/libeufin-sandbox-stderr.log & 2> ${MYDIR}/libeufin-sandbox-stderr.log &
echo $! > ${MYDIR}/libeufin-sandbox.pid echo $! > ${MYDIR}/libeufin-sandbox.pid

View File

@ -152,8 +152,7 @@ function launch_libeufin () {
> ${MYDIR}/libeufin-nexus-stdout.log & > ${MYDIR}/libeufin-nexus-stdout.log &
echo $! > ${MYDIR}/libeufin-nexus.pid echo $! > ${MYDIR}/libeufin-nexus.pid
export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${DB}-sandbox.sqlite3" export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${DB}-sandbox.sqlite3"
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret libeufin-sandbox serve --no-auth --port 18082 \
libeufin-sandbox serve --port 18082 \
> ${MYDIR}/libeufin-sandbox-stdout.log \ > ${MYDIR}/libeufin-sandbox-stdout.log \
2> ${MYDIR}/libeufin-sandbox-stderr.log & 2> ${MYDIR}/libeufin-sandbox-stderr.log &
echo $! > ${MYDIR}/libeufin-sandbox.pid echo $! > ${MYDIR}/libeufin-sandbox.pid