From afac44d6c077c5ef2fac5b942558ed9154395c48 Mon Sep 17 00:00:00 2001 From: Daisie Huang Date: Thu, 8 Sep 2022 11:17:35 -0700 Subject: [PATCH] pass in the other auth token too --- chord_metadata_service/restapi/candig_authz_middleware.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chord_metadata_service/restapi/candig_authz_middleware.py b/chord_metadata_service/restapi/candig_authz_middleware.py index 0918ad752..fbdf17042 100644 --- a/chord_metadata_service/restapi/candig_authz_middleware.py +++ b/chord_metadata_service/restapi/candig_authz_middleware.py @@ -99,7 +99,10 @@ def get_opa_datasets(self, token, path, method): try: response = requests.post( settings.CANDIG_OPA_URL + "/v1/data/permissions/datasets", - headers={"X-Opa": f"{settings.CANDIG_OPA_SECRET}"}, + headers={ + "X-Opa": f"{settings.CANDIG_OPA_SECRET}", + "Authorization": f"Bearer {token}" + }, json={ "input": { "token": token,