Package ldaptor :: Package protocols :: Package ldap :: Module svcbindproxy :: Class ServiceBindingProxy
[hide private]
[frames] | no frames]

Class ServiceBindingProxy

source code

twisted.internet.protocol.BaseProtocol --+            
                                         |            
        twisted.internet.protocol.Protocol --+        
                                             |        
                     ldapserver.BaseLDAPServer --+    
                                                 |    
                                       proxy.Proxy --+
                                                     |
                                                    ServiceBindingProxy

An LDAP proxy that handles non-anonymous bind requests specially.

BindRequests are intercepted and authentication is attempted against each configured service. This authentication is performed against a separate LDAP entry, found by searching for entries with

starting at the identity-base as configured in the config file.

Finally, if the authentication does not succeed against any of the configured services, the proxy can fallback to passing the bind request to the real server.

Nested Classes [hide private]
  fail_LDAPBindRequest

Inherited from proxy.Proxy: protocol

Instance Methods [hide private]
 
__init__(self, services=None, fallback=None, *a, **kw)
Initialize the object.
source code
 
_startSearch(self, request, controls, reply) source code
 
_maybeFallback(self, entry, request, controls, reply) source code
 
timestamp(self) source code
 
_tryService(self, services, baseEntry, request, controls, reply) source code
 
_loopIfNone(self, r, *a, **kw) source code
 
_loopIfBindError(self, fail, *a, **kw) source code
 
handle_LDAPBindRequest(self, request, controls, reply) source code

Inherited from proxy.Proxy: connectionLost, connectionMade, handleUnknown, handle_LDAPUnbindRequest

Inherited from ldapserver.BaseLDAPServer: checkControls, dataReceived, failDefault, handle, queue, unsolicitedNotification

Inherited from twisted.internet.protocol.Protocol: __provides__, logPrefix

Inherited from twisted.internet.protocol.BaseProtocol: __providedBy__, makeConnection

Class Variables [hide private]
  services = []
  fallback = False
hash(x)

Inherited from proxy.Proxy: client, unbound, waitingConnect

Inherited from ldapserver.BaseLDAPServer: berdecoder, debug

Inherited from twisted.internet.protocol.Protocol: __implemented__

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Method Details [hide private]

__init__(self, services=None, fallback=None, *a, **kw)
(Constructor)

source code 

Initialize the object.

Parameters:
  • services - List of service names to try to bind against.
  • fallback - If none of the attempts to authenticate against a specific service succeeded, whether to fall back to the normal LDAP bind mechanism.
Overrides: ldapserver.BaseLDAPServer.__init__