From 2e2a8a2125de4b0d4bbd0a1439e74dffe2b77728 Mon Sep 17 00:00:00 2001 From: tmaeno Date: Tue, 30 Jul 2024 22:05:12 +0200 Subject: [PATCH] dbg msg for get_proxy --- pandaserver/jobdispatcher/JobDispatcher.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pandaserver/jobdispatcher/JobDispatcher.py b/pandaserver/jobdispatcher/JobDispatcher.py index 37f7e191c..9300972ae 100755 --- a/pandaserver/jobdispatcher/JobDispatcher.py +++ b/pandaserver/jobdispatcher/JobDispatcher.py @@ -839,7 +839,7 @@ def get_proxy(self, real_distinguished_name: str, role: str | None, target_disti tmp_log.debug(tmp_msg) if real_distinguished_name is None: # cannot extract DN - tmp_msg += "failed since DN cannot be extracted" + tmp_msg = "failed since DN cannot be extracted" tmp_log.debug(tmp_msg) response = Protocol.Response(Protocol.SC_Perms, "Cannot extract DN from proxy. not HTTPS?") else: @@ -853,8 +853,11 @@ def get_proxy(self, real_distinguished_name: str, role: str | None, target_disti allowed_names = self.specialDispatchParams["allowProxy"] if compact_name not in allowed_names: # permission denied - tmp_msg += f"failed since '{compact_name}' not in the authorized user list who have 'p' in {panda_config.schemaMETA}.USERS.GRIDPREF " - tmp_msg += "to get proxy" + tmp_msg = f"failed since '{compact_name}' not in the authorized user list who have 'p' in {panda_config.schemaMETA}.USERS.GRIDPREF " + if not tokenized: + tmp_msg += "to get proxy" + else: + tmp_msg += "to get access token" tmp_log.debug(tmp_msg) response = Protocol.Response(Protocol.SC_Perms, tmp_msg) elif ( @@ -867,7 +870,7 @@ def get_proxy(self, real_distinguished_name: str, role: str | None, target_disti ) ): # invalid token key - tmp_msg += f"failed since token key is invalid for {target_distinguished_name}" + tmp_msg = f"failed since token key is invalid for {target_distinguished_name}" tmp_log.debug(tmp_msg) response = Protocol.Response(Protocol.SC_Invalid, tmp_msg) else: