summaryrefslogtreecommitdiff
path: root/texinfo/taler-auditor.texi
diff options
context:
space:
mode:
Diffstat (limited to 'texinfo/taler-auditor.texi')
-rw-r--r--texinfo/taler-auditor.texi683
1 files changed, 472 insertions, 211 deletions
diff --git a/texinfo/taler-auditor.texi b/texinfo/taler-auditor.texi
index fb41a174..7a83c089 100644
--- a/texinfo/taler-auditor.texi
+++ b/texinfo/taler-auditor.texi
@@ -3,29 +3,27 @@
@setfilename taler-auditor.info
@documentencoding UTF-8
@ifinfo
-@*Generated by Sphinx 3.4.3.@*
+@*Generated by Sphinx 5.3.0.@*
@end ifinfo
@settitle Taler Auditor Manual
@defindex ge
@paragraphindent 0
@exampleindent 4
@finalout
-@dircategory CATEGORY
+@dircategory Network applications
@direntry
-* MENU ENTRY: (taler-auditor.info). DESCRIPTION
+* GNU Taler Auditor: (taler-auditor.info). External audit for Taler Exchange operation
@end direntry
-@definfoenclose strong,`,'
-@definfoenclose emph,`,'
@c %**end of header
@copying
@quotation
-GNU Taler 0.8.2, Aug 08, 2021
+GNU Taler 0.10.0, May 15, 2024
GNU Taler team
-Copyright @copyright{} 2014-2021 Taler Systems SA (GPLv3+ or GFDL 1.3+)
+Copyright @copyright{} 2014-2024 Taler Systems SA (GPLv3+ or GFDL 1.3+)
@end quotation
@end copying
@@ -99,12 +97,22 @@ System setup
Configuration
* Configuration format::
-* Using taler-config::
* Initial configuration::
* Keys::
* Configuring the auditor’s REST endpoint::
* Bank account::
* Database::
+* Legal conditions for using the service::
+* Terms of Service::
+* Privacy Policy::
+* Legal policies directory layout::
+* Generating the Legal Terms::
+* Adding translations::
+* Updating legal documents::
+
+Legal policies directory layout
+
+* Example::
Deployment
@@ -145,7 +153,7 @@ Invariants checked by the auditor
@end menu
@node Introduction,Installation,Top,Top
-@anchor{taler-auditor-manual gnu-taler-auditor-operator-manual}@anchor{1}@anchor{taler-auditor-manual introduction}@anchor{2}
+@anchor{taler-auditor-manual auditor-operator-manual}@anchor{1}@anchor{taler-auditor-manual introduction}@anchor{2}
@chapter Introduction
@@ -165,6 +173,21 @@ to become readable.
@section About GNU Taler
+@c This file is part of GNU TALER.
+@c
+@c Copyright (C) 2014-2023 Taler Systems SA
+@c
+@c TALER is free software; you can redistribute it and/or modify it under the
+@c terms of the GNU Affero General Public License as published by the Free Software
+@c Foundation; either version 2.1, or (at your option) any later version.
+@c
+@c TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+@c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+@c A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+@c
+@c You should have received a copy of the GNU Affero General Public License along with
+@c TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+
GNU Taler is an open protocol for an electronic payment system with a
free software reference implementation. GNU Taler offers secure, fast
and easy payment processing using well understood cryptographic
@@ -203,7 +226,7 @@ all, the goal is to detect nerfarious activity of the exchange operator,
which cannot be effectively done on a machine controlled by the exchange
operator.
-For this, every auditor needs to operate a Postgres database. The data
+For this, every auditor needs to operate a PostgreSQL database. The data
collected will include sensitive information about Taler users, including
withdrawals made by consumers and income received by merchants. As a result,
the auditor is expected to provide high confidentiality for the database. In
@@ -276,7 +299,7 @@ components:
@itemize -
@item
-DBMS: Postgres
+DBMS: PostgreSQL
The auditor requires a DBMS to store a local copy of the transaction history for
the Taler exchange, as well as for its own internal bookkeeping and checkpointing.
@@ -286,7 +309,7 @@ fail to be imported due to constraint violations, this is an immediate serious
concern that must be addressed manually. The software only verifies the content
of a well-formed exchange database (well-formed with respect to SQL).
For now, the GNU Taler reference implementation
-only supports Postgres, but the code could be easily extended to
+only supports PostgreSQL, but the code could be easily extended to
support another DBMS.
@item
@@ -358,6 +381,18 @@ exchange compilation.
@itemize -
@item
+Python3 module @code{jinja2}
+@end itemize
+
+
+@itemize -
+
+@item
+“Sphinx RTD Theme” Python package aka @code{python3-sphinx-rtd-theme}
+on Debian-based systems (for GNUnet documentation support, can be
+omitted if GNUnet is configured with @code{--disable-documentation})
+
+@item
libsqlite3 >= 3.16.2
@item
@@ -367,10 +402,10 @@ GNU libunistring >= 0.9.3
libcurl >= 7.26 (or libgnurl >= 7.26)
@item
-libqrencode >= 4.0.0
+libqrencode >= 4.0.0 (Taler merchant only)
@item
-GNU libgcrypt >= 1.6
+GNU libgcrypt >= 1.6 (1.10 or later highly recommended)
@item
libsodium >= 1.0
@@ -382,13 +417,40 @@ libargon2 >= 20171227
libjansson >= 2.7
@item
-Postgres >= 9.6, including libpq
+PostgreSQL >= 15, including libpq
@item
GNU libmicrohttpd >= 0.9.71
@item
-GNUnet >= 0.14.0 (from source tarball@footnote{http://ftpmirror.gnu.org/gnunet/})
+GNUnet >= 0.20 (from source tarball@footnote{http://ftpmirror.gnu.org/gnunet/})
+
+@item
+Python3 with @code{jinja2}
+@end itemize
+
+If you are on Debian stable or later, the following command may help you
+install these dependencies:
+
+@example
+# apt-get install \
+ libqrencode-dev \
+ libsqlite3-dev \
+ libltdl-dev \
+ libunistring-dev \
+ libsodium-dev \
+ libargon2-dev \
+ libcurl4-gnutls-dev \
+ libgcrypt20-dev \
+ libjansson-dev \
+ libpq-dev \
+ libmicrohttpd-dev \
+ python3-jinja2 \
+ postgresql-15
+@end example
+
+
+@itemize -
@item
GNU Taler exchange (from download directory@footnote{http://ftpmirror.gnu.org/taler/},
@@ -406,6 +468,12 @@ Before you install GNUnet, you must download and install the dependencies
mentioned in the previous section, otherwise the build may succeed, but could
fail to export some of the tooling required by GNU Taler.
+On Ubuntu, you also need to install pkg-config, for example:
+
+@example
+$ apt-get install pkg-config
+@end example
+
To install GNUnet, unpack the tarball and change
into the resulting directory, then proceed as follows:
@@ -441,6 +509,13 @@ which requires you to run the last step as @code{root}. You have to specify
@code{--with-gnunet=/usr/local} if you installed GNUnet to @code{/usr/local} in the
previous step.
+Please note that unlike most packages, if you want to run the @code{make check}
+command, you should run it only `after' having done @code{make install}. The
+latter ensures that necessary binaries are copied to the right place.
+
+In any case, if @code{make check} fails, please consider filing a
+bug report with the Taler bug tracker@footnote{https://bugs.taler.net}.
+
@node Installing the GNU Taler binary packages on Debian,Installing the GNU Taler binary packages on Ubuntu,Installing from source,Installation
@anchor{taler-auditor-manual installing-the-gnu-taler-binary-packages-on-debian}@anchor{9}
@section Installing the GNU Taler binary packages on Debian
@@ -448,60 +523,28 @@ previous step.
To install the GNU Taler Debian packages, first ensure that you have
the right Debian distribution. At this time, the packages are built for
-Sid, which means you should use a system which at least includes
-unstable packages in its source list. We recommend using APT pinning
-to limit unstable packages to those explicitly requested. To do this,
-set your @code{/etc/apt/preferences} as follows:
+Debian bookworm.
-@example
-Package: *
-Pin: release a=stable
-Pin-Priority: 700
-
-Package: *
-Pin: release a=testing
-Pin-Priority: 650
-
-Package: *
-Pin: release a=unstable
-Pin-Priority: 600
-
-Package: *
-Pin: release l=Debian-Security
-Pin-Priority: 1000
-@end example
-
-A typical @code{/etc/apt/sources.list} file for this setup
-which combines Debian stable with more recent packages
-from testing and unstable would look like this:
-
-@example
-deb http://ftp.ch.debian.org/debian/ buster main
-deb http://security.debian.org/debian-security buster/updates main
-deb http://ftp.ch.debian.org/debian/ testing main
-deb http://ftp.ch.debian.org/debian/ unstable main
-@end example
-
-Naturally, you may want to use different mirrors depending on your region.
-Additionally, you must add a file to import the GNU Taler packages. Typically,
+You need to add a file to import the GNU Taler packages. Typically,
this is done by adding a file @code{/etc/apt/sources.list.d/taler.list} that
looks like this:
@example
-deb https://deb.taler.net/apt/debian sid main
+deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/debian bookworm main
@end example
Next, you must import the Taler Systems SA public package signing key
into your keyring and update the package lists:
@example
-# wget -O - https://taler.net/taler-systems.gpg.key | apt-key add -
+# wget -O /etc/apt/keyrings/taler-systems.gpg \
+ https://taler.net/taler-systems.gpg
# apt update
@end example
@cartouche
@quotation Note
-You may want to verify the correctness of the Taler Systems key out-of-band.
+You may want to verify the correctness of the Taler Systems SA key out-of-band.
@end quotation
@end cartouche
@@ -527,22 +570,35 @@ Sample configuration files for the HTTP reverse proxy can be found in
To install the GNU Taler Ubuntu packages, first ensure that you have
the right Ubuntu distribution. At this time, the packages are built for
-Ubuntu 20.04 LTS (Focal Fossa).
+Ubuntu Lunar and Ubuntu Jammy. Make sure to have @code{universe} in your
+@code{/etc/apt/sources.list} (after @code{main}) as we depend on some packages
+from Ubuntu @code{universe}.
A typical @code{/etc/apt/sources.list.d/taler.list} file for this setup
-would look like this:
+would look like this for Ubuntu Lunar:
+
+@example
+deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/ubuntu/ lunar taler-lunar
+@end example
+
+For Ubuntu Mantic use this instead:
@example
-deb https://deb.taler.net/apt/ubuntu/ focal-fossa main
+deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/ubuntu/ mantic taler-mantic
@end example
-The last line is crucial, as it adds the GNU Taler packages.
+For Ubuntu Noble use this instead:
+
+@example
+deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/ubuntu/ noble taler-noble
+@end example
Next, you must import the Taler Systems SA public package signing key
into your keyring and update the package lists:
@example
-# wget -O - https://taler.net/taler-systems.gpg.key | apt-key add -
+# wget -O /etc/apt/keyrings/taler-systems.gpg \
+ https://taler.net/taler-systems.gpg
# apt update
@end example
@@ -609,7 +665,7 @@ auditor-ingres — imports database from exchange production system
auditor-wire — imports wire transfer data from bank production system
@item
-offline — manages the offline key, on a separate @emph{offline} machine
+offline — manages the offline key, on a separate `offline' machine
@end itemize
@end quotation
@@ -632,7 +688,7 @@ distribution would typically create for you):
www-data — runs the HTTPS frontend (usually nginx or Apache)
@item
-postgres — runs the Postgres database
+postgres — runs the PostgreSQL database
@end itemize
@end quotation
@@ -662,7 +718,7 @@ libeufin — local state of the auditor-wire tool for the bank transfer data imp
@end itemize
@end quotation
-As the @emph{postgres} user, you can create these databases using:
+As the `postgres' user, you can create these databases using:
@example
# As the 'postgres' user:
@@ -696,30 +752,42 @@ This section discusses configuration options related to the auditor.
@menu
* Configuration format::
-* Using taler-config::
* Initial configuration::
* Keys::
* Configuring the auditor’s REST endpoint::
* Bank account::
* Database::
+* Legal conditions for using the service::
+* Terms of Service::
+* Privacy Policy::
+* Legal policies directory layout::
+* Generating the Legal Terms::
+* Adding translations::
+* Updating legal documents::
@end menu
-@node Configuration format,Using taler-config,,Configuration
+@node Configuration format,Initial configuration,,Configuration
@anchor{taler-auditor-manual configuration-format}@anchor{f}
@section Configuration format
-In Taler realm, any component obeys to the same pattern to get
-configuration values. According to this pattern, once the component has
-been installed, the installation deploys default values in
-$@{prefix@}/share/taler/config.d/, in .conf files. In order to override
-these defaults, the user can write a custom .conf file and either pass
-it to the component at execution time, or name it taler.conf and place
-it under $HOME/.config/.
+All GNU Taler components are designed to possibly share the same
+configuration files. When installing a GNU Taler component, the
+installation deploys default values in configuration files located
+at $@{prefix@}/share/taler/config.d/ where $@{prefix@} is the installation
+prefix. Different components must be installed to the same prefix.
+
+In order to override these defaults, the user can write a custom configuration
+file and either pass it to the component at execution time using the `-c'
+option, or name it taler.conf and place it under $HOME/.config/ which is where
+components will look by default. Note that the systemd service files pass @code{-c
+/etc/taler/taler.conf}, thus making @code{/etc/taler/taler.conf}
+the primary location for the configuration.
A config file is a text file containing sections, and each section
-contains its values. The right format follows:
+contains maps options to their values. Configuration files follow
+basically the INI syntax:
@example
[section1]
@@ -731,14 +799,18 @@ value21 = string
value22 = /path22
@end example
-Throughout any configuration file, it is possible to use @code{$}-prefixed
-variables, like @code{$VAR}, especially when they represent filesystem
-paths. It is also possible to provide defaults values for those
+Comments start with a hash (@code{#}). Throughout the configuration, it is
+possible to use @code{$}-substitution for options relating to names of files or
+directories. It is also possible to provide defaults values for those
variables that are unset, by using the following syntax:
-@code{$@{VAR:-default@}}. However, there are two ways a user can set
-@code{$}-prefixable variables:
+@code{$@{VAR:-default@}}. There are two ways a user can set the value
+of @code{$}-prefixable variables:
+
-by defining them under a @code{[paths]} section, see example below,
+@enumerate
+
+@item
+by defining them under a @code{[paths]} section:
@example
[paths]
@@ -748,93 +820,28 @@ TALER_DEPLOYMENT_SHARED = $@{HOME@}/shared-data
path-x = $@{TALER_DEPLOYMENT_SHARED@}/x
@end example
+@item
or by setting them in the environment:
@example
$ export VAR=/x
@end example
+@end enumerate
The configuration loader will give precedence to variables set under
-@code{[path]}, though.
+@code{[path]} over environment variables.
-The utility @code{taler-config}, which gets installed along with the
-exchange, serves to get and set configuration values without directly
-editing the .conf. The option @code{-f} is particularly useful to resolve
+The utility @code{taler-config}, which gets installed along with the exchange,
+can be used get and set configuration values without directly editing the
+configuration file. The option @code{-f} is particularly useful to resolve
pathnames, when they use several levels of @code{$}-expanded variables. See
@code{taler-config --help}.
-Note that, in this stage of development, the file
-@code{$HOME/.config/taler.conf} can contain sections for @emph{all} the
-component. For example, both an exchange and a bank can read values from
-it.
-
-The repository @code{git://taler.net/deployment} contains examples of
-configuration file used in our demos. See under @code{deployment/config}.
-
-@quotation
-
-@strong{Note}
+The repository @code{git://git.taler.net/deployment} contains example code
+for generating configuration files under @code{deployment/netzbon/}.
-Expectably, some components will not work just by using default
-values, as their work is often interdependent. For example, a
-merchant needs to know an exchange URL, or a database name.
-@end quotation
-
-@node Using taler-config,Initial configuration,Configuration format,Configuration
-@anchor{taler-auditor-manual using-taler-config}@anchor{10}
-@section Using taler-config
-
-
-The tool @code{taler-config} can be used to extract or manipulate
-configuration values; however, the configuration use the well-known INI
-file format and can also be edited by hand.
-
-Run
-
-@example
-$ taler-config -s $SECTION
-@end example
-
-to list all of the configuration values in section @code{$SECTION}.
-
-Run
-
-@example
-$ taler-config -s $section -o $option
-@end example
-
-to extract the respective configuration value for option @code{$option} in
-section @code{$section}.
-
-Finally, to change a setting, run
-
-@example
-$ taler-config -s $section -o $option -V $value
-@end example
-
-to set the respective configuration value to @code{$value}. Note that you
-have to manually restart the Taler backend after you change the
-configuration to make the new configuration go into effect.
-
-Some default options will use $-variables, such as @code{$DATADIR} within
-their value. To expand the @code{$DATADIR} or other $-variables in the
-configuration, pass the @code{-f} option to @code{taler-config}. For example,
-compare:
-
-@example
-$ taler-config -s ACCOUNT-bank \
- -o WIRE_RESPONSE
-$ taler-config -f -s ACCOUNT-bank \
- -o WIRE_RESPONSE
-@end example
-
-While the configuration file is typically located at
-@code{$HOME/.config/taler.conf}, an alternative location can be specified
-to @code{taler-merchant-httpd} and @code{taler-config} using the @code{-c}
-option.
-
-@node Initial configuration,Keys,Using taler-config,Configuration
-@anchor{taler-auditor-manual initial-configuration}@anchor{11}@anchor{taler-auditor-manual setupbaseurl}@anchor{12}
+@node Initial configuration,Keys,Configuration format,Configuration
+@anchor{taler-auditor-manual initial-configuration}@anchor{10}@anchor{taler-auditor-manual setupbaseurl}@anchor{11}
@section Initial configuration
@@ -843,7 +850,8 @@ REST API of the auditor will be available to the public:
@example
# Both for the 'offline' *and* the 'auditor' user:
-$ taler-config -s auditor -o BASE_URL -V https://auditor.example.com/
+[auditor]
+BASE_URL = https://auditor.example.com/
@end example
The @code{helper} user that is used to download information from the exchange
@@ -855,18 +863,19 @@ and configure these:
@example
# As the 'helper' and 'offline' users:
-$ taler-config -s exchange -o BASE_URL -V https://exchange.example.com/
-$ taler-config -s exchange -o MASTER_PUBLIC_KEY -V $SOMELONGBASE32VALUEHERE
+[exchange]
+BASE_URL = https://exchange.example.com/
+MASTER_PUBLIC_KEY = $SOMELONGBASE32VALUEHERE
@end example
@node Keys,Configuring the auditor’s REST endpoint,Initial configuration,Configuration
-@anchor{taler-auditor-manual auditorkeys}@anchor{13}@anchor{taler-auditor-manual keys}@anchor{14}
+@anchor{taler-auditor-manual auditorkeys}@anchor{12}@anchor{taler-auditor-manual keys}@anchor{13}
@section Keys
The auditor works with one signing key to certify that it is auditing
a particular exchange’s denomination keys. This key can and should
-be kept @emph{offline} (and backed up adequately). As with the exchange’s
+be kept `offline' (and backed up adequately). As with the exchange’s
offline key, it is only used for a few cryptographic signatures and
thus the respective code can be run on modest hardware, like a
Raspberry Pi.
@@ -904,11 +913,12 @@ You can set this configuration value using:
@example
# As the 'auditor' and 'helper' users:
-$ taler-config -s auditor -o PUBLIC_KEY -V $SOMELONGBASE32VALUEHERE
+[auditor]
+PUBLIC_KEY = $SOMELONGBASE32VALUEHERE
@end example
@node Configuring the auditor’s REST endpoint,Bank account,Keys,Configuration
-@anchor{taler-auditor-manual auditorserving}@anchor{15}@anchor{taler-auditor-manual configuring-the-auditor-s-rest-endpoint}@anchor{16}
+@anchor{taler-auditor-manual auditorserving}@anchor{14}@anchor{taler-auditor-manual configuring-the-auditor-s-rest-endpoint}@anchor{15}
@section Configuring the auditor’s REST endpoint
@@ -936,7 +946,7 @@ for @code{unixpath} (i.e. 660 = @code{rw-rw----}).
@end itemize
@node Bank account,Database,Configuring the auditor’s REST endpoint,Configuration
-@anchor{taler-auditor-manual auditorbank-account}@anchor{17}@anchor{taler-auditor-manual bank-account}@anchor{18}
+@anchor{taler-auditor-manual auditorbank-account}@anchor{16}@anchor{taler-auditor-manual bank-account}@anchor{17}
@section Bank account
@@ -944,8 +954,8 @@ Bank accounts for the auditor (user @code{auditor-wire}) are configured in
exactly the same way as bank accounts for the exchange. See the exchange (and
LibEuFin) documentation for details.
-@node Database,,Bank account,Configuration
-@anchor{taler-auditor-manual auditordatabaseconfiguration}@anchor{19}@anchor{taler-auditor-manual database}@anchor{1a}
+@node Database,Legal conditions for using the service,Bank account,Configuration
+@anchor{taler-auditor-manual auditordatabaseconfiguration}@anchor{18}@anchor{taler-auditor-manual database}@anchor{19}
@section Database
@@ -1000,11 +1010,250 @@ CONFIG = postgres:///exchangedemo
@end example
@end quotation
+@node Legal conditions for using the service,Terms of Service,Database,Configuration
+@anchor{taler-auditor-manual legal-conditions-for-using-the-service}@anchor{1a}
+@section Legal conditions for using the service
+
+
+@c This file is part of GNU TALER.
+@c
+@c Copyright (C) 2014-2023 Taler Systems SA
+@c
+@c TALER is free software; you can redistribute it and/or modify it under the
+@c terms of the GNU Affero General Public License as published by the Free Software
+@c Foundation; either version 2.1, or (at your option) any later version.
+@c
+@c TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+@c WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+@c A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+@c
+@c You should have received a copy of the GNU Affero General Public License along with
+@c TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+@c
+@c @author Christian Grothoff
+
+The service has well-known API endpoints to return its legal conditions to the
+user in various languages and various formats. This section describes how to
+setup and configure the legal conditions.
+
+@node Terms of Service,Privacy Policy,Legal conditions for using the service,Configuration
+@anchor{taler-auditor-manual terms-of-service}@anchor{1b}
+@section Terms of Service
+
+
+The service has an endpoint “/terms” to return the terms of service (in legal
+language) of the service operator. Client software show these terms of
+service to the user when the user is first interacting with the service.
+Terms of service are optional for experimental deployments, if none are
+configured, the service will return a simple statement saying that there are
+no terms of service available.
+
+To configure the terms of service response, there are two options
+in the configuration file for the service:
+
+
+@itemize -
+
+@item
+@code{TERMS_ETAG}: The current “Etag” to return for the terms of service.
+This value must be changed whenever the terms of service are
+updated. A common value to use would be a version number.
+Note that if you change the @code{TERMS_ETAG}, you MUST also provide
+the respective files in @code{TERMS_DIR} (see below).
+
+@item
+@code{TERMS_DIR}: The directory that contains the terms of service.
+The files in the directory must be readable to the service
+process.
+@end itemize
+
+@node Privacy Policy,Legal policies directory layout,Terms of Service,Configuration
+@anchor{taler-auditor-manual privacy-policy}@anchor{1c}
+@section Privacy Policy
+
+
+The service has an endpoint “/pp” to return the terms privacy policy (in legal
+language) of the service operator. Clients should show the privacy policy to
+the user when the user explicitly asks for it, but it should not be shown by
+default. Privacy policies are optional for experimental deployments, if none
+are configured, the service will return a simple statement saying that there
+is no privacy policy available.
+
+To configure the privacy policy response, there are two options
+in the configuration file for the service:
+
+
+@itemize -
+
+@item
+@code{PRIVACY_ETAG}: The current “Etag” to return for the privacy policy.
+This value must be changed whenever the privacy policy is
+updated. A common value to use would be a version number.
+Note that if you change the @code{PRIVACY_ETAG}, you MUST also provide
+the respective files in @code{PRIVACY_DIR} (see below).
+
+@item
+@code{PRIVACY_DIR}: The directory that contains the privacy policy.
+The files in the directory must be readable to the service
+process.
+@end itemize
+
+@node Legal policies directory layout,Generating the Legal Terms,Privacy Policy,Configuration
+@anchor{taler-auditor-manual legal-policies-directory-layout}@anchor{1d}
+@section Legal policies directory layout
+
+
+The @code{TERMS_DIR} and @code{PRIVACY_DIR} directory structures must follow a
+particular layout. You may use the same directory for both the terms of
+service and the privacy policy, as long as you use different ETAGs. Inside of
+the directory, there should be sub-directories using two-letter language codes
+like “en”, “de”, or “jp”. Each of these directories would then hold
+translations of the current terms of service into the respective language.
+Empty directories are permitted in case translations are not available.
+
+Then, inside each language directory, files with the name of the value set as
+the @code{TERMS_ETAG} or @code{PRIVACY_ETAG} must be provided. The extension of each
+of the files should be typical for the respective mime type. The set of
+supported mime types is currently hard-coded in the service, and includes
+“.epub”, “.html”, “.md”, “.pdf” and “.txt” files. If other files are present,
+the service may show a warning on startup.
+
+@menu
+* Example::
+
+@end menu
+
+@node Example,,,Legal policies directory layout
+@anchor{taler-auditor-manual example}@anchor{1e}
+@subsection Example
+
+
+A sample file structure for a @code{TERMS_ETAG} of “tos-v0” would be:
+
+
+@itemize -
+
+@item
+TERMS_DIR/en/tos-v0.txt
+
+@item
+TERMS_DIR/en/tos-v0.html
+
+@item
+TERMS_DIR/en/tos-v0.pdf
+
+@item
+TERMS_DIR/en/tos-v0.epub
+
+@item
+TERMS_DIR/en/tos-v0.md
+
+@item
+TERMS_DIR/de/tos-v0.txt
+
+@item
+TERMS_DIR/de/tos-v0.html
+
+@item
+TERMS_DIR/de/tos-v0.pdf
+
+@item
+TERMS_DIR/de/tos-v0.epub
+
+@item
+TERMS_DIR/de/tos-v0.md
+@end itemize
+
+If the user requests an HTML format with language preferences “fr” followed by
+“en”, the service would return @code{TERMS_DIR/en/tos-v0.html} lacking a version in
+French.
+
+@node Generating the Legal Terms,Adding translations,Legal policies directory layout,Configuration
+@anchor{taler-auditor-manual generating-the-legal-terms}@anchor{1f}
+@section Generating the Legal Terms
+
+
+The @code{taler-terms-generator} script can be used to generate directories with
+terms of service and privacy policies in multiple languages and all required
+data formats from a single source file in @code{.rst} format and GNU gettext
+translations in @code{.po} format.
+
+To use the tool, you need to first write your legal conditions in English in
+reStructuredText (rst). You should find a templates in
+@code{$PREFIX/share/terms/*.rst} where @code{$PREFIX} is the location where you
+installed the service to. Whenever you make substantive changes to the legal
+terms, you must use a fresh filename and change the respective @code{ETAG}. The
+resulting file must be called @code{$ETAG.rst} and the first line of the file should be the title of the document.
+
+Once you have written the @code{$ETAG.rst} file in English, you can
+generate the first set of outputs:
+
+@example
+$ taler-terms-generator -i $ETAG
+@end example
+
+Afterwards, you should find the terms in various formats for all configured
+languages (initially only English) in @code{$PREFIX/share/terms/}. The generator
+has a few options which are documented in its man page.
+
+@node Adding translations,Updating legal documents,Generating the Legal Terms,Configuration
+@anchor{taler-auditor-manual adding-translations}@anchor{20}
+@section Adding translations
+
+
+Translations must be available in subdirectories
+@code{locale/$LANGUAGE/LC_MESSAGES/$ETAG.po}.
+To start translating, you first need to add a new
+language:
+
+@example
+$ taler-terms-generator -i $ETAG -l $LANGUAGE
+@end example
+
+Here, @code{$LANGUAGE} should be a two-letter language
+code like @code{de} or @code{fr}. The command will generate
+a file @code{locale/$LANGUAGE/LC_MESSAGES/$ETAG.po}
+which contains each English sentence or paragraph
+in the original document and an initially empty
+translation. Translators should update the @code{.po}
+file. Afterwards, simply re-run
+
+@example
+$ taler-terms-generator -i $ETAG
+@end example
+
+to make the current translation(s) available to the
+service.
+
+@cartouche
+@quotation Note
+You must restart the service whenever adding or updating legal documents or their translations.
+@end quotation
+@end cartouche
+
+@node Updating legal documents,,Adding translations,Configuration
+@anchor{taler-auditor-manual updating-legal-documents}@anchor{21}
+@section Updating legal documents
+
+
+When making minor changes without legal implications, edit the @code{.rst} file,
+then re-run the step to add a new language for each existing translation to
+produce an updated @code{.po} file. Translate the sentences that have changed and
+finally run the generator (without @code{-l}) on the ETAG (@code{-i $ETAG}) to
+create the final files.
+
+When making major changes with legal implications, you should first rename (or
+copy) the existing @code{.rst} file and the associated translation files to a new
+unique name. Afterwards, make the major changes, update the @code{.po} files,
+complete the translations and re-create the final files. Finally, do not
+forget to update the @code{ETAG} configuration option to the new name and to
+restart the service.
+
@node Deployment,Operation,Configuration,Top
-@anchor{taler-auditor-manual auditordeployment}@anchor{1b}@anchor{taler-auditor-manual deployment}@anchor{1c}
+@anchor{taler-auditor-manual auditordeployment}@anchor{22}@anchor{taler-auditor-manual deployment}@anchor{23}
@chapter Deployment
-@anchor{taler-auditor-manual wallets}@anchor{1d}
+@anchor{taler-auditor-manual wallets}@anchor{24}
Before GNU Taler wallets will happily interact with an exchange, the
respective auditor’s public key (as obtained via @code{taler-auditor-offline
setup} from the @code{offline} user) must be added under the respective currency
@@ -1024,7 +1273,7 @@ FIXME-DOLD: explain how that Web page works, once it works…
@end menu
@node Exchange,Signing Denominations,,Deployment
-@anchor{taler-auditor-manual auditorexchange}@anchor{1e}@anchor{taler-auditor-manual exchange}@anchor{1f}
+@anchor{taler-auditor-manual auditorexchange}@anchor{25}@anchor{taler-auditor-manual exchange}@anchor{26}
@section Exchange
@@ -1049,13 +1298,13 @@ auditors of the exchange. For details, see Auditor-configuration in the
exchange operator manual.
@node Signing Denominations,Database<2>,Exchange,Deployment
-@anchor{taler-auditor-manual signing-denominations}@anchor{20}@anchor{taler-auditor-manual signingdenominations}@anchor{21}
+@anchor{taler-auditor-manual signing-denominations}@anchor{27}@anchor{taler-auditor-manual signingdenominations}@anchor{28}
@section Signing Denominations
@geindex maintenance
-These steps must be performed @emph{regularly} whenever the exchange is
+These steps must be performed `regularly' whenever the exchange is
deploying new denomination keys. After the exchange operator
has signed new keys using the @code{taler-exchange-offline} tool,
each auditor should run:
@@ -1112,17 +1361,17 @@ Commands, like @code{taler-auditor-offline}, that support the @code{-l LOGFILE}
command-line option, send logging output to standard error by default.
@node Database<2>,,Signing Denominations,Deployment
-@anchor{taler-auditor-manual auditordatabaseinitialization}@anchor{22}@anchor{taler-auditor-manual id1}@anchor{23}
+@anchor{taler-auditor-manual auditordatabaseinitialization}@anchor{29}@anchor{taler-auditor-manual id1}@anchor{2a}
@section Database
The next key step for the auditor is to configure replication of the
-@emph{exchange}’s database in-house. This should be performed in two steps
+`exchange'’s database in-house. This should be performed in two steps
as illustrated in the following figure:
@image{taler-auditor-figures/replication,,,,png}
-First, the exchange should use standard Postgres replication features to
+First, the exchange should use standard PostgreSQL replication features to
enable the auditor to obtain a full copy of the exchange’s database.
Second, the auditor should make a “trusted” local copy, ensuring that it
never replicates malicious changes using @code{taler-auditor-sync}. Both
@@ -1132,7 +1381,7 @@ We note that as a result of these steps, the auditor will have three
databases: its own production primary database (as configured in
@code{auditordb-postgres}), its on production copy of the exchange’s database
(@code{exchangedb-postgress}), and a third, untrusted “ingres” copy of the
-exchange database. The untrusted database should run as a separate Postgres
+exchange database. The untrusted database should run as a separate PostgreSQL
instance and is only accessed via @code{taler-auditor-sync} and the replication
mechanism driven by the exchange operator.
@@ -1143,7 +1392,7 @@ mechanism driven by the exchange operator.
@end menu
@node Ingres replication of the exchange production database,Safe replication of the ingres database into the auditor production database,,Database<2>
-@anchor{taler-auditor-manual ingres-replication-of-the-exchange-production-database}@anchor{24}
+@anchor{taler-auditor-manual ingres-replication-of-the-exchange-production-database}@anchor{2b}
@subsection Ingres replication of the exchange production database
@@ -1151,7 +1400,7 @@ Ingres operation should be done using the @code{auditor-ingres} user — or
depending on the setup parts of the operation may be done by the @code{postgres}
user directly.
-The full copy can be obtained in various ways with Postgres. It is
+The full copy can be obtained in various ways with PostgreSQL. It is
possible to use log shipping with streaming replication as described
in @indicateurl{https://www.postgresql.org/docs/13/warm-standby.html}, or to use
logical replication, as described in
@@ -1160,7 +1409,7 @@ that asynchronous replication should suffice.
The resulting auditor database should be treated as read-only on the auditor
side. The @code{taler-exchange-dbinit} tool can be used to setup the schema, or
-the schema can be replicated using Postgres’s standard mechanisms. The same
+the schema can be replicated using PostgreSQL’s standard mechanisms. The same
applies for schema upgrades: if logical replication is used (which does not
replicate schema changes), @code{taler-exchange-dbinit} can be used to migrate
the schema(s) in both the ingres and production copies of the exchange’s
@@ -1177,14 +1426,14 @@ $ echo "CREATE PUBLICATION $NAME FOR ALL TABLES;" | psql taler-exchange
@end example
The exchange must share the password of the publication with the auditor. A
-good @code{$NAME} relates to the auditor’s buisness unit name. A secure tunnel
+good @code{$NAME} relates to the auditor’s business unit name. A secure tunnel
must be setup between the exchange and the auditor, for example using SSH or
Wireguard.
It is also necessary to edit @code{main.cf} of the exchange and on the auditor
side to enable logical replication. If an exchange has multiple auditors, it
should setup multiple @code{egress} accounts. The exchange must ensure that
-the following lines are in the @code{main.cf} Postgres configuaration (the port
+the following lines are in the @code{main.cf} PostgreSQL configuration (the port
may differ) to enable replication over the network:
@example
@@ -1194,7 +1443,7 @@ wal_level= logical
@end example
Equally, the auditor must configure logical replication in the @code{main.cf}
-Postgres configuaration:
+PostgreSQL configuration:
@example
wal_level= logical
@@ -1204,9 +1453,15 @@ Next, the @code{postgres} user of the auditor’s system must first initialize t
local tables:
@example
+# Configure database:
+[exchange]
+DB = "postgres"
+[exchangedb-postgres]
+CONFIG = "postgres:///taler-ingress"
+@end example
+
+@example
# As the 'ingress' user of the exchange:
-$ taler-config -s exchange -o DB -V "postgres"
-$ taler-config -s exchangedb-postgres -o CONFIG -V "postgres:///taler-ingress"
$ taler-exchange-dbinit
@end example
@@ -1220,7 +1475,7 @@ $ echo "ALTER ROLE egress WITH PASSWORD '$PASSWORD'; | psql
$ echo "CREATE PUBLICATION $NAME FOR ALL TABLES;" | psql taler-exchange
@end example
-For details, we refer to the Postgres manual.
+For details, we refer to the PostgreSQL manual.
@cartouche
@quotation Note
@@ -1229,15 +1484,15 @@ unexpected changes to the schema or perform @code{UPDATE}, @code{DELETE} or
@code{DROP} operations on the tables. Hence, the auditor cannot rely upon the
exchange’s primary copy to respect schema constraints, especially as we
have to presume that the exchange could act maliciously. Furthermore, it
-is unclear to what degree Postgres database replication mechanisms are
+is unclear to what degree PostgreSQL database replication mechanisms are
robust against a malicious master database. Thus, the auditor should
-isolate its primary copy of the exchange database, including the Postgres
+isolate its primary copy of the exchange database, including the PostgreSQL
process, from its actual operational data.
@end quotation
@end cartouche
@node Safe replication of the ingres database into the auditor production database,,Ingres replication of the exchange production database,Database<2>
-@anchor{taler-auditor-manual safe-replication-of-the-ingres-database-into-the-auditor-production-database}@anchor{25}
+@anchor{taler-auditor-manual safe-replication-of-the-ingres-database-into-the-auditor-production-database}@anchor{2c}
@subsection Safe replication of the ingres database into the auditor production database
@@ -1254,7 +1509,7 @@ While @code{taler-auditor-sync} could in theory be run directly against the
exchange’s production system, this is likely a bad idea due to the high
latency from the network between auditor and exchange operator. Thus, we
recommend first making an “untrusted” ingress copy of the exchange’s
-production database using standard Postgres tooling, and then using
+production database using standard PostgreSQL tooling, and then using
@code{taler-auditor-sync} to create a second “safe” copy. The “safe” copy used
by the production system should also run under a different UID.
@@ -1270,9 +1525,15 @@ To run @code{taler-auditor-sync}, you must first configure two configuration
files that identify the source and destination databases:
@example
-# As the 'sync' user:
-$ taler-config -c src.conf -s exchangedb -o CONFIG -V "postgres:///auditor-ingres/"
-$ taler-config -c dst.conf -s exchangedb -o CONFIG -V "postgres:///auditor/"
+# src.conf
+[exchangedb]
+CONFIG = "postgres:///auditor-ingres/"
+@end example
+
+@example
+# dst.conf
+[exchangedb]
+CONFIG = "postgres:///auditor/"
@end example
Now you should be able to launch the synchronization process. You can run
@@ -1295,7 +1556,7 @@ auditor’s production copy. We note that this does not have to be done
at the same time when the exchange runs its garbage collection.
@node Operation,Auditor implementation guide,Deployment,Top
-@anchor{taler-auditor-manual id2}@anchor{26}@anchor{taler-auditor-manual operation}@anchor{27}
+@anchor{taler-auditor-manual id2}@anchor{2d}@anchor{taler-auditor-manual operation}@anchor{2e}
@chapter Operation
@@ -1311,7 +1572,7 @@ at the same time when the exchange runs its garbage collection.
@end menu
@node Web service,Audit,,Operation
-@anchor{taler-auditor-manual id3}@anchor{28}@anchor{taler-auditor-manual web-service}@anchor{29}
+@anchor{taler-auditor-manual id3}@anchor{2f}@anchor{taler-auditor-manual web-service}@anchor{30}
@section Web service
@@ -1328,7 +1589,7 @@ As the @code{taler-auditor-httpd} does not include HTTPS-support, it is
advisable to run it behind a reverse proxy that offers TLS termination.
@node Audit,Reading the report,Web service,Operation
-@anchor{taler-auditor-manual audit}@anchor{2a}@anchor{taler-auditor-manual id4}@anchor{2b}
+@anchor{taler-auditor-manual audit}@anchor{31}@anchor{taler-auditor-manual id4}@anchor{32}
@section Audit
@@ -1363,7 +1624,7 @@ interactions with the bank (which may not even have the wire transfer records
anymore), this is not recommended in a production setup.
@node Reading the report,Database upgrades,Audit,Operation
-@anchor{taler-auditor-manual reading-the-report}@anchor{2c}
+@anchor{taler-auditor-manual reading-the-report}@anchor{33}
@section Reading the report
@@ -1399,7 +1660,7 @@ Configuration issues (such was wire fees unavailable).
@end itemize
@node Database upgrades,Database reset,Reading the report,Operation
-@anchor{taler-auditor-manual auditordatabaseupgrades}@anchor{2d}@anchor{taler-auditor-manual database-upgrades}@anchor{2e}
+@anchor{taler-auditor-manual auditordatabaseupgrades}@anchor{34}@anchor{taler-auditor-manual database-upgrades}@anchor{35}
@section Database upgrades
@@ -1425,7 +1686,7 @@ halting the exchange business logic,
@item
allowing the replication and @code{taler-auditor-sync} to complete
-(see also the @strong{-t} option of @code{taler-auditor-sync})
+(see also the `-t' option of @code{taler-auditor-sync})
@item
completing a @code{taler-audit} run against the old schema
@@ -1454,7 +1715,7 @@ Regardless, the above is merely the general rule. Please review the specific
release notes to ensure this procedure is correct for the specific upgrade.
@node Database reset,Revocations,Database upgrades,Operation
-@anchor{taler-auditor-manual database-reset}@anchor{2f}
+@anchor{taler-auditor-manual database-reset}@anchor{36}
@section Database reset
@@ -1465,14 +1726,14 @@ $ taler-auditor-dbinit -R
@end example
However, running this command will result in all data in the database being
-@emph{lost}, including steps like enabling an exchange using
+`lost', including steps like enabling an exchange using
@code{taler-auditor-exchange}. Thus, doing so may result in significant
commputation (and bandwidth consumption with the bank) when the auditor is
next launched, as it will re-download and re-verify all historic transactions.
Hence this should not be done in a production system.
@node Revocations,Failures,Database reset,Operation
-@anchor{taler-auditor-manual auditorrevocations}@anchor{30}@anchor{taler-auditor-manual revocations}@anchor{31}
+@anchor{taler-auditor-manual auditorrevocations}@anchor{37}@anchor{taler-auditor-manual revocations}@anchor{38}
@section Revocations
@@ -1490,7 +1751,7 @@ additional information to demonstrate that these coins were not forged from
the compromised private key but obtained via a legitimate withdraw operation.
@node Failures,,Revocations,Operation
-@anchor{taler-auditor-manual failures}@anchor{32}
+@anchor{taler-auditor-manual failures}@anchor{39}
@section Failures
@@ -1502,12 +1763,12 @@ concerns arithmetic overflows for amounts. Taler’s specification limits amount
values to at most 2^52. If, during the auditor’s calculations, amounts are
encountered that exceed this threshold, the auditor will not generate a regular
report, but instead write a log statement explaining where the problem happened
-and exit with a status code of @emph{42}.
+and exit with a status code of `42'.
The most common expected case when this happens is a corrupted database. This
could be because the exchange is actively malicious, or more likely due to
some data corruption. The audit cannot continue until the corruption has been
-addressed. If it is not possible to restore a fully @emph{correct} version of the
+addressed. If it is not possible to restore a fully `correct' version of the
database, the suggestion is to replace the corrupted (and likely very large)
amounts with zero (Note: this does not apply to the value of denominations or
fees, here it is crucial that the correct amounts are restored). While an
@@ -1516,14 +1777,14 @@ calculations with zero instead.
After patching the database, the audit can
be restarted. A full reset is not required, as the audit transaction is aborted
-when the auditor exits with code @emph{42}. After restarting, the resulting audit
+when the auditor exits with code `42'. After restarting, the resulting audit
report is likely to indicates errors relating to the corrupted fields (such as
invalid signatures, arithmetic errors by the exchange, etc.), but at least the
loss/gain calculations will be meaningful and actually indicative of the scope
of the error created by the corrupted data.
@node Auditor implementation guide,Index,Operation,Top
-@anchor{taler-auditor-manual auditor-implementation-guide}@anchor{33}
+@anchor{taler-auditor-manual auditor-implementation-guide}@anchor{3a}
@chapter Auditor implementation guide
@@ -1555,7 +1816,7 @@ JSON reports into LaTeX and then into PDF.
@end menu
@node The auditor’s database,Invariants checked by the auditor,,Auditor implementation guide
-@anchor{taler-auditor-manual the-auditor-s-database}@anchor{34}
+@anchor{taler-auditor-manual the-auditor-s-database}@anchor{3b}
@section The auditor’s database
@@ -1564,7 +1825,7 @@ The database scheme used by the exchange looks as follows:
@image{taler-auditor-figures/auditor-db,,,,png}
@node Invariants checked by the auditor,Testing the auditor,The auditor’s database,Auditor implementation guide
-@anchor{taler-auditor-manual invariants-checked-by-the-auditor}@anchor{35}
+@anchor{taler-auditor-manual invariants-checked-by-the-auditor}@anchor{3c}
@section Invariants checked by the auditor
@@ -1584,7 +1845,7 @@ pass where it might seem applicable.
@end menu
@node Invariants checked by the taler-helper-auditor-aggregation,Invariants checked by the taler-helper-auditor-coins,,Invariants checked by the auditor
-@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-aggregation}@anchor{36}
+@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-aggregation}@anchor{3d}
@subsection Invariants checked by the taler-helper-auditor-aggregation
@@ -1696,7 +1957,7 @@ wire fee unavailable for given time
@end itemize
@node Invariants checked by the taler-helper-auditor-coins,Invariants checked by the taler-helper-auditor-deposits,Invariants checked by the taler-helper-auditor-aggregation,Invariants checked by the auditor
-@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-coins}@anchor{37}
+@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-coins}@anchor{3e}
@subsection Invariants checked by the taler-helper-auditor-coins
@@ -1792,7 +2053,7 @@ recoup, denomination not revoked
@end itemize
@node Invariants checked by the taler-helper-auditor-deposits,Invariants checked by the taler-helper-auditor-reserves,Invariants checked by the taler-helper-auditor-coins,Invariants checked by the auditor
-@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-deposits}@anchor{38}
+@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-deposits}@anchor{3f}
@subsection Invariants checked by the taler-helper-auditor-deposits
@@ -1802,7 +2063,7 @@ exchange at the auditor. This is to ensure that the exchange cannot defraud
merchants by simply not reporting deposits to the auditor.
@node Invariants checked by the taler-helper-auditor-reserves,Invariants checked by the taler-helper-auditor-wire,Invariants checked by the taler-helper-auditor-deposits,Invariants checked by the auditor
-@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-reserves}@anchor{39}
+@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-reserves}@anchor{40}
@subsection Invariants checked by the taler-helper-auditor-reserves
@@ -1863,12 +2124,12 @@ target account does not match origin account
@end itemize
@node Invariants checked by the taler-helper-auditor-wire,,Invariants checked by the taler-helper-auditor-reserves,Invariants checked by the auditor
-@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-wire}@anchor{3a}
+@anchor{taler-auditor-manual invariants-checked-by-the-taler-helper-auditor-wire}@anchor{41}
@subsection Invariants checked by the taler-helper-auditor-wire
This auditor is special in that it is the only pass that is required to have
-@emph{read-only} access to the exchange’s bank account (privilege separation). Its
+`read-only' access to the exchange’s bank account (privilege separation). Its
main role is to verify that the wire transfers in the exchange’s database and
those reported by the bank are identical.
@@ -1928,7 +2189,7 @@ closing fee above total amount
@end itemize
@node Testing the auditor,,Invariants checked by the auditor,Auditor implementation guide
-@anchor{taler-auditor-manual testing-the-auditor}@anchor{3b}
+@anchor{taler-auditor-manual testing-the-auditor}@anchor{42}
@section Testing the auditor