From 3f89eadf72ed33e41f8a4d08164f11982b6b62ea Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Mon, 12 Aug 2024 16:20:11 +0100 Subject: [PATCH] fix: [#607] update Tracker and Index config files - Tracker: The default value for `http_api.access_tokens.admin` was removed. - Index: Default values for `tracker.token` and `auth.user_claim_token_pepper` were removed. --- .env.local | 7 +++++-- compose.yaml | 1 + .../container/e2e/sqlite/mode/private/e2e-env-up.sh | 1 + .../container/e2e/sqlite/mode/public/e2e-env-up.sh | 1 + docs/containerization_guide.md | 1 + .../config/index.private.e2e.container.sqlite3.toml | 4 ++++ .../default/config/index.public.e2e.container.sqlite3.toml | 6 +++++- .../config/tracker.private.e2e.container.sqlite3.toml | 3 +++ .../config/tracker.public.e2e.container.sqlite3.toml | 3 +++ 9 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.env.local b/.env.local index 7018e36..5419cff 100644 --- a/.env.local +++ b/.env.local @@ -5,9 +5,12 @@ API_BASE_URL=http://localhost:3001/v1 DATABASE_URL=sqlite://storage/database/data.db?mode=rwc # Docker compose -TORRUST_INDEX_CONFIG_TOML= USER_ID=1000 +# Tracker TORRUST_TRACKER_CONFIG_TOML= TORRUST_TRACKER_USER_UID=1000 -TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__USER_CLAIM_TOKEN_PEPPER='MaxVerstappenWC2021' TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN='MyAccessToken' +# Index +TORRUST_INDEX_CONFIG_TOML= +TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN='MyAccessToken' +TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__USER_CLAIM_TOKEN_PEPPER='MaxVerstappenWC2021' diff --git a/compose.yaml b/compose.yaml index 71d1bdd..2758e97 100644 --- a/compose.yaml +++ b/compose.yaml @@ -34,6 +34,7 @@ services: - TORRUST_INDEX_DATABASE=${TORRUST_INDEX_DATABASE:-e2e_testing_sqlite3} - TORRUST_INDEX_DATABASE_DRIVER=${TORRUST_INDEX_DATABASE_DRIVER:-sqlite3} - TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN=${TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN:-MyAccessToken} + - TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__USER_CLAIM_TOKEN_PEPPER=${TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__USER_CLAIM_TOKEN_PEPPER:-MaxVerstappenWC2021} - TORRUST_INDEX_API_CORS_PERMISSIVE=${TORRUST_INDEX_API_CORS_PERMISSIVE:-true} networks: - server_side diff --git a/contrib/dev-tools/container/e2e/sqlite/mode/private/e2e-env-up.sh b/contrib/dev-tools/container/e2e/sqlite/mode/private/e2e-env-up.sh index 0c364e1..c2d69ba 100755 --- a/contrib/dev-tools/container/e2e/sqlite/mode/private/e2e-env-up.sh +++ b/contrib/dev-tools/container/e2e/sqlite/mode/private/e2e-env-up.sh @@ -10,6 +10,7 @@ USER_ID=${USER_ID:-1000} \ TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \ TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \ TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \ + TORRUST_INDEX_CONFIG_OVERRIDE_USER_CLAIM_TOKEN_PEPPER="MyAccessToken" \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.private.e2e.container.sqlite3.toml) \ TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ TORRUST_TRACKER_CONFIG_OVERRIDE_CORE__DATABASE__DRIVER="sqlite3" \ diff --git a/contrib/dev-tools/container/e2e/sqlite/mode/public/e2e-env-up.sh b/contrib/dev-tools/container/e2e/sqlite/mode/public/e2e-env-up.sh index 5480283..851f7f2 100755 --- a/contrib/dev-tools/container/e2e/sqlite/mode/public/e2e-env-up.sh +++ b/contrib/dev-tools/container/e2e/sqlite/mode/public/e2e-env-up.sh @@ -10,6 +10,7 @@ USER_ID=${USER_ID:-1000} \ TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \ TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \ TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \ + TORRUST_INDEX_CONFIG_OVERRIDE_USER_CLAIM_TOKEN_PEPPER="MyAccessToken" \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.public.e2e.container.sqlite3.toml) \ TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ TORRUST_TRACKER_CONFIG_OVERRIDE_CORE__DATABASE__DRIVER="sqlite3" \ diff --git a/docs/containerization_guide.md b/docs/containerization_guide.md index 64aa826..b642037 100644 --- a/docs/containerization_guide.md +++ b/docs/containerization_guide.md @@ -286,6 +286,7 @@ USER_ID=${USER_ID:-1000} \ TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \ TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \ TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \ + TORRUST_INDEX_CONFIG_OVERRIDE_USER_CLAIM_TOKEN_PEPPER="MyAccessToken" \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ TORRUST_TRACKER_CONFIG_OVERRIDE_CORE__DATABASE__DRIVER="sqlite3" \ diff --git a/share/default/config/index.private.e2e.container.sqlite3.toml b/share/default/config/index.private.e2e.container.sqlite3.toml index 8b11eaa..b619449 100644 --- a/share/default/config/index.private.e2e.container.sqlite3.toml +++ b/share/default/config/index.private.e2e.container.sqlite3.toml @@ -15,6 +15,10 @@ threshold = "info" api_url = "http://tracker:1212" private = true url = "http://tracker:7070" +token = "MyAccessToken" + +[auth] +user_claim_token_pepper = "MaxVerstappenWC2021" [database] connect_url = "sqlite:///var/lib/torrust/index/database/e2e_testing_sqlite3.db?mode=rwc" diff --git a/share/default/config/index.public.e2e.container.sqlite3.toml b/share/default/config/index.public.e2e.container.sqlite3.toml index 3c9f395..953fc39 100644 --- a/share/default/config/index.public.e2e.container.sqlite3.toml +++ b/share/default/config/index.public.e2e.container.sqlite3.toml @@ -15,11 +15,15 @@ threshold = "info" api_url = "http://tracker:1212" private = false url = "udp://tracker:6969" +token = "MyAccessToken" + +[auth] +user_claim_token_pepper = "MaxVerstappenWC2021" [database] connect_url = "sqlite:///var/lib/torrust/index/database/e2e_testing_sqlite3.db?mode=rwc" -[mail] +[mail.smtp] port = 1025 server = "mailcatcher" diff --git a/share/default/config/tracker.private.e2e.container.sqlite3.toml b/share/default/config/tracker.private.e2e.container.sqlite3.toml index 1844cc4..dcb3e61 100644 --- a/share/default/config/tracker.private.e2e.container.sqlite3.toml +++ b/share/default/config/tracker.private.e2e.container.sqlite3.toml @@ -21,3 +21,6 @@ bind_address = "0.0.0.0:6969" [http_api] bind_address = "0.0.0.0:1212" + +[http_api.access_tokens] +admin = "MyAccessToken" \ No newline at end of file diff --git a/share/default/config/tracker.public.e2e.container.sqlite3.toml b/share/default/config/tracker.public.e2e.container.sqlite3.toml index 69549a0..eb14d85 100644 --- a/share/default/config/tracker.public.e2e.container.sqlite3.toml +++ b/share/default/config/tracker.public.e2e.container.sqlite3.toml @@ -18,3 +18,6 @@ path = "/var/lib/torrust/tracker/database/e2e_testing_sqlite3.db" [http_api] bind_address = "0.0.0.0:1212" + +[http_api.access_tokens] +admin = "MyAccessToken" \ No newline at end of file