Skip to content

Commit

Permalink
sweep: DIRACGrid#7479 Download no-VOMS proxies for requests where VOM…
Browse files Browse the repository at this point in the history
…S is not required
  • Loading branch information
atsareg authored and web-flow committed Feb 23, 2024
1 parent 4879509 commit afe6e5f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/DIRAC/RequestManagementSystem/private/RequestTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,13 @@ def setupProxy(self):
os.environ["X509_USER_PROXY"] = proxyFile
return S_OK({"Shifter": isShifter, "ProxyFile": proxyFile})

# # if we're here owner is not a shifter at all
ownerProxyFile = gProxyManager.downloadVOMSProxyToFile(ownerDN, ownerGroup)
# # if we're here, the owner is not a shifter at all
vomsAttr = Registry.getVOMSAttributeForGroup(ownerGroup)
if vomsAttr:
ownerProxyFile = gProxyManager.downloadVOMSProxyToFile(ownerDN, ownerGroup)
else:
ownerProxyFile = gProxyManager.downloadProxyToFile(ownerDN, ownerGroup)

if not ownerProxyFile["OK"] or not ownerProxyFile["Value"]:
reason = ownerProxyFile.get("Message", "No valid proxy found in ProxyManager.")
return S_ERROR(f"Change proxy error for '{ownerDN}'@'{ownerGroup}': {reason}")
Expand Down

0 comments on commit afe6e5f

Please sign in to comment.