From 3c6aac54357297beef32a8dee9081d1365583c15 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 7 Sep 2021 11:05:18 +0200 Subject: [PATCH] sources/oauth: prevent potentially confidential data from being logged Signed-off-by: Jens Langhammer --- authentik/sources/oauth/clients/base.py | 1 - authentik/sources/oauth/clients/oauth2.py | 1 - authentik/sources/oauth/types/azure_ad.py | 1 - 3 files changed, 3 deletions(-) diff --git a/authentik/sources/oauth/clients/base.py b/authentik/sources/oauth/clients/base.py index 842872848..e57fb68b3 100644 --- a/authentik/sources/oauth/clients/base.py +++ b/authentik/sources/oauth/clients/base.py @@ -43,7 +43,6 @@ class BaseOAuthClient: profile_url = self.source.profile_url try: response = self.do_request("get", profile_url, token=token) - LOGGER.debug(response.text) response.raise_for_status() except RequestException as exc: LOGGER.warning("Unable to fetch user profile", exc=exc) diff --git a/authentik/sources/oauth/clients/oauth2.py b/authentik/sources/oauth/clients/oauth2.py index 5cd9751e1..27443de2b 100644 --- a/authentik/sources/oauth/clients/oauth2.py +++ b/authentik/sources/oauth/clients/oauth2.py @@ -65,7 +65,6 @@ class OAuth2Client(BaseOAuthClient): data=args, headers=self._default_headers, ) - LOGGER.debug(response.text) response.raise_for_status() except RequestException as exc: LOGGER.warning("Unable to fetch access token", exc=exc) diff --git a/authentik/sources/oauth/types/azure_ad.py b/authentik/sources/oauth/types/azure_ad.py index 329f1dd79..255c00724 100644 --- a/authentik/sources/oauth/types/azure_ad.py +++ b/authentik/sources/oauth/types/azure_ad.py @@ -36,7 +36,6 @@ class AzureADClient(OAuth2Client): profile_url, headers={"Authorization": f"{token['token_type']} {token['access_token']}"}, ) - LOGGER.debug(response.text) response.raise_for_status() except RequestException as exc: LOGGER.warning("Unable to fetch user profile", exc=exc)