From ad108e0b53f30420efa7631f78c74e9af7c76200 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 22 Apr 2025 22:28:47 -0300 Subject: [PATCH 1/3] chore: k8s plumbing for mailarchive secret plus a typo fix --- k8s/settings_local.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/k8s/settings_local.py b/k8s/settings_local.py index a0e197b7f5e..a2ad75f7c3e 100644 --- a/k8s/settings_local.py +++ b/k8s/settings_local.py @@ -135,6 +135,13 @@ def _multiline_to_list(s): queue=os.environ.get("RABBITMQ_QUEUE", "dt"), ) +# mailarchive API key +_mailing_list_archive_api_key = os.environ.get("DATATRACKER_MAILING_LIST_ARCHIVE_API_KEY", None) +if _mailing_list_archive_api_key is None: + raise RuntimeError("DATATRACKER_MAILING_LIST_ARCHIVE_API_KEY must be set") +MAILING_LIST_ARCHIVE_API_KEY = _mailing_list_archive_api_key + + IANA_SYNC_USERNAME = "ietfsync" IANA_SYNC_CHANGES_URL = "https://datatracker.iana.org:4443/data-tracker/changes" IANA_SYNC_PROTOCOLS_URL = "http://www.iana.org/protocols/" @@ -173,7 +180,7 @@ def _multiline_to_list(s): "DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set" ) -# For APP_API_TOKENS, ccept either base64-encoded JSON or raw JSON, but not both +# For APP_API_TOKENS, accept either base64-encoded JSON or raw JSON, but not both if "DATATRACKER_APP_API_TOKENS_JSON_B64" in os.environ: if "DATATRACKER_APP_API_TOKENS_JSON" in os.environ: raise RuntimeError( From fa72e89536f068cb503d430bd7f2f6919eeba495 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 22 Apr 2025 22:31:50 -0300 Subject: [PATCH 2/3] style: remove empty line --- k8s/settings_local.py | 1 - 1 file changed, 1 deletion(-) diff --git a/k8s/settings_local.py b/k8s/settings_local.py index a2ad75f7c3e..76da8330d25 100644 --- a/k8s/settings_local.py +++ b/k8s/settings_local.py @@ -141,7 +141,6 @@ def _multiline_to_list(s): raise RuntimeError("DATATRACKER_MAILING_LIST_ARCHIVE_API_KEY must be set") MAILING_LIST_ARCHIVE_API_KEY = _mailing_list_archive_api_key - IANA_SYNC_USERNAME = "ietfsync" IANA_SYNC_CHANGES_URL = "https://datatracker.iana.org:4443/data-tracker/changes" IANA_SYNC_PROTOCOLS_URL = "http://www.iana.org/protocols/" From 06dee0287a177c806149ea14cee0b985369de2d3 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 22 Apr 2025 22:36:56 -0300 Subject: [PATCH 3/3] chore: hints for working with APP_API_TOKENS value --- k8s/settings_local.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/k8s/settings_local.py b/k8s/settings_local.py index 76da8330d25..0e128b1b4cb 100644 --- a/k8s/settings_local.py +++ b/k8s/settings_local.py @@ -179,7 +179,13 @@ def _multiline_to_list(s): "DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set" ) -# For APP_API_TOKENS, accept either base64-encoded JSON or raw JSON, but not both +# For APP_API_TOKENS, accept either base64-encoded JSON or raw JSON, but not both. +# To decode / pretty-print the encoded form, run: +# base64 -d | jq . +# paste the encoded secret into stdin. Copy/paste that into an editor you trust not +# to leave a copy lying around. When done editing, copy/paste the final JSON through +# jq -c | base64 +# and copy/paste the output into the secret store. if "DATATRACKER_APP_API_TOKENS_JSON_B64" in os.environ: if "DATATRACKER_APP_API_TOKENS_JSON" in os.environ: raise RuntimeError(