gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: fix auth


From: gnunet
Subject: [taler-anastasis] branch master updated: fix auth
Date: Sat, 06 Mar 2021 22:06:31 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 3f0ea93  fix auth
3f0ea93 is described below

commit 3f0ea9386493ba701790103168ad95846f2a13e6
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Mar 6 22:06:29 2021 +0100

    fix auth
---
 contrib/gana                                       |   2 +-
 src/cli/test_anastasis_reducer_enter_secret.sh     |   2 +-
 ...tasis_reducer_recovery_enter_user_attributes.sh |   4 +-
 src/cli/test_reducer.sh                            | 189 ---------------------
 4 files changed, 4 insertions(+), 193 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index 943729d..4c5ae13 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 943729d4e2c2d97c3b5d737cf76b388086d94378
+Subproject commit 4c5ae13bf6c7e3cb070e9d56065cfdfc053f0b3a
diff --git a/src/cli/test_anastasis_reducer_enter_secret.sh 
b/src/cli/test_anastasis_reducer_enter_secret.sh
index 7ec594c..6b31849 100755
--- a/src/cli/test_anastasis_reducer_enter_secret.sh
+++ b/src/cli/test_anastasis_reducer_enter_secret.sh
@@ -264,7 +264,7 @@ echo "OK"
 echo -n "Configuring merchant instance ..."
 # Setup merchant
 
-curl -H "Content-Type: application/json" -X POST -d 
'{"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms"
 : 3600000},"default_pay_delay":{"d_ms": 3600000}}' 
http://localhost:9966/private/instances
+curl -H "Content-Type: application/json" -X POST -d 
'{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms"
 : 3600000},"default_pay_delay":{"d_ms": 3600000}}' 
http://localhost:9966/private/instances
 
 
 echo " DONE"
diff --git a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh 
b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh
index 7a6465f..1419048 100755
--- a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh
+++ b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh
@@ -263,7 +263,7 @@ echo "OK"
 echo -n "Configuring merchant instance ..."
 # Setup merchant
 
-curl -H "Content-Type: application/json" -X POST -d 
'{"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms"
 : 3600000},"default_pay_delay":{"d_ms": 3600000}}' 
http://localhost:9966/private/instances
+curl -H "Content-Type: application/json" -X POST -d 
'{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms"
 : 3600000},"default_pay_delay":{"d_ms": 3600000}}' 
http://localhost:9966/private/instances
 
 
 echo " DONE"
@@ -397,7 +397,7 @@ echo -n "Running challenge logic ..."
 UUID0=`jq -r -e .recovery_information.challenges[0].uuid < $R2FILE`
 UUID1=`jq -r -e .recovery_information.challenges[1].uuid < $R2FILE`
 
