From 41e7b14dc6c3ffea707a636fc4670d0e3e9fbea8 Mon Sep 17 00:00:00 2001 From: Ross Whitfield Date: Wed, 20 Nov 2024 13:55:03 +1100 Subject: [PATCH] Remove now unused CATALOG_ID and CATALOG_SECRET --- docker-compose.yml | 2 -- docs/developer/instruction/build.rst | 7 +++---- docs/developer/instruction/deployment.rst | 3 +-- src/webmon_app/reporting/reporting_app/settings/base.py | 2 -- .../reporting/reporting_app/settings/unittest.py | 3 +-- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1dd8f916..0051d635 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,8 +38,6 @@ services: - LDAP_SERVER_URI=${LDAP_SERVER_URI} - LDAP_DOMAIN_COMPONENT=${LDAP_DOMAIN_COMPONENT} - CATALOG_URL=${CATALOG_URL} - - CATALOG_ID=${CATALOG_ID} - - CATALOG_SECRET=${CATALOG_SECRET} - CATALOG_API_TOKEN=${CATALOG_API_TOKEN} - GUNICORN_CMD_ARGS=--reload --workers=8 - REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt diff --git a/docs/developer/instruction/build.rst b/docs/developer/instruction/build.rst index 773087a3..71dbeb1a 100644 --- a/docs/developer/instruction/build.rst +++ b/docs/developer/instruction/build.rst @@ -109,8 +109,7 @@ been initialized: LDAP_USER_DN_TEMPLATE=***** LDAP_DOMAIN_COMPONENT=***** CATALOG_URL=***** - CATALOG_ID=***** - CATALOG_SECRET=***** + CATALOG_API_TOKEN=***** It is recommended to store these variables in an ``.envrc`` file and manage their loading/unloading into the shell with the `direnv `_ command-line utility. @@ -121,8 +120,8 @@ The environment variables ``LDAP_SERVER_URI`` and ``LDAP_DOMAIN_COMPONENT`` are Senior developers can provide the values to use, then the developer setup can work with Neutron Scattering Division's (NSD) LDAP instance. -The environment variables ``CATALOG_URL``, ``CATALOG_ID`` and -``CATALOG_SECRET`` can be set to allow run metadata to be retrieved +The environment variables ``CATALOG_URL`` and ``CATALOG_API_TOKEN`` +can be set to allow run metadata to be retrieved from `ONCat `_. Special users diff --git a/docs/developer/instruction/deployment.rst b/docs/developer/instruction/deployment.rst index 0d491311..a500c297 100644 --- a/docs/developer/instruction/deployment.rst +++ b/docs/developer/instruction/deployment.rst @@ -17,9 +17,8 @@ Variable Secret Description ====================== ====== =========== AMQ_BROKER List of ActiveMQ brokers APP_SECRET yes `Django SECRET_KEY `_ -CATALOG_ID yes `ONCat client ID `_ -CATALOG_SECRET yes `ONCat client secret `_ CATALOG_URL yes `ONCat URL `_ +CATALOG_API_TOKEN yes `ONCat API token `_ DATABASE_HOST PostgreSQL hostname DATABASE_NAME Database name DATABASE_PASS yes PostgreSQL Owner password diff --git a/src/webmon_app/reporting/reporting_app/settings/base.py b/src/webmon_app/reporting/reporting_app/settings/base.py index 1336ca9c..0e3133c2 100644 --- a/src/webmon_app/reporting/reporting_app/settings/base.py +++ b/src/webmon_app/reporting/reporting_app/settings/base.py @@ -150,8 +150,6 @@ def validate_ldap_settings(server_uri, user_dn_template): # ONCat Catalog CATALOG_URL = environ.get("CATALOG_URL") -CATALOG_ID = environ.get("CATALOG_ID") -CATALOG_SECRET = environ.get("CATALOG_SECRET") CATALOG_API_TOKEN = environ.get("CATALOG_API_TOKEN") # The DB settings are defined the same as in the workflow manager diff --git a/src/webmon_app/reporting/reporting_app/settings/unittest.py b/src/webmon_app/reporting/reporting_app/settings/unittest.py index 4d53e45b..b11993c9 100644 --- a/src/webmon_app/reporting/reporting_app/settings/unittest.py +++ b/src/webmon_app/reporting/reporting_app/settings/unittest.py @@ -17,8 +17,7 @@ DEBUG = True CATALOG_URL = "catalog.test.xyz" -CATALOG_ID = "test" -CATALOG_SECRET = "test" +CATALOG_API_TOKEN = "test" del CACHES # noqa: F821