From 198f0e6493b287c6bfacfa97ae8864655356fd47 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 29 Apr 2022 12:17:19 -0400 Subject: [PATCH] Config dir, add static API token (ugh), soon to be stripe configs --- static_api_tokens.toml => configs/static_api_tokens.toml | 9 ++++++++- configs/stripe.toml | 5 +++++ crates/service/storyteller_web/src/main.rs | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) rename static_api_tokens.toml => configs/static_api_tokens.toml (74%) create mode 100644 configs/stripe.toml diff --git a/static_api_tokens.toml b/configs/static_api_tokens.toml similarity index 74% rename from static_api_tokens.toml rename to configs/static_api_tokens.toml index 6895e659f..402c7fe4f 100644 --- a/static_api_tokens.toml +++ b/configs/static_api_tokens.toml @@ -1,5 +1,5 @@ # A list of statically-configured (not-DB backed) API tokens. -# This file is not distributed with the docker image and is just an example for local development. +# This file is *NOT* distributed with the docker image and is just an example for local development. # kubectl create configmap static-api-tokens --namespace storyteller --from-file=static_api_tokens.toml @@ -22,6 +22,13 @@ maybe_user_token = 'U:VR4HNTYCDBR9W' api_token = "SAPI:FTK789_6096133E1D79D6FB" maybe_user_token = 'U:0S09H086R6TRH' +# /profile/Hmm (ID10T#6255) +# Requested 2022-04-29 in Discord +# Using for their own mobile TTS app. +[[api_tokens]] +api_token = "SAPI:HMM_7B3CFC9D64A90006" +maybe_user_token = 'U:B2MQPN6ZGAXH5' + ## /profile/api_duke (Duke#4009) ## Wants this for a Hackathon but "won't pay". ## Update: Cancelled hackathon diff --git a/configs/stripe.toml b/configs/stripe.toml new file mode 100644 index 000000000..06bc193b6 --- /dev/null +++ b/configs/stripe.toml @@ -0,0 +1,5 @@ +# Stripe configs +# This file will get bundled with `storyteller-web` in the Docker image, +# but it can be overwritten by Kubernetes if necessary. +# IT CONTAINS NO SECRETS, SUCH AS API KEYS. + diff --git a/crates/service/storyteller_web/src/main.rs b/crates/service/storyteller_web/src/main.rs index 17d289bce..18717ff6b 100644 --- a/crates/service/storyteller_web/src/main.rs +++ b/crates/service/storyteller_web/src/main.rs @@ -392,7 +392,7 @@ async fn main() -> AnyhowResult<()> { fn read_static_api_tokens() -> StaticApiTokenSet { let filename = easyenv::get_env_string_or_default( "STATIC_API_TOKENS_CONFIG_FILE", - "static_api_tokens.toml"); + "./configs/static_api_tokens.toml"); StaticApiTokenSet::from_file(&filename) }