From f8c106a62023182f55cc51bd4295a851256f0d62 Mon Sep 17 00:00:00 2001 From: Mohammad Torkashvand <mohammad.torkashvand@geant.org> Date: Tue, 23 Jan 2024 09:20:47 +0100 Subject: [PATCH] Skiped OPA policy checking for callback step endpoint --- gso/auth/oidc_policy_helper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gso/auth/oidc_policy_helper.py b/gso/auth/oidc_policy_helper.py index 005e6cd4..04e2fc8e 100644 --- a/gso/auth/oidc_policy_helper.py +++ b/gso/auth/oidc_policy_helper.py @@ -411,6 +411,9 @@ def opa_decision( if not (oauth2lib_settings.OAUTH2_ACTIVE and oauth2lib_settings.OAUTH2_AUTHORIZATION_ACTIVE): return None + if _is_callback_step_endpoint(request): + return None + try: json = await request.json() # Silencing the Decode error or Type error when request.json() does not return anything sane. -- GitLab