ProxyManagerHandler

ProxyManager is the implementation of the ProxyManagement service in the DISET framework

class DIRAC.FrameworkSystem.Service.ProxyManagerHandler.ProxyManagerHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

x.__init__(…) initializes x; see help(type(x)) for signature

args
message
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_getUserProxiesInfo = ['authenticated']
auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
export_completeDelegationUpload(requestId, pemChain)

Upload result of delegation

Parameters:
  • requestId (int,long) – identity number
  • pemChain (basestring) – certificate as string
Returns:

S_OK(dict)/S_ERROR() – dict contain proxies

export_deleteProxy(userDN, userGroup)

Delete a proxy from the DB

Parameters:
  • userDN (basestring) – user DN
  • userGroup (basestring) – DIRAC group
Returns:

S_OK()/S_ERROR()

export_deleteProxyBundle(idList)

delete a list of id’s

Parameters:idList (list,tuple) – list of identity numbers
Returns:S_OK(int)/S_ERROR()
static export_echo(data)

This method is used for testing performance of the service

Parameters:data (str) – data to be sent back to the caller
Returns:S_OK, Value is the input data
export_generateToken(requesterDN, requesterGroup, tokenUses)

Generate tokens for proxy retrieval

Parameters:
  • requesterDN (basestring) – user DN
  • requesterGroup (basestring) – DIRAC group
  • tokenUses (int,long) – number of uses
Returns:

S_OK(tuple)/S_ERROR() – tuple contain token, number uses

export_getContents(selDict, sortDict, start, limit)

Retrieve the contents of the DB

Parameters:
  • selDict (dict) – selection fields
  • sortDict (list,tuple) – sorting fields
  • start (int,long) – search limit start
  • start – search limit amount
Returns:

S_OK(dict)/S_ERROR() – dict contain fields, record list, total records

export_getLogContents(selDict, sortDict, start, limit)

Retrieve the contents of the DB

Parameters:
  • selDict (dict) – selection fields
  • sortDict (list,tuple) – search filter
  • start (int,long) – search limit start
  • start – search limit amount
Returns:

S_OK(dict)/S_ERROR() – dict contain fields, record list, total records

export_getProxy(userDN, userGroup, requestPem, requiredLifetime)

Get a proxy for a userDN/userGroup

Parameters:
  • requestPem – PEM encoded request object for delegation
  • requiredLifetime

    Argument for length of proxy

    • Properties:
      • FullDelegation <- permits full delegation of proxies
      • LimitedDelegation <- permits downloading only limited proxies
      • PrivateLimitedDelegation <- permits downloading only limited proxies for one self
export_getProxyWithToken(userDN, userGroup, requestPem, requiredLifetime, token)

Get a proxy for a userDN/userGroup

Parameters:
  • requestPem – PEM encoded request object for delegation
  • requiredLifetime – Argument for length of proxy
  • token

    Valid token to get a proxy

    • Properties:
      • FullDelegation <- permits full delegation of proxies
      • LimitedDelegation <- permits downloading only limited proxies
      • PrivateLimitedDelegation <- permits downloading only limited proxies for one self
export_getRegisteredUsers(validSecondsRequired=0)

Get the list of users who have a valid proxy in the system

Parameters:validSecondsRequired (int) – required seconds the proxy is valid for
Returns:S_OK(list)/S_ERROR() – list contain dicts with user name, DN, group expiration time, persistent flag
export_getUserProxiesInfo()

Get the info about the user proxies in the system

Returns:S_OK(dict)
export_getVOMSProxy(userDN, userGroup, requestPem, requiredLifetime, vomsAttribute=None)

Get a proxy for a userDN/userGroup

Parameters:
  • requestPem – PEM encoded request object for delegation
  • requiredLifetime – Argument for length of proxy
  • vomsAttribute

    VOMS attr to add to the proxy

    • Properties :
      • FullDelegation <- permits full delegation of proxies
      • LimitedDelegation <- permits downloading only limited proxies
      • PrivateLimitedDelegation <- permits downloading only limited proxies for one self
export_getVOMSProxyWithToken(userDN, userGroup, requestPem, requiredLifetime, token, vomsAttribute=None)

Get a proxy for a userDN/userGroup

Parameters:
  • requestPem – PEM encoded request object for delegation
  • requiredLifetime – Argument for length of proxy
  • vomsAttribute

    VOMS attr to add to the proxy

    • Properties :
      • FullDelegation <- permits full delegation of proxies
      • LimitedDelegation <- permits downloading only limited proxies
      • PrivateLimitedDelegation <- permits downloading only limited proxies for one self
export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:fromMaster (bool) – flag to refresh from the master configuration service
export_requestDelegationUpload(requestedUploadTime, diracGroup=None)

Request a delegation. Send a delegation request to client

Parameters:requestedUploadTime (int,long) – requested live time
Returns:S_OK(dict)/S_ERROR() – dict contain id and proxy as string of the request
export_setPersistency(userDN, userGroup, persistentFlag)

Set the persistency for a given dn/group

Parameters:
  • userDN (basestring) – user DN
  • userGroup (basestring) – DIRAC group
  • persistentFlag (boolean) – if proxy persistent
Returns:

S_OK()/S_ERROR()

classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:Value for serviceSection/optionName in the CS being defaultValue the default
getRemoteAddress()

Get the address of the remote peer.

Returns:Address of remote peer.
getRemoteCredentials()

Get the credentials of the remote peer.

Returns:Credentials dictionary of remote peer.
initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(serviceInfoDict)
srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:Value for serviceSection/optionName in the CS being defaultValue the default
srv_getClientSetup()
srv_getClientVO()
srv_getClientVersion()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns:Address of remote peer.
srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns:Credentials dictionary of remote peer.
classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_completeDelegationUpload = [(<type 'int'>, <type 'long'>), <type 'basestring'>]
types_deleteProxy = [(<type 'list'>, <type 'tuple'>)]
types_deleteProxyBundle = [(<type 'list'>, <type 'tuple'>)]
types_echo = [<type 'basestring'>]
types_generateToken = [<type 'basestring'>, <type 'basestring'>, (<type 'int'>, <type 'long'>)]
types_getContents = [<type 'dict'>, (<type 'list'>, <type 'tuple'>), (<type 'int'>, <type 'long'>), (<type 'int'>, <type 'long'>)]
types_getLogContents = [<type 'dict'>, (<type 'list'>, <type 'tuple'>), (<type 'int'>, <type 'long'>), (<type 'int'>, <type 'long'>)]
types_getProxy = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>, (<type 'int'>, <type 'long'>)]
types_getProxyWithToken = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>, (<type 'int'>, <type 'long'>), <type 'basestring'>]
types_getRegisteredUsers = []
types_getUserProxiesInfo = []
types_getVOMSProxy = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>, (<type 'int'>, <type 'long'>), [<type 'basestring'>, <type 'NoneType'>]]
types_getVOMSProxyWithToken = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>, (<type 'int'>, <type 'long'>), [<type 'basestring'>, <type 'NoneType'>]]
types_ping = []
types_refreshConfiguration = [<type 'bool'>]
types_requestDelegationUpload = [[<type 'int'>, <type 'long'>], [<type 'basestring'>, <type 'bool'>, <type 'NoneType'>]]
types_setPersistency = [<type 'basestring'>, <type 'basestring'>, <type 'bool'>]