PlainTransport

class DIRAC.Core.DISET.private.Transports.PlainTransport.PlainTransport(stServerAddress, bServerMode=False, **kwargs)

Bases: BaseTransport

__init__(stServerAddress, bServerMode=False, **kwargs)
acceptConnection()
bAllowReuseAddress = True
close()
getAppData()
getConnectingCredentials()
Returns:

dictionary with credentials

Return empty dictionary for plainTransport.

In SSLTransport it contains (after the handshake):

  • ’DN’ : All identity name, e.g. `/C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser`

  • ’CN’ : Only the user name e.g. ciuser

  • ’x509Chain’ : List of all certificates in the chain

  • ’isProxy’ : True if the client use proxy certificate

  • ’isLimitedProxy’ : True if the client use limited proxy certificate

  • ’group’ (optional): Dirac group attached to the client

  • ’extraCredentials’ (optional): Extra credentials if exists

Before the handshake, dictionary is empty

getFormattedCredentials()
getKeepAliveLapse()
getLastActionTimestamp()
getLocalAddress()
getRemoteAddress()
getSocket()
handshake()

This method is overwritten by SSLTransport if we use a secured transport.

iListenQueueSize = 128
iReadTimeout = 600
initAsClient()
initAsServer()
keepAliveMagic = b'dka'
latestServerRenewTime()
receiveData(maxBufferSize=0, blockAfterKeepAlive=True, idleReceive=False)
renewServerContext()
sendData(uData, prefix=b'')
sendKeepAlive(responseId=None, now=False)
serverMode()
setAppData(appData)
setClientSocket(oSocket)
setExtraCredentials(extraCredentials)

Add extra credentials to peerCredentials

Parameters:

extraCredentials (str or tuple) – group or tuple with DN and group

setSocketTimeout(timeout)

This method has to be overwritten, if we want to increase the socket timeout.

DIRAC.Core.DISET.private.Transports.PlainTransport.checkSanity(*args, **kwargs)
DIRAC.Core.DISET.private.Transports.PlainTransport.delegate(delegationRequest, kwargs)

Check delegate!