kych

OAuth 2.0 API for Swiyu to enable Taler integration of Swiyu for KYC (experimental)
Log | Files | Refs

commit abaee00458a60140973c6ee44a9a3248e0330e60
parent c1e0d18f7be61aa80f24e272e46fb929c62741d0
Author: Henrique Chan Carvalho Machado <henriqueccmachado@tecnico.ulisboa.pt>
Date:   Mon,  3 Nov 2025 22:58:42 +0100

oauth2_gateway db: fix privileges

Diffstat:
Moauth2_gateway/scripts/setup_test_db.sh | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/oauth2_gateway/scripts/setup_test_db.sh b/oauth2_gateway/scripts/setup_test_db.sh @@ -59,6 +59,14 @@ for patch_file in "$MIGRATIONS_DIR"/oauth2gw-*.sql; do fi done +# Grant schema privileges (minimum required for gateway to operate) +echo "Granting schema privileges..." +$PSQL_CMD -d "$DB_NAME" -c "GRANT USAGE ON SCHEMA oauth2gw TO $DB_USER;" +$PSQL_CMD -d "$DB_NAME" -c "GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA oauth2gw TO $DB_USER;" +$PSQL_CMD -d "$DB_NAME" -c "GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA oauth2gw TO $DB_USER;" +$PSQL_CMD -d "$DB_NAME" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA oauth2gw GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO $DB_USER;" +$PSQL_CMD -d "$DB_NAME" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA oauth2gw GRANT USAGE, SELECT ON SEQUENCES TO $DB_USER;" + # Seed test data echo "Seeding test data..." $PSQL_CMD -d "$DB_NAME" <<EOF @@ -66,7 +74,7 @@ INSERT INTO oauth2gw.clients (client_id, client_secret, notification_url, verifi VALUES ( 'test-exchange-001', 'test-secret-123', - 'http://localhost:9000/kyc/webhook', + 'http://localhost:9090/kyc/webhook', 'http://localhost:8080', '/management/api/verifications' )