From 9be98e1ceb2a39795202cbb0cdf1c24bf36f6166 Mon Sep 17 00:00:00 2001 From: Marek Skrobacki Date: Thu, 21 Mar 2024 11:21:17 +0000 Subject: [PATCH] close dex_client_secret earlier --- components/09-nautobot/base/nautobot/templates/configmap.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/09-nautobot/base/nautobot/templates/configmap.yaml b/components/09-nautobot/base/nautobot/templates/configmap.yaml index c47fc9b90..2f7fd3c61 100644 --- a/components/09-nautobot/base/nautobot/templates/configmap.yaml +++ b/components/09-nautobot/base/nautobot/templates/configmap.yaml @@ -581,7 +581,8 @@ data: SOCIAL_AUTH_OIDC_OIDC_ENDPOINT = "http://dexidp.local" SOCIAL_AUTH_OIDC_USERNAME_KEY = 'name' SOCIAL_AUTH_OIDC_KEY = 'nautobot' - SOCIAL_AUTH_OIDC_SECRET = open("/opt/nautobot/dex_client_secret").read() + with open("/opt/nautobot/dex_client_secret") as oidc_secret: + SOCIAL_AUTH_OIDC_SECRET = oidc_secret.read() # The “openid”, “profile” and “email” are requested by default, # below *adds* scope. SOCIAL_AUTH_OIDC_SCOPE = ['groups']