From e6d605e309ee78c479ce57fe23ff45d8bf95c231 Mon Sep 17 00:00:00 2001 From: Daisie Huang Date: Thu, 4 Apr 2024 11:11:27 -0700 Subject: [PATCH 1/2] cleaning up env vars --- config/settings/dev.py | 5 ++--- config/settings/prod.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/settings/dev.py b/config/settings/dev.py index 278cc1144..e831e8a23 100644 --- a/config/settings/dev.py +++ b/config/settings/dev.py @@ -42,10 +42,9 @@ # --------------- KATSU_AUTHORIZATION = os.getenv("KATSU_AUTHORIZATION") CANDIG_OPA_URL = os.getenv("OPA_URL") -CANDIG_OPA_SITE_ADMIN_KEY = os.getenv("OPA_SITE_ADMIN_KEY") CONN_MAX_AGE = int(os.getenv("CONN_MAX_AGE", 0)) -if exists("/run/secrets/opa-root-token"): - with open("/run/secrets/opa-root-token", "r") as f: +if exists("/run/secrets/opa-service-token"): + with open("/run/secrets/opa-service-token", "r") as f: CANDIG_OPA_SECRET = f.read() if exists("/run/secrets/katsu_secret"): with open("/run/secrets/katsu_secret", "r") as f: diff --git a/config/settings/prod.py b/config/settings/prod.py index eee2d762f..c375e95a8 100644 --- a/config/settings/prod.py +++ b/config/settings/prod.py @@ -24,10 +24,9 @@ # --------------- KATSU_AUTHORIZATION = os.getenv("KATSU_AUTHORIZATION") CANDIG_OPA_URL = os.getenv("OPA_URL") -CANDIG_OPA_SITE_ADMIN_KEY = os.getenv("OPA_SITE_ADMIN_KEY") CONN_MAX_AGE = int(os.getenv("CONN_MAX_AGE", 0)) -if exists("/run/secrets/opa-root-token"): - with open("/run/secrets/opa-root-token", "r") as f: +if exists("/run/secrets/opa-service-token"): + with open("/run/secrets/opa-service-token", "r") as f: CANDIG_OPA_SECRET = f.read() if exists("/run/secrets/katsu_secret"): with open("/run/secrets/katsu_secret", "r") as f: From 112627e3f0d1b2be88b281d1c3b081177c709ee2 Mon Sep 17 00:00:00 2001 From: Daisie Huang Date: Fri, 26 Apr 2024 15:45:10 -0700 Subject: [PATCH 2/2] pick up authx fix --- requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/base.txt b/requirements/base.txt index 127657bac..b68fd3811 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,4 +1,4 @@ -candigv2-authx@git+https://github.com/CanDIG/candigv2-authx.git@v2.1.0 # CANDIG authorization wrapper +candigv2-authx@git+https://github.com/CanDIG/candigv2-authx.git@daisieh/aud # CANDIG authorization wrapper Django==5.0.1 # Python web framework psycopg[binary]==3.1.16 # PostgreSQL driver for Python django-cors-headers==4.3.1 # handling the server headers required for CORS