class documentation

An LDAP server proxy. Override `handleBeforeForwardRequest()` to inspect/modify requests from the client. Override `handleProxiedResponse()` to inspect/modify responses from the proxied server.

Method __init__ Undocumented
Method connectionLost Called when TCP connection has been lost
Method connectionMade Establish a connection with an LDAP client.
Method handle_LDAPExtendedRequest Handler for extended LDAP requests (e.g. startTLS).
Method handle_LDAPUnbindRequest The client has requested to gracefully end the connection. Disconnect from the proxied server.
Method handleBeforeForwardRequest Override to modify request and/or controls forwarded on to the proxied server. Must return a tuple of request, controls or a deferred that fires the same. Return `None` or a deferred that fires `None` to bypass forwarding the request to the proxied server...
Method handleProxiedResponse Override to intercept and modify proxied responses. Must return the modified response or a deferred that fires the modified response.
Method handleStartTLSRequest If the protocol factory has an `options` attribute it is assumed to be a `twisted.internet.ssl.CertificateOptions` that can be used to initiate TLS on the transport.
Method handleUnknown Forwards requests to the proxied server. This handler is overridden from `ldaptor.protocol.ldap.server.BaseServer`. And request for which no corresponding `handle_xxx()` method is implemented is dispatched to this handler.
Class Variable clientConnector Undocumented
Class Variable use_tls Undocumented
Instance Variable client Undocumented
Instance Variable queuedRequests Undocumented
Instance Variable startTLS_initiated Undocumented
Instance Variable unbound Undocumented
Method _connectedToProxiedServer The connection to the proxied server is set up.
Method _establishedTLS TLS has been started. Process any backlog of requests.
Method _failedToConnectToProxiedServer The connection to the proxied server failed.
Method _forwardRequestToProxiedServer Forward the original requests to the proxied server.
Method _gotResponseFromProxiedServer Returns True if this is the last response to the request.
Method _processBacklog Process the backlog of requests.

Inherited from BaseLDAPServer:

Method checkControls Undocumented
Method dataReceived Undocumented
Method failDefault Undocumented
Method handle Undocumented
Method queue Undocumented
Method unsolicitedNotification Undocumented
Class Variable berdecoder Undocumented
Class Variable debug Undocumented
Instance Variable buffer Undocumented
Instance Variable connected Undocumented
Method _callErrorHandler Undocumented
Method _cbHandle Undocumented
Method _cbLDAPError Undocumented
Method _cbOtherError Undocumented
def connectionLost(self, reason): (source)

Called when TCP connection has been lost

def connectionMade(self): (source)

Establish a connection with an LDAP client.

def handle_LDAPExtendedRequest(self, request, controls, reply): (source)

Handler for extended LDAP requests (e.g. startTLS).

def handle_LDAPUnbindRequest(self, request, controls, reply): (source)

The client has requested to gracefully end the connection. Disconnect from the proxied server.

def handleBeforeForwardRequest(self, request, controls, reply): (source)

Override to modify request and/or controls forwarded on to the proxied server. Must return a tuple of request, controls or a deferred that fires the same. Return `None` or a deferred that fires `None` to bypass forwarding the request to the proxied server. In this case, any response can be sent to the client via `reply(response)`.

def handleProxiedResponse(self, response, request, controls): (source)

Override to intercept and modify proxied responses. Must return the modified response or a deferred that fires the modified response.

def handleStartTLSRequest(self, request, controls, reply): (source)

If the protocol factory has an `options` attribute it is assumed to be a `twisted.internet.ssl.CertificateOptions` that can be used to initiate TLS on the transport. Otherwise, this method returns an `unavailable` result code.

def handleUnknown(self, request, controls, reply): (source)

Forwards requests to the proxied server. This handler is overridden from `ldaptor.protocol.ldap.server.BaseServer`. And request for which no corresponding `handle_xxx()` method is implemented is dispatched to this handler.

clientConnector = (source)

Undocumented

use_tls: bool = (source)

Undocumented

client = (source)

Undocumented

queuedRequests: list = (source)

Undocumented

startTLS_initiated: bool = (source)

Undocumented

unbound: bool = (source)

Undocumented

def _connectedToProxiedServer(self, proto): (source)

The connection to the proxied server is set up.

def _establishedTLS(self, proto): (source)

TLS has been started. Process any backlog of requests.

def _failedToConnectToProxiedServer(self, err): (source)

The connection to the proxied server failed.

def _forwardRequestToProxiedServer(self, request, controls, reply): (source)

Forward the original requests to the proxied server.

def _gotResponseFromProxiedServer(self, response, reply, request, controls, dseq): (source)

Returns True if this is the last response to the request.

def _processBacklog(self): (source)

Process the backlog of requests.