From afe6e5f4acbb16c6273c49e36b23f47e7a77e6a2 Mon Sep 17 00:00:00 2001 From: Andrei Tsaregorodtsev Date: Fri, 23 Feb 2024 11:19:50 +0100 Subject: [PATCH] sweep: #7479 Download no-VOMS proxies for requests where VOMS is not required --- src/DIRAC/RequestManagementSystem/private/RequestTask.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/DIRAC/RequestManagementSystem/private/RequestTask.py b/src/DIRAC/RequestManagementSystem/private/RequestTask.py index e3acd3ca8ac..3815a643949 100644 --- a/src/DIRAC/RequestManagementSystem/private/RequestTask.py +++ b/src/DIRAC/RequestManagementSystem/private/RequestTask.py @@ -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}")