commit bfaa9235d27aba2be035d1ded1e7591597840f64
parent 7678ed74b144b28b1a8fca44eb9794d7f2286256
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 6 Apr 2025 23:48:18 +0200
fix challenger setup
Diffstat:
7 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/roles/challenger/files/etc/challenger/email-message-template.txt b/roles/challenger/files/etc/challenger/email-message-template.txt
@@ -0,0 +1 @@
+Please enter the PIN {{pin}} at {{challenger_url}} to verify your address.
diff --git a/roles/challenger/files/etc/challenger/sms-message-template.txt b/roles/challenger/files/etc/challenger/sms-message-template.txt
@@ -0,0 +1 @@
+Please enter the PIN {{pin}} at {{challenger_url}} to verify your address.
diff --git a/roles/challenger/tasks/pre-exchange.yml b/roles/challenger/tasks/pre-exchange.yml
@@ -250,6 +250,16 @@
src: etc/challenger/postal-message-template.txt
dest: /etc/challenger/postal-message-template.txt
+- name: Place SMS message template
+ copy:
+ src: etc/challenger/sms-message-template.txt
+ dest: /etc/challenger/sms-message-template.txt
+
+- name: Place email message template
+ copy:
+ src: etc/challenger/email-message-template.txt
+ dest: /etc/challenger/email-message-template.txt
+
- name: Place postal-challenger systemd service file
copy:
src: etc/systemd/system/postal-challenger-httpd.service
diff --git a/roles/challenger/templates/etc/challenger/challenger-email.conf.j2 b/roles/challenger/templates/etc/challenger/challenger-email.conf.j2
@@ -14,6 +14,9 @@ UNIXPATH_MODE = 666
# Example commands are challenger-send-{sms,email,post}.sh
AUTH_COMMAND = /usr/bin/challenger-send-email.sh
+# Name of a file with the message to send with the challenge.
+MESSAGE_TEMPLATE_FILE = /etc/challenger/email-message-template.txt
+
# Publicly visible base URL of the challenger.
# BASE_URL = https://example.com/
BASE_URL = https://email.challenger.{{ DOMAIN_NAME }}/
diff --git a/roles/challenger/templates/etc/challenger/challenger-sms.conf.j2 b/roles/challenger/templates/etc/challenger/challenger-sms.conf.j2
@@ -14,6 +14,9 @@ UNIXPATH_MODE = 666
# Example commands are challenger-send-{sms,email,post}.sh
AUTH_COMMAND = /usr/bin/challenger-send-sms.sh
+# Name of a file with the message to send with the challenge.
+MESSAGE_TEMPLATE_FILE = /etc/challenger/sms-message-template.txt
+
# Publicly visible base URL of the challenger.
# BASE_URL = https://example.com/
BASE_URL = https://sms.challenger.{{ DOMAIN_NAME }}/
diff --git a/roles/common_packages/files/setup-challenger-client-id-fact b/roles/common_packages/files/setup-challenger-client-id-fact
@@ -3,7 +3,8 @@
# Helper script, intented to be used by ansible
# to generate a fact file.
-if [[ $# < 4 ]]; then
+if [[ $# < 4 ]];
+then
echo "Usage: $0 <fact_file> <user> <conf> <client_secret> <url>" >&2
exit 1
fi
diff --git a/tops.conf b/tops.conf
@@ -0,0 +1,37 @@
+# Main entry point for the GNU Taler configuration.
+#
+# Structure:
+# - taler-exchange.conf is the main configuration entry point
+# used by all Taler components (the file you are currently
+# looking at.
+# - overrides.conf contains configuration overrides that are
+# set by some tools that help with the configuration,
+# and should not be edited by humans. Comments in this file
+# are not preserved.
+# - conf.d/ contains configuration files for
+# Taler components, which can be read by all
+# users of the system and are included by the main
+# configuration.
+# - secrets/ contains configuration snippets
+# with secrets for particular services.
+# These files should have restrictive permissions
+# so that only users of the relevant services
+# can read it. All files in it should end with
+# ".secret.conf".
+
+[exchange]
+
+CURRENCY = CHF
+CURRENCY_ROUND_UNIT = CHF:0.01
+TINY_AMOUNT = CHF:0.01
+
+# Here you MUST add the master public key of the offline system
+# which you can get using `taler-exchange-offline setup`.
+MASTER_PUBLIC_KEY = W91R2NPHGP9TD36EXCAWNTW63QHEED4P12SNTKPE1WD5YM6MVA40
+
+# Production MPUB is:
+# 9V0G82S7JQW2ZRYF7BMGKKQ1TNR1VNVXZJSNQ2VSDGWC80D9W0YG
+
+# Publicly visible base URL of the exchange.
+# BASE_URL = https://example.com/
+BASE_URL = https://exchange.taler-ops.ch/