Skip to content

Commit 0941096

Browse files
authored
Merge pull request #7479 from atsareg/fix-request-proxy
[8.0] Download no-VOMS proxies for requests where VOMS is not required
2 parents ee79ce4 + 28afdd9 commit 0941096

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/DIRAC/RequestManagementSystem/private/RequestTask.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,13 @@ def setupProxy(self):
155155
os.environ["X509_USER_PROXY"] = proxyFile
156156
return S_OK({"Shifter": isShifter, "ProxyFile": proxyFile})
157157

158-
# # if we're here owner is not a shifter at all
159-
ownerProxyFile = gProxyManager.downloadVOMSProxyToFile(ownerDN, ownerGroup)
158+
# # if we're here, the owner is not a shifter at all
159+
vomsAttr = Registry.getVOMSAttributeForGroup(ownerGroup)
160+
if vomsAttr:
161+
ownerProxyFile = gProxyManager.downloadVOMSProxyToFile(ownerDN, ownerGroup)
162+
else:
163+
ownerProxyFile = gProxyManager.downloadProxyToFile(ownerDN, ownerGroup)
164+
160165
if not ownerProxyFile["OK"] or not ownerProxyFile["Value"]:
161166
reason = ownerProxyFile.get("Message", "No valid proxy found in ProxyManager.")
162167
return S_ERROR(f"Change proxy error for '{ownerDN}'@'{ownerGroup}': {reason}")

0 commit comments

Comments
 (0)