summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-config-instances
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-04-28 11:40:15 +0200
committerMS <ms@taler.net>2021-04-28 11:40:15 +0200
commitb242d68ccb2abe790dc517e6ff41168277f0ffd4 (patch)
tree2bdac99b2f80683ab735b42ac372da7860b9595e /bin/taler-deployment-config-instances
parent8445a97d525eebaba3d7008f9bc15624446736b1 (diff)
downloaddeployment-b242d68ccb2abe790dc517e6ff41168277f0ffd4.tar.gz
deployment-b242d68ccb2abe790dc517e6ff41168277f0ffd4.tar.bz2
deployment-b242d68ccb2abe790dc517e6ff41168277f0ffd4.zip
config each instance with API token
Diffstat (limited to 'bin/taler-deployment-config-instances')
-rwxr-xr-xbin/taler-deployment-config-instances17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/taler-deployment-config-instances b/bin/taler-deployment-config-instances
index 5a9a8d2..3d6acda 100755
--- a/bin/taler-deployment-config-instances
+++ b/bin/taler-deployment-config-instances
@@ -24,6 +24,7 @@ def expect_env(name):
MERCHANT_BACKEND_BASE_URL = expect_env("TALER_ENV_MERCHANT_BACKEND")
TALER_ENV_NAME = expect_env("TALER_ENV_NAME")
TALER_CONFIG_CURRENCY = expect_env("TALER_CONFIG_CURRENCY")
+TALER_ENV_FRONTENDS_APITOKEN = expect_env("TALER_ENV_FRONTENDS_APITOKEN")
def ensure_instance(instance_id, name, payto_uris, auth):
# FIXME: Use auth once the default instance also uses token auth
@@ -44,7 +45,7 @@ def ensure_instance(instance_id, name, payto_uris, auth):
default_wire_transfer_delay=dict(d_ms="forever"),
default_pay_delay=dict(d_ms="forever"),
# FIXME: Eventually, this should be an actual secret token
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=auth,
)
create_resp = requests.post(
urljoin(MERCHANT_BACKEND_BASE_URL, "private/instances"), json=req
@@ -58,47 +59,47 @@ ensure_instance(
"blog",
name="Blog",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/blog"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)
ensure_instance(
"donations",
name="Donations",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/donations"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)
ensure_instance(
"survey",
name="Survey",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/survey"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)
ensure_instance(
"pos",
name="PoS",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/pos"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)
ensure_instance(
"GNUnet",
name="GNUnet",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/GNUnet"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)
ensure_instance(
"Taler",
name="Taler",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/Taler"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)
ensure_instance(
"Tor",
name="Tor",
payto_uris=[f"payto://x-taler-bank/bank.{TALER_ENV_NAME}.taler.net/Tor"],
- auth=dict(method="token", token="secret-token:sandbox"),
+ auth=dict(method="token", token=TALER_ENV_FRONTENDS_APITOKEN),
)