Skip to content

Commit

Permalink
Merge pull request DIRACGrid#7482 from DIRACGridBot/cherry-pick-2-094…
Browse files Browse the repository at this point in the history
…109602-integration

[sweep:integration] Download no-VOMS proxies for requests where VOMS is not required
  • Loading branch information
fstagni authored Feb 23, 2024
2 parents 4879509 + afe6e5f commit 4fdc94c
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 4fdc94c

Please sign in to comment.