ProxyFile

Collection of utilities for dealing with security files (i.e. proxy files)

DIRAC.Core.Security.ProxyFile.deleteMultiProxy(multiProxyDict)

Delete a file from a multiProxyArgument if needed

DIRAC.Core.Security.ProxyFile.multiProxyArgument(proxy=False)

Load a proxy:

Parameters:proxy

param can be:

  • Default -> use current proxy
  • string -> upload file specified as proxy
  • X509Chain -> use chain
Returns:S_OK/S_ERROR
S_OK( { 'file' : <string with file location>,
        'chain' : X509Chain object,
        'tempFile' : <True if file is temporal>
      } )
S_ERROR
DIRAC.Core.Security.ProxyFile.writeChainToProxyFile(proxyChain, fileName)

Write an X509Chain to file

Parameters:
  • proxyChain (-) – X509Chain object to dump to file
  • fileName (-) – filename to dump to
DIRAC.Core.Security.ProxyFile.writeChainToTemporaryFile(proxyChain)

Write a proxy chain to a temporary file return S_OK( string with name of file )/ S_ERROR

DIRAC.Core.Security.ProxyFile.writeToProxyFile(proxyContents, fileName=False)

Write a proxy string to file

Parameters:
  • proxyContents (-) – string object to dump to file
  • fileName (-) – filename to dump to