Skip to content

Commit

Permalink
Merge pull request PanDAWMS#386 from tmaeno/master
Browse files Browse the repository at this point in the history
dbg msg for get_proxy
  • Loading branch information
tmaeno authored Jul 31, 2024
2 parents 7d50c47 + 2e2a8a2 commit 4ed6ee3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pandaserver/jobdispatcher/JobDispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 (
Expand All @@ -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:
Expand Down

0 comments on commit 4ed6ee3

Please sign in to comment.