ldaptor.protocols.ldap package¶
Subpackages¶
Submodules¶
ldaptor.protocols.ldap.distinguishedname module¶
-
class
ldaptor.protocols.ldap.distinguishedname.
DistinguishedName
(magic=None, stringValue=None, listOfRDNs=None)[source]¶ LDAP Distinguished Name.
-
listOfRDNs
= None¶
-
-
exception
ldaptor.protocols.ldap.distinguishedname.
InvalidRelativeDistinguishedName
(rdn)[source]¶ Bases:
exceptions.Exception
Invalid relative distinguished name.
-
class
ldaptor.protocols.ldap.distinguishedname.
LDAPAttributeTypeAndValue
(stringValue=None, attributeType=None, value=None)[source]¶ -
attributeType
= None¶
-
value
= None¶
-
ldaptor.protocols.ldap.fetchschema module¶
ldaptor.protocols.ldap.ldapclient module¶
LDAP protocol client
-
class
ldaptor.protocols.ldap.ldapclient.
LDAPClient
[source]¶ Bases:
twisted.internet.protocol.Protocol
An LDAP client
-
berdecoder
= <LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallback=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls, 0x53: LDAPSearchResultReference} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x50: LDAPAbandonRequest, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x50: LDAPAbandonRequest, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>>¶
-
bind
(dn='', auth='')[source]¶ @depreciated: Use e.bind(auth).
@todo: Remove this method when there are no callers.
-
connectionLost
(reason=<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.>)[source]¶ Called when TCP connection has been lost
-
debug
= False¶
-
send
(op)[source]¶ Send an LDAP operation to the server.
@param op: the operation to send
@type op: LDAPProtocolRequest
@return: the response from server
@rtype: Deferred LDAPProtocolResponse
-
send_multiResponse
(op, handler, *args, **kwargs)[source]¶ Send an LDAP operation to the server, expecting one or more responses.
@param op: the operation to send
@type op: LDAPProtocolRequest
@param handler: a callable that will be called for each response. It should return a boolean, whether this was the final response.
@param args: positional arguments to pass to handler
@param kwargs: keyword arguments to pass to handler
@return: the result from the last handler as a deferred that completes when the last response has been received
@rtype: Deferred LDAPProtocolResponse
-
send_noResponse
(op)[source]¶ Send an LDAP operation to the server, with no response expected.
@param op: the operation to send @type op: LDAPProtocolRequest
-
-
exception
ldaptor.protocols.ldap.ldapclient.
LDAPClientConnectionLostException
(message=None)[source]¶
-
exception
ldaptor.protocols.ldap.ldapclient.
LDAPStartTLSBusyError
(onwire, message=None)[source]¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPOperationsError
ldaptor.protocols.ldap.ldapconnector module¶
ldaptor.protocols.ldap.ldaperrors module¶
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPAdminLimitExceeded
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'adminLimitExceeded'¶
-
resultCode
= 11¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPAffectsMultipleDSAs
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'affectsMultipleDSAs'¶
-
resultCode
= 71¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPAliasDereferencingProblem
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'aliasDereferencingProblem'¶
-
resultCode
= 36¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPAliasProblem
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'aliasProblem'¶
-
resultCode
= 33¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPAttributeOrValueExists
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'attributeOrValueExists'¶
-
resultCode
= 20¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPAuthMethodNotSupported
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'authMethodNotSupported'¶
-
resultCode
= 7¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPBusy
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'busy'¶
-
resultCode
= 51¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPCompareFalse
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'compareFalse'¶
-
resultCode
= 5¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPCompareTrue
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'compareTrue'¶
-
resultCode
= 6¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPConfidentialityRequired
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'confidentialityRequired'¶
-
resultCode
= 13¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPConstraintViolation
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'constraintViolation'¶
-
resultCode
= 19¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPEntryAlreadyExists
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'entryAlreadyExists'¶
-
resultCode
= 68¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPException
(message=None)[source]¶ Bases:
exceptions.Exception
,ldaptor.protocols.ldap.ldaperrors.LDAPResult
-
message
¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPInappropriateAuthentication
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'inappropriateAuthentication'¶
-
resultCode
= 48¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPInappropriateMatching
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'inappropriateMatching'¶
-
resultCode
= 18¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPInsufficientAccessRights
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'insufficientAccessRights'¶
-
resultCode
= 50¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPInvalidAttributeSyntax
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'invalidAttributeSyntax'¶
-
resultCode
= 21¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPInvalidCredentials
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'invalidCredentials'¶
-
resultCode
= 49¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPInvalidDNSyntax
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'invalidDNSyntax'¶
-
resultCode
= 34¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPLoopDetect
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'loopDetect'¶
-
resultCode
= 54¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPNamingViolation
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'namingViolation'¶
-
resultCode
= 64¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPNoSuchAttribute
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'noSuchAttribute'¶
-
resultCode
= 16¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPNoSuchObject
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'noSuchObject'¶
-
resultCode
= 32¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPNotAllowedOnNonLeaf
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'notAllowedOnNonLeaf'¶
-
resultCode
= 66¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPNotAllowedOnRDN
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'notAllowedOnRDN'¶
-
resultCode
= 67¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPObjectClassModsProhibited
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'objectClassModsProhibited'¶
-
resultCode
= 69¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPObjectClassViolation
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'objectClassViolation'¶
-
resultCode
= 65¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPOperationsError
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'operationsError'¶
-
resultCode
= 1¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPOther
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'other'¶
-
resultCode
= 80¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPProtocolError
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'protocolError'¶
-
resultCode
= 2¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPReferral
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'referral'¶
-
resultCode
= 10¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPSaslBindInProgress
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'saslBindInProgress'¶
-
resultCode
= 14¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPSizeLimitExceeded
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'sizeLimitExceeded'¶
-
resultCode
= 4¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPStrongAuthRequired
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'strongAuthRequired'¶
-
resultCode
= 8¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPTimeLimitExceeded
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'timeLimitExceeded'¶
-
resultCode
= 3¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPUndefinedAttributeType
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'undefinedAttributeType'¶
-
resultCode
= 17¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPUnknownError
(resultCode, message=None)[source]¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
resultCode
= None¶
-
-
exception
ldaptor.protocols.ldap.ldaperrors.
LDAPUnwillingToPerform
(message=None)¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPException
-
name
= 'unwillingToPerform'¶
-
resultCode
= 53¶
-
-
class
ldaptor.protocols.ldap.ldaperrors.
Success
(msg)[source]¶ Bases:
ldaptor.protocols.ldap.ldaperrors.LDAPResult
-
name
= 'success'¶
-
resultCode
= 0¶
-
ldaptor.protocols.ldap.ldapserver module¶
LDAP protocol server
-
class
ldaptor.protocols.ldap.ldapserver.
BaseLDAPServer
[source]¶ Bases:
twisted.internet.protocol.Protocol
-
berdecoder
= <LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallback=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls, 0x53: LDAPSearchResultReference} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x50: LDAPAbandonRequest, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x50: LDAPAbandonRequest, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>>¶
-
connectionLost
(reason=<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.>)[source]¶ Called when TCP connection has been lost
-
debug
= False¶
-
-
class
ldaptor.protocols.ldap.ldapserver.
LDAPServer
[source]¶ Bases:
ldaptor.protocols.ldap.ldapserver.BaseLDAPServer
An LDAP server
-
boundUser
= None¶
-
fail_LDAPAddRequest
¶ alias of
LDAPAddResponse
-
fail_LDAPBindRequest
¶ alias of
LDAPBindResponse
-
fail_LDAPDelRequest
¶ alias of
LDAPDelResponse
-
fail_LDAPExtendedRequest
¶ alias of
LDAPExtendedResponse
-
fail_LDAPModifyDNRequest
¶ alias of
LDAPModifyDNResponse
-
fail_LDAPModifyRequest
¶ alias of
LDAPModifyResponse
-
fail_LDAPSearchRequest
¶ alias of
LDAPSearchResultDone
-
ldaptor.protocols.ldap.ldapsyntax module¶
Pythonic API for LDAP operations.
-
exception
ldaptor.protocols.ldap.ldapsyntax.
CannotRemoveRDNError
(key, val=None)[source]¶ Bases:
exceptions.Exception
The attribute to be removed is the RDN for the object and cannot be removed.
-
exception
ldaptor.protocols.ldap.ldapsyntax.
DNNotPresentError
[source]¶ Bases:
exceptions.Exception
The requested DN cannot be found by the server.
-
ldaptor.protocols.ldap.ldapsyntax.
LDAPEntry
¶ alias of
LDAPEntryWithClient
-
class
ldaptor.protocols.ldap.ldapsyntax.
LDAPEntryWithAutoFill
(*args, **kwargs)[source]¶ Bases:
ldaptor.protocols.ldap.ldapsyntax.LDAPEntryWithClient
-
class
ldaptor.protocols.ldap.ldapsyntax.
LDAPEntryWithClient
(client, dn, attributes={}, complete=0)[source]¶ Bases:
ldaptor.entry.EditableLDAPEntry
-
journal
(journalOperation)[source]¶ Add a Modification into the list of modifications that need to be flushed to the LDAP server.
Normal callers should not use this, they should use the o[‘foo’]=[‘bar’, ‘baz’] -style API that enforces schema, handles errors and updates the cached data.
-
search
(filterText=None, filterObject=None, attributes=(), scope=None, derefAliases=None, sizeLimit=0, sizeLimitIsNonFatal=False, timeLimit=0, typesOnly=0, callback=None)[source]¶
-
setPasswordMaybe_ExtendedOperation
(newPasswd)¶ Set the password on this object.
@param newPasswd: A string containing the new password.
@return: A Deferred that will complete when the operation is done.
-
setPasswordMaybe_Samba
(newPasswd)[source]¶ Set the Samba password on this object if it is a sambaSamAccount or sambaAccount.
@param newPasswd: A string containing the new password.
@return: A Deferred that will complete when the operation is done.
-
setPassword_ExtendedOperation
(newPasswd)[source]¶ Set the password on this object.
@param newPasswd: A string containing the new password.
@return: A Deferred that will complete when the operation is done.
-
setPassword_Samba
(newPasswd, style=None)[source]¶ Set the Samba password on this object.
@param newPasswd: A string containing the new password.
@param style: one of ‘sambaSamAccount’, ‘sambaAccount’ or None. Specifies the style of samba accounts used. None is default and is the same as ‘sambaSamAccount’.
@return: A Deferred that will complete when the operation is done.
-
-
exception
ldaptor.protocols.ldap.ldapsyntax.
MatchNotImplemented
(op)[source]¶ Bases:
exceptions.NotImplementedError
Match type not implemented
-
exception
ldaptor.protocols.ldap.ldapsyntax.
NoContainingNamingContext
[source]¶ Bases:
exceptions.Exception
The server contains to LDAP naming context that would contain this object.
-
exception
ldaptor.protocols.ldap.ldapsyntax.
ObjectDeletedError
[source]¶ Bases:
ldaptor.protocols.ldap.ldapsyntax.ObjectInBadStateError
The LDAP object has already been removed, unable to perform operations on it.
-
exception
ldaptor.protocols.ldap.ldapsyntax.
ObjectDirtyError
[source]¶ Bases:
ldaptor.protocols.ldap.ldapsyntax.ObjectInBadStateError
The LDAP object has a journal which needs to be committed or undone before this operation.
-
exception
ldaptor.protocols.ldap.ldapsyntax.
ObjectInBadStateError
[source]¶ Bases:
exceptions.Exception
The LDAP object in in a bad state.
ldaptor.protocols.ldap.ldif module¶
Support for writing a set of directory entries as LDIF. You probably want to use this only indirectly, as in str(LDAPEntry(...)).
TODO support writing modify operations TODO support reading modify operations
TODO implement rest of syntax from RFC2849
ldaptor.protocols.ldap.ldifdelta module¶
-
class
ldaptor.protocols.ldap.ldifdelta.
LDIFDelta
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIF
-
MOD_SPEC_TO_DELTA
= {'add': <class 'ldaptor.delta.Add'>, 'replace': <class 'ldaptor.delta.Replace'>, 'delete': <class 'ldaptor.delta.Delete'>}¶
-
-
exception
ldaptor.protocols.ldap.ldifdelta.
LDIFDeltaAddMissingAttributesError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
Add operation needs to have atleast one attribute type and value.
-
exception
ldaptor.protocols.ldap.ldifdelta.
LDIFDeltaDeleteHasJunkAfterChangeTypeError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
Delete operation takes no attribute types or values.
-
exception
ldaptor.protocols.ldap.ldifdelta.
LDIFDeltaMissingChangeTypeError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF delta entry has no changetype.
-
exception
ldaptor.protocols.ldap.ldifdelta.
LDIFDeltaModificationDifferentAttributeTypeError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
The attribute type for the change is not the as in the mod-spec header line.
-
exception
ldaptor.protocols.ldap.ldifdelta.
LDIFDeltaModificationMissingEndDashError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF delta modification has no ending dash.
-
exception
ldaptor.protocols.ldap.ldifdelta.
LDIFDeltaUnknownModificationError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF delta modification has unknown mod-spec.
ldaptor.protocols.ldap.ldifprotocol module¶
-
class
ldaptor.protocols.ldap.ldifprotocol.
LDIF
[source]¶ Bases:
object
,twisted.protocols.basic.LineReceiver
-
connectionLost
(reason=<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.>)[source]¶
-
data
= None¶
-
delimiter
= '\n'¶
-
dn
= None¶
-
lastLine
= None¶
-
mode
= 'HEADER'¶
-
version
= None¶
-
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFEntryStartsWithNonDNError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF entry starts with a non-DN line
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFEntryStartsWithSpaceError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
Invalid LDIF value format
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFLineWithoutSemicolonError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF line without semicolon seen
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFParseError
[source]¶ Bases:
exceptions.Exception
Error parsing LDIF.
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFTruncatedError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF appears to be truncated
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFUnsupportedVersionError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
LDIF version not supported
-
exception
ldaptor.protocols.ldap.ldifprotocol.
LDIFVersionNotANumberError
[source]¶ Bases:
ldaptor.protocols.ldap.ldifprotocol.LDIFParseError
Non-numeric LDIF version number
ldaptor.protocols.ldap.proxy module¶
LDAP protocol proxy server
ldaptor.protocols.ldap.svcbindproxy module¶
-
class
ldaptor.protocols.ldap.svcbindproxy.
ServiceBindingProxy
(services=None, fallback=None, *a, **kw)[source]¶ Bases:
ldaptor.protocols.ldap.proxy.Proxy
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
- objectClass: serviceSecurityObject
- owner: the DN of the original bind attempt
- cn: the service name.
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.
-
fail_LDAPBindRequest
¶ alias of
LDAPBindResponse
-
fallback
= False¶
-
services
= []¶
Module contents¶
LDAP protocol logic