ProxyManagerClient
ProxyManagerClient has the function to “talk” to the ProxyManager service
(ProxyManagerHandler
).
This inherits the DIRAC base Client for direct execution of server functionality.
Client also contain caching of the requested proxy information.
- class DIRAC.FrameworkSystem.Client.ProxyManagerClient.ProxyManagerClient(*args, **kwargs)
Bases:
object
- __init__()
- clearCaches()
Clear caches
- deleteGeneratedProxyFile(chain)
Delete a file generated by a dump
- Parameters:
chain (X509Chain) – proxy as a chain
- Returns:
S_OK()
- deleteProxyBundle(idList)
delete a list of id’s
- downloadProxy(**kwargs)
Get a proxy Chain from the proxy management
- Parameters:
- Returns:
S_OK(X509Chain)/S_ERROR()
- downloadProxyToFile(userDN, userGroup, limited=False, requiredTimeLeft=1200, cacheTime=14400, filePath=None, proxyToConnect=None, token=None)
Get a proxy Chain from the proxy management and write it to file
- Parameters:
userDN (str) – user DN
userGroup (str) – user group
limited (boolean) – if need limited proxy
requiredTimeLeft (int) – required proxy live time in a seconds
cacheTime (int) – store in a cache time in a seconds
filePath (str) – path to save proxy
proxyToConnect (X509Chain) – proxy as a chain
token (str) – valid token to get a proxy
- Returns:
S_OK(X509Chain)/S_ERROR()
- downloadVOMSProxy(**kwargs)
Download a proxy if needed and transform it into a VOMS one
- Parameters:
userDN (str) – user DN
userGroup (str) – user group
limited (boolean) – if need limited proxy
requiredTimeLeft (int) – required proxy live time in a seconds
cacheTime (int) – store in a cache time in a seconds
requiredVOMSAttribute (str) – VOMS attr to add to the proxy
proxyToConnect (X509Chain) – proxy as a chain
token (str) – valid token to get a proxy
- Returns:
S_OK(X509Chain)/S_ERROR()
- downloadVOMSProxyToFile(userDN, userGroup, limited=False, requiredTimeLeft=1200, cacheTime=14400, requiredVOMSAttribute=None, filePath=None, proxyToConnect=None, token=None)
Download a proxy if needed, transform it into a VOMS one and write it to file
- Parameters:
userDN (str) – user DN
userGroup (str) – user group
limited (boolean) – if need limited proxy
requiredTimeLeft (int) – required proxy live time in a seconds
cacheTime (int) – store in a cache time in a seconds
requiredVOMSAttribute (str) – VOMS attr to add to the proxy
filePath (str) – path to save proxy
proxyToConnect (X509Chain) – proxy as a chain
token (str) – valid token to get a proxy
- Returns:
S_OK(X509Chain)/S_ERROR()
- dumpProxyToFile(chain, destinationFile=None, requiredTimeLeft=600)
Dump a proxy to a file. It’s cached so multiple calls won’t generate extra files
- getDBContents(condDict={}, sorting=[['UserDN', 'DESC']], start=0, limit=0)
Get the contents of the db
- Parameters:
condDict (dict) – search condition
- Returns:
S_OK(dict)/S_ERROR() – dict contain fields, record list, total records
- getPayloadProxyFromDIRACGroup(userDN, userGroup, requiredTimeLeft, token=None, proxyToConnect=None)
Download a payload proxy with VOMS extensions depending on the group
- getPayloadProxyFromVOMSGroup(userDN, vomsAttr, token, requiredTimeLeft, proxyToConnect=None)
Download a payload proxy with VOMS extensions depending on the VOMS attr
- getPilotProxyFromDIRACGroup(userDN, userGroup, requiredTimeLeft=43200, proxyToConnect=None)
Download a pilot proxy with VOMS extensions depending on the group
- getPilotProxyFromVOMSGroup(userDN, vomsAttr, requiredTimeLeft=43200, proxyToConnect=None)
Download a pilot proxy with VOMS extensions depending on the group
- getUploadedProxyLifeTime(DN, group=None)
Get the remaining seconds for an uploaded proxy
- getUserPersistence(**kwargs)
Check if a user(DN-group) has a proxy in the proxy management Updates internal cache if needed to minimize queries to the service
- getUserProxiesInfo()
Get the user proxies uploaded info
- Returns:
S_OK(dict)/S_ERROR()
- getVOMSAttributes(chain)
Get the voms attributes for a chain
- Parameters:
chain (X509Chain) – proxy as a chain
- Returns:
S_OK(str)/S_ERROR()
- instance = <DIRAC.FrameworkSystem.Client.ProxyManagerClient.ProxyManagerClient object>
- renewProxy(proxyToBeRenewed=None, minLifeTime=3600, newProxyLifeTime=43200, proxyToConnect=None)
Renew a proxy using the ProxyManager
- requestToken(requesterDN, requesterGroup, numUses=1)
Request a number of tokens. usesList must be a list of integers and each integer is the number of uses a token must have
- setPersistency(userDN, userGroup, persistent)
Set the persistency for user/group