diff --git a/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py b/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py index 46ad434276d..cc435685ef8 100755 --- a/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py +++ b/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py @@ -418,7 +418,7 @@ def getPayloadProxyFromDIRACGroup(self, userDN, userGroup, requiredTimeLeft, pro proxyToConnect=proxyToConnect, ) - def dumpProxyToFile(self, chain, destinationFile=None, requiredTimeLeft=600): + def dumpProxyToFile(self, chain, destinationFile=None, requiredTimeLeft=600, includeToken=True): """Dump a proxy to a file. It's cached so multiple calls won't generate extra files :param X509Chain chain: proxy as a chain @@ -442,7 +442,10 @@ def dumpProxyToFile(self, chain, destinationFile=None, requiredTimeLeft=600): filename = retVal["Value"] if not (result := chain.getDIRACGroup())["OK"]: return result - if not (result := addTokenToPEM(filename, result["Value"]))["OK"]: # pylint: disable=unsubscriptable-object + if ( + includeToken + and not (result := addTokenToPEM(filename, result["Value"]))["OK"] # pylint: disable=unsubscriptable-object + ): return result self.__filesCache.add(cHash, chain.getRemainingSecs()["Value"], filename) return S_OK(filename) diff --git a/src/DIRAC/Resources/Computing/ComputingElement.py b/src/DIRAC/Resources/Computing/ComputingElement.py index 33455665cc0..39d1a1fe645 100755 --- a/src/DIRAC/Resources/Computing/ComputingElement.py +++ b/src/DIRAC/Resources/Computing/ComputingElement.py @@ -105,7 +105,7 @@ def setToken(self, token): def _prepareProxy(self): """Set the environment variable X509_USER_PROXY""" if self.proxy: - result = gProxyManager.dumpProxyToFile(self.proxy, requiredTimeLeft=self.minProxyTime) + result = gProxyManager.dumpProxyToFile(self.proxy, requiredTimeLeft=self.minProxyTime, includeToken=False) if not result["OK"]: return result os.environ["X509_USER_PROXY"] = result["Value"]