From 1f389a9158af9a4c0e4ceff5ba581834e78829bc Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 29 Jan 2021 10:03:51 -0500 Subject: describe env vars, instead of command-line option, for db connection string --- libeufin/nexus-tutorial.rst | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'libeufin') diff --git a/libeufin/nexus-tutorial.rst b/libeufin/nexus-tutorial.rst index 0ce97c2b..01dd8b97 100644 --- a/libeufin/nexus-tutorial.rst +++ b/libeufin/nexus-tutorial.rst @@ -110,6 +110,11 @@ The sandbox service is started with the following command: To reset the state of the sandbox, delete the database. By default, the database is a SQLite3 file in ``/tmp/libeufin-sandbox.sqlite3``. +A different database can be specified as a JDBC connection URI +with the ``LIBEUFIN_SANDBOX_DB_CONNECTION`` environment variable. +Only *SQLite* (e.g. ``jdbc:sqlite:/tmp/libeufintestdb``) and *PostgreSQL (via TCP)* +(e.g. ``jdbc:postgresql://localhost:$port/libeufintestdb?user=$username&password=$password``) +are supported right now. For invocations of the LibEuFin command-line interface tool (``libeufin-cli``), the following environment variable must be set to the URL of the sandbox @@ -196,36 +201,24 @@ Use the following command to run the nexus service: $ libeufin-nexus serve --port 5001 By default, the SQLite3 database ``/tmp/libeufin-nexus.sqlite3`` will be used. -The database can be specified as a JDBC connection URI with the -``--db-conn-string=$DBCONN`` option. Only *SQLite* and *PostgreSQL (only via -TCP)* are supported right now. - -.. warning:: - - For production-grade deployments of LibEuFin, we do not recommend specifying the - secret database credentials via command line arguments, as can will expose - those credentials to other users. - - Instead, the DB connection string should be specified in an environment variable - (which can be set in the systemd unit via an ``EnvironmentFile`` option) - once LibEuFin supports this (see the corresponding - `bug tracker entry `__). - +The database can be specified as a JDBC connection URI +with the ``LIBEUFIN_NEXUS_DB_CONNECTION`` environment variable. +Only *SQLite* (e.g. ``jdbc:sqlite:/tmp/libeufintestdb``) and *PostgreSQL (via TCP)* +(e.g. ``jdbc:postgresql://localhost:$port/libeufintestdb?user=$username&password=$password``) +are supported right now. For example: .. code-block:: console - $ libeufin-nexus serve \ - --db-conn-string=jdbc:postgresql://127.0.0.1:5433/libeufindb?user=foo&password=secret + $ export LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:postgresql://127.0.0.1:5433/libeufindb?user=foo&password=secret + $ libeufin-nexus serve At this point a superuser account needs to be created: .. code-block:: console - $ libeufin-nexus superuser \ - --db-conn-string=jdbc:postgresql://127.0.0.1:5433/libeufindb?user=foo&password=secret \ - foo # Will interactively ask for password + $ libeufin-nexus superuser foo # Will interactively ask for password For simplicity, a superuser can as well act as a normal user, but an API to create less privileged users is offered. -- cgit v1.2.3 From 99eafd6b3b2292e473f316d61075680c48e9f0d1 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 29 Jan 2021 13:27:46 -0500 Subject: show expected output of ‘libeufin-cli sandbox check’ command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libeufin/nexus-tutorial.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libeufin') diff --git a/libeufin/nexus-tutorial.rst b/libeufin/nexus-tutorial.rst index 01dd8b97..dd850bda 100644 --- a/libeufin/nexus-tutorial.rst +++ b/libeufin/nexus-tutorial.rst @@ -126,13 +126,10 @@ service: Verify that the sandbox is running: -.. ??? What is the expected output of this command? -.. => it's a JSON fragment like {name: "libeufin-sandbox", version: "0.0.0"} - Basically, it calls this: https://git.taler.net/libeufin.git/tree/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt#n288 - .. code-block:: console $ libeufin-cli sandbox check + {name: "libeufin-sandbox", version: "0.0.0"} Now an EBICS host can be created: -- cgit v1.2.3