-anastasis-reducer -a \
+valgrind anastasis-reducer -a \
   "$(jq -n '
     {
         uuid: $UUID
diff --git a/src/cli/test_reducer.sh b/src/cli/test_reducer.sh
deleted file mode 100755
index 2f680a4..0000000
--- a/src/cli/test_reducer.sh
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/bash
-
-set -eu
-
-# Exit, with status code "skip" (no 'real' failure)
-function exit_skip() {
-    echo $1
-    exit 77
-}
-
-# Exit, with error message (hard failure)
-function exit_fail() {
-    echo $1
-    exit 1
-}
-
-# Cleanup to run whenever we exit
-function cleanup()
-{
-    for n in `jobs -p`
-    do
-        kill $n 2> /dev/null || true
-    done
-    rm -f $SFILE $TFILE $CONF $WALLET_DB
-    wait
-}
-
-# Install cleanup handler (except for kill -9)
-WALLET_DB=`mktemp test_reducer_walletXXXXXX`
-CONF=`mktemp test_reducerXXXXXX.conf`
-SFILE=`mktemp test_reducer_stateXXXXXX`
-TFILE=`mktemp test_reducer_stateXXXXXX`
-
-trap cleanup EXIT
-
-# Check we can actually run
-echo -n "Testing for jq"
-jq -h > /dev/null || exit_skip "jq required"
-echo " FOUND"
-
-echo -n "Testing for taler"
-taler-exchange-httpd -h > /dev/null || exit_skip " taler-exchange required"
-taler-merchant-httpd -h > /dev/null || exit_skip " taler-merchant required"
-echo " FOUND"
-
-echo -n "Testing for taler-bank-manage"
-taler-bank-manage --help >/dev/null </dev/null || exit_skip " MISSING"
-echo " FOUND"
-echo -n "Testing for taler-wallet-cli"
-taler-wallet-cli -v >/dev/null </dev/null || exit_skip " MISSING"
-echo " FOUND"
-
-echo -n "Testing for anastasis-httpd "
-anastasis-httpd -h >/dev/null </dev/null || exit_skip " MISSING"
-echo " FOUND"
-
-
-
-
-
-
-# Name of the Postgres database we will use for the script.
-# Will be dropped, do NOT use anything that might be used
-# elsewhere
-TARGET_DB=anastasischeck
-
-
-# delete existing wallet database
-rm -f $WALLET_DB
-
-
-# Configuration file will be edited, so we create one
-# from the template.
-cp test_reducer.conf $CONF
-
-
-# Clean up
-DATA_DIR=`taler-config -f -c $CONF -s PATHS -o TALER_HOME`
-rm -rf $DATA_DIR || true
-
-# reset database
-dropdb $TARGET_DB >/dev/null 2>/dev/null || true
-createdb $TARGET_DB || exit_skip "Could not create database $TARGET_DB"
-
-
-# obtain key configuration data
-MASTER_PRIV_FILE=`taler-config -f -c $CONF -s EXCHANGE -o MASTER_PRIV_FILE`
-MASTER_PRIV_DIR=`dirname $MASTER_PRIV_FILE`
-mkdir -p $MASTER_PRIV_DIR
-gnunet-ecc -g1 $MASTER_PRIV_FILE > /dev/null
-MASTER_PUB=`gnunet-ecc -p $MASTER_PRIV_FILE`
-EXCHANGE_URL=`taler-config -c $CONF -s EXCHANGE -o BASE_URL`
-MERCHANT_PORT=`taler-config -c $CONF -s MERCHANT -o PORT`
-MERCHANT_URL=http://localhost:${MERCHANT_PORT}/
-BANK_PORT=`taler-config -c $CONF -s BANK -o HTTP_PORT`
-BANK_URL=http://localhost:${BANK_PORT}/
-AUDITOR_URL=http://localhost:8083/
-
-# patch configuration
-taler-config -c $CONF -s exchange -o MASTER_PUBLIC_KEY -V $MASTER_PUB
-taler-config -c $CONF -s merchant-exchange-default -o MASTER_KEY -V $MASTER_PUB
-taler-config -c $CONF -s exchangedb-postgres -o CONFIG -V 
postgres:///$TARGET_DB
-taler-config -c $CONF -s auditordb-postgres -o CONFIG -V postgres:///$TARGET_DB
-taler-config -c $CONF -s merchantdb-postgres -o CONFIG -V 
postgres:///$TARGET_DB
-taler-config -c $CONF -s bank -o database -V postgres:///$TARGET_DB
-
-# setup exchange
-echo "Setting up exchange"
-taler-exchange-dbinit -c $CONF
-taler-exchange-wire -c $CONF 2> taler-exchange-wire.log
-taler-exchange-keyup -L INFO -c $CONF -o e2a.dat 2> taler-exchange-keyup.log
-
-# setup auditor
-echo "Setting up auditor"
-taler-auditor-dbinit -c $CONF
-taler-auditor-exchange -c $CONF -m $MASTER_PUB -u $EXCHANGE_URL
-taler-auditor-sign -c $CONF -u $AUDITOR_URL -r e2a.dat -o a2e.dat -m 
$MASTER_PUB
-rm -f e2a.dat
-
-# provide auditor's signature to exchange
-ABD=`taler-config -c $CONF -s EXCHANGEDB -o AUDITOR_BASE_DIR -f`
-mkdir -p $ABD
-mv a2e.dat $ABD
-
-# Launch services
-echo "Launching services"
-taler-bank-manage-testing $CONF postgres:///$TARGET_DB serve &
-taler-exchange-httpd -c $CONF 2> taler-exchange-httpd.log &
-taler-merchant-httpd -c $CONF -L INFO 2> taler-merchant-httpd.log &
-taler-exchange-wirewatch -c $CONF 2> taler-exchange-wirewatch.log &
-taler-auditor-httpd -c $CONF 2> taler-auditor-httpd.log &
-
-# Wait for all services to be available
-for n in `seq 1 50`
-do
-    echo -n "."
-    sleep 0.1
-    OK=0
-    # exchange
-    wget http://localhost:8081/ -o /dev/null -O /dev/null >/dev/null || 
continue
-    # merchant
-    wget http://localhost:9966/ -o /dev/null -O /dev/null >/dev/null || 
continue
-    # bank
-    wget http://localhost:8082/ -o /dev/null -O /dev/null >/dev/null || 
continue
-    # Auditor
-    wget http://localhost:8083/ -o /dev/null -O /dev/null >/dev/null || 
continue
-    OK=1
-    break
-done
-
-if [ 1 != $OK ]
-then
-    exit_skip "Failed to launch services"
-fi
-
-# Setup merchant
-
-curl -H "Content-Type: application/json" -X POST -d 
'{"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms"
 : 3600000},"default_pay_delay":{"d_ms": 3600000}}' 
http://localhost:9966/private/instances
-
-
-echo " TALER SETUP DONE"
-echo " "
-echo " "
-echo " "
-echo "Beginning with actual reducer test"
-
-
-./anastasis-reducer -b $SFILE
-
-STATE=`jq -r -e .backup_state < $SFILE`
-if test "$STATE" != "CONTINENT_SELECTING"
-then
-    exit_fail "Expected initial state to be CONTINENT_SELECTING, got $STATE"
-fi
-
-./anastasis-reducer -a '{"continent":"Europe"}' select_continent $SFILE $TFILE
-
-STATE=`jq -r -e .backup_state < $TFILE`
-if test "$STATE" != "COUNTRY_SELECTING"
-then
-    exit_fail "Expected CONTINENT_SELECTION to result in state to be 
COUNTRY_SELECTING, got $STATE"
-fi
-
-
-
-
-
-
-exit 0

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]