Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/Resources/Computing/ComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading