Add stubs for ldap3 (#6561)

This commit is contained in:
Sebastian Rittau
2021-12-10 19:18:07 +01:00
committed by GitHub
parent 739a052c40
commit 74ecc2904b
113 changed files with 2877 additions and 0 deletions

View File

@@ -32,6 +32,7 @@
"stubs/humanfriendly",
"stubs/jmespath",
"stubs/jsonschema",
"stubs/ldap3",
"stubs/Markdown",
"stubs/mysqlclient",
"stubs/oauthlib",

View File

@@ -0,0 +1 @@
ldap3.protocol.sasl.kerberos # requires gssapi package to import

View File

@@ -0,0 +1,2 @@
version = "2.9.*"
requires = [] # requires types-pyasn1 (not available yet)

View File

@@ -0,0 +1,104 @@
from typing import Any, Tuple, Type
from typing_extensions import Literal
from .abstract.attrDef import AttrDef as AttrDef
from .abstract.attribute import (
Attribute as Attribute,
OperationalAttribute as OperationalAttribute,
WritableAttribute as WritableAttribute,
)
from .abstract.cursor import Reader as Reader, Writer as Writer
from .abstract.entry import Entry as Entry, WritableEntry as WritableEntry
from .abstract.objectDef import ObjectDef as ObjectDef
from .core.connection import Connection as Connection
from .core.pooling import ServerPool as ServerPool
from .core.rdns import ReverseDnsSetting as ReverseDnsSetting
from .core.server import Server as Server
from .core.tls import Tls as Tls
from .protocol.rfc4512 import DsaInfo as DsaInfo, SchemaInfo as SchemaInfo
from .utils.config import get_config_parameter as get_config_parameter, set_config_parameter as set_config_parameter
from .version import __description__ as __description__, __status__ as __status__, __url__ as __url__
ANONYMOUS: Literal["ANONYMOUS"]
SIMPLE: Literal["SIMPLE"]
SASL: Literal["SASL"]
NTLM: Literal["NTLM"]
EXTERNAL: Literal["EXTERNAL"]
DIGEST_MD5: Literal["DIGEST-MD5"]
KERBEROS: Literal["GSSAPI"]
GSSAPI: Literal["GSSAPI"]
PLAIN: Literal["PLAIN"]
AUTO_BIND_DEFAULT: Literal["DEFAULT"]
AUTO_BIND_NONE: Literal["NONE"]
AUTO_BIND_NO_TLS: Literal["NO_TLS"]
AUTO_BIND_TLS_BEFORE_BIND: Literal["TLS_BEFORE_BIND"]
AUTO_BIND_TLS_AFTER_BIND: Literal["TLS_AFTER_BIND"]
IP_SYSTEM_DEFAULT: Literal["IP_SYSTEM_DEFAULT"]
IP_V4_ONLY: Literal["IP_V4_ONLY"]
IP_V6_ONLY: Literal["IP_V6_ONLY"]
IP_V4_PREFERRED: Literal["IP_V4_PREFERRED"]
IP_V6_PREFERRED: Literal["IP_V6_PREFERRED"]
BASE: Literal["BASE"]
LEVEL: Literal["LEVEL"]
SUBTREE: Literal["SUBTREE"]
DEREF_NEVER: Literal["NEVER"]
DEREF_SEARCH: Literal["SEARCH"]
DEREF_BASE: Literal["FINDING_BASE"]
DEREF_ALWAYS: Literal["ALWAYS"]
ALL_ATTRIBUTES: Literal["*"]
NO_ATTRIBUTES: Literal["1.1"]
ALL_OPERATIONAL_ATTRIBUTES: Literal["+"]
MODIFY_ADD: Literal["MODIFY_ADD"]
MODIFY_DELETE: Literal["MODIFY_DELETE"]
MODIFY_REPLACE: Literal["MODIFY_REPLACE"]
MODIFY_INCREMENT: Literal["MODIFY_INCREMENT"]
SYNC: Literal["SYNC"]
SAFE_SYNC: Literal["SAFE_SYNC"]
SAFE_RESTARTABLE: Literal["SAFE_RESTARTABLE"]
ASYNC: Literal["ASYNC"]
LDIF: Literal["LDIF"]
RESTARTABLE: Literal["RESTARTABLE"]
REUSABLE: Literal["REUSABLE"]
MOCK_SYNC: Literal["MOCK_SYNC"]
MOCK_ASYNC: Literal["MOCK_ASYNC"]
ASYNC_STREAM: Literal["ASYNC_STREAM"]
NONE: Literal["NO_INFO"]
DSA: Literal["DSA"]
SCHEMA: Literal["SCHEMA"]
ALL: Literal["ALL"]
OFFLINE_EDIR_8_8_8: Literal["EDIR_8_8_8"]
OFFLINE_EDIR_9_1_4: Literal["EDIR_9_1_4"]
OFFLINE_AD_2012_R2: Literal["AD_2012_R2"]
OFFLINE_SLAPD_2_4: Literal["SLAPD_2_4"]
OFFLINE_DS389_1_3_3: Literal["DS389_1_3_3"]
FIRST: Literal["FIRST"]
ROUND_ROBIN: Literal["ROUND_ROBIN"]
RANDOM: Literal["RANDOM"]
HASHED_NONE: Literal["PLAIN"]
HASHED_SHA: Literal["SHA"]
HASHED_SHA256: Literal["SHA256"]
HASHED_SHA384: Literal["SHA384"]
HASHED_SHA512: Literal["SHA512"]
HASHED_MD5: Literal["MD5"]
HASHED_SALTED_SHA: Literal["SALTED_SHA"]
HASHED_SALTED_SHA256: Literal["SALTED_SHA256"]
HASHED_SALTED_SHA384: Literal["SALTED_SHA384"]
HASHED_SALTED_SHA512: Literal["SALTED_SHA512"]
HASHED_SALTED_MD5: Literal["SALTED_MD5"]
NUMERIC_TYPES: Tuple[Type[Any], ...]
INTEGER_TYPES: Tuple[Type[Any], ...]
STRING_TYPES: Tuple[Type[Any], ...]
SEQUENCE_TYPES: Tuple[Type[Any], ...]

View File

@@ -0,0 +1,15 @@
from typing import Any
STATUS_INIT: str
STATUS_VIRTUAL: str
STATUS_MANDATORY_MISSING: str
STATUS_READ: str
STATUS_WRITABLE: str
STATUS_PENDING_CHANGES: str
STATUS_COMMITTED: str
STATUS_READY_FOR_DELETION: str
STATUS_READY_FOR_MOVING: str
STATUS_READY_FOR_RENAMING: str
STATUS_DELETED: str
STATUSES: Any
INITIAL_STATUSES: Any

View File

@@ -0,0 +1,33 @@
from typing import Any
class AttrDef:
name: Any
key: Any
validate: Any
pre_query: Any
post_query: Any
default: Any
dereference_dn: Any
description: Any
mandatory: Any
single_value: Any
oid_info: Any
other_names: Any
def __init__(
self,
name,
key: Any | None = ...,
validate: Any | None = ...,
pre_query: Any | None = ...,
post_query: Any | None = ...,
default=...,
dereference_dn: Any | None = ...,
description: Any | None = ...,
mandatory: bool = ...,
single_value: Any | None = ...,
alias: Any | None = ...,
) -> None: ...
def __eq__(self, other): ...
def __lt__(self, other): ...
def __hash__(self): ...
def __setattr__(self, key, value) -> None: ...

View File

@@ -0,0 +1,34 @@
from typing import Any
class Attribute:
key: Any
definition: Any
values: Any
raw_values: Any
response: Any
entry: Any
cursor: Any
other_names: Any
def __init__(self, attr_def, entry, cursor) -> None: ...
def __len__(self): ...
def __iter__(self): ...
def __getitem__(self, item): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
@property
def value(self): ...
class OperationalAttribute(Attribute): ...
class WritableAttribute(Attribute):
def __iadd__(self, other): ...
def __isub__(self, other): ...
def add(self, values) -> None: ...
def set(self, values) -> None: ...
def delete(self, values) -> None: ...
def remove(self) -> None: ...
def discard(self) -> None: ...
@property
def virtual(self): ...
@property
def changes(self): ...

View File

@@ -0,0 +1,102 @@
from typing import Any, NamedTuple
class Operation(NamedTuple):
request: Any
result: Any
response: Any
class Cursor:
connection: Any
get_operational_attributes: Any
definition: Any
attributes: Any
controls: Any
execution_time: Any
entries: Any
schema: Any
def __init__(
self,
connection,
object_def,
get_operational_attributes: bool = ...,
attributes: Any | None = ...,
controls: Any | None = ...,
auxiliary_class: Any | None = ...,
) -> None: ...
def __iter__(self): ...
def __getitem__(self, item): ...
def __len__(self): ...
def __bool__(self): ...
def match_dn(self, dn): ...
def match(self, attributes, value): ...
def remove(self, entry) -> None: ...
@property
def operations(self): ...
@property
def errors(self): ...
@property
def failed(self): ...
class Reader(Cursor):
entry_class: Any
attribute_class: Any
entry_initial_status: Any
sub_tree: Any
base: Any
dereference_aliases: Any
validated_query: Any
query_filter: Any
def __init__(
self,
connection,
object_def,
base,
query: str = ...,
components_in_and: bool = ...,
sub_tree: bool = ...,
get_operational_attributes: bool = ...,
attributes: Any | None = ...,
controls: Any | None = ...,
auxiliary_class: Any | None = ...,
) -> None: ...
@property
def query(self): ...
@query.setter
def query(self, value) -> None: ...
@property
def components_in_and(self): ...
@components_in_and.setter
def components_in_and(self, value) -> None: ...
def clear(self) -> None: ...
execution_time: Any
entries: Any
def reset(self) -> None: ...
def search(self, attributes: Any | None = ...): ...
def search_object(self, entry_dn: Any | None = ..., attributes: Any | None = ...): ...
def search_level(self, attributes: Any | None = ...): ...
def search_subtree(self, attributes: Any | None = ...): ...
def search_paged(self, paged_size, paged_criticality: bool = ..., generator: bool = ..., attributes: Any | None = ...): ...
class Writer(Cursor):
entry_class: Any
attribute_class: Any
entry_initial_status: Any
@staticmethod
def from_cursor(cursor, connection: Any | None = ..., object_def: Any | None = ..., custom_validator: Any | None = ...): ...
@staticmethod
def from_response(connection, object_def, response: Any | None = ...): ...
dereference_aliases: Any
def __init__(
self,
connection,
object_def,
get_operational_attributes: bool = ...,
attributes: Any | None = ...,
controls: Any | None = ...,
auxiliary_class: Any | None = ...,
) -> None: ...
execution_time: Any
def commit(self, refresh: bool = ...): ...
def discard(self) -> None: ...
def new(self, dn): ...
def refresh_entry(self, entry, tries: int = ..., seconds: int = ...): ...

View File

@@ -0,0 +1,83 @@
from typing import Any
class EntryState:
dn: Any
status: Any
attributes: Any
raw_attributes: Any
response: Any
cursor: Any
origin: Any
read_time: Any
changes: Any
definition: Any
def __init__(self, dn, cursor) -> None: ...
def set_status(self, status) -> None: ...
@property
def entry_raw_attributes(self): ...
class EntryBase:
def __init__(self, dn, cursor) -> None: ...
def __iter__(self): ...
def __contains__(self, item): ...
def __getattr__(self, item): ...
def __setattr__(self, item, value) -> None: ...
def __getitem__(self, item): ...
def __eq__(self, other): ...
def __lt__(self, other): ...
@property
def entry_dn(self): ...
@property
def entry_cursor(self): ...
@property
def entry_status(self): ...
@property
def entry_definition(self): ...
@property
def entry_raw_attributes(self): ...
def entry_raw_attribute(self, name): ...
@property
def entry_mandatory_attributes(self): ...
@property
def entry_attributes(self): ...
@property
def entry_attributes_as_dict(self): ...
@property
def entry_read_time(self): ...
def entry_to_json(
self,
raw: bool = ...,
indent: int = ...,
sort: bool = ...,
stream: Any | None = ...,
checked_attributes: bool = ...,
include_empty: bool = ...,
): ...
def entry_to_ldif(
self, all_base64: bool = ..., line_separator: Any | None = ..., sort_order: Any | None = ..., stream: Any | None = ...
): ...
class Entry(EntryBase):
def entry_writable(
self,
object_def: Any | None = ...,
writer_cursor: Any | None = ...,
attributes: Any | None = ...,
custom_validator: Any | None = ...,
auxiliary_class: Any | None = ...,
): ...
class WritableEntry(EntryBase):
def __setitem__(self, key, value) -> None: ...
def __setattr__(self, item, value) -> None: ...
def __getattr__(self, item): ...
@property
def entry_virtual_attributes(self): ...
def entry_commit_changes(self, refresh: bool = ..., controls: Any | None = ..., clear_history: bool = ...): ...
def entry_discard_changes(self) -> None: ...
def entry_delete(self) -> None: ...
def entry_refresh(self, tries: int = ..., seconds: int = ...): ...
def entry_move(self, destination_dn) -> None: ...
def entry_rename(self, new_name) -> None: ...
@property
def entry_changes(self): ...

View File

@@ -0,0 +1,23 @@
from typing import Any
class ObjectDef:
def __init__(
self,
object_class: Any | None = ...,
schema: Any | None = ...,
custom_validator: Any | None = ...,
auxiliary_class: Any | None = ...,
) -> None: ...
def __getitem__(self, item): ...
def __getattr__(self, item): ...
def __setattr__(self, key, value) -> None: ...
def __iadd__(self, other): ...
def __isub__(self, other): ...
def __iter__(self): ...
def __len__(self): ...
def __bool__(self): ...
def __contains__(self, item): ...
def add_from_schema(self, attribute_name, mandatory: bool = ...) -> None: ...
def add_attribute(self, definition: Any | None = ...) -> None: ...
def remove_attribute(self, item) -> None: ...
def clear_attributes(self) -> None: ...

View File

View File

@@ -0,0 +1,170 @@
from _typeshed import Self
from types import TracebackType
from typing import Any, Type
from typing_extensions import Literal
from .server import Server
SASL_AVAILABLE_MECHANISMS: Any
CLIENT_STRATEGIES: Any
class Connection:
connection_lock: Any
last_error: str
strategy_type: Any
user: Any
password: Any
authentication: Any
version: Any
auto_referrals: Any
request: Any
response: Any | None
result: Any
bound: bool
listening: bool
closed: bool
auto_bind: Any
sasl_mechanism: Any
sasl_credentials: Any
socket: Any
tls_started: bool
sasl_in_progress: bool
read_only: Any
lazy: Any
pool_name: Any
pool_size: int | None
cred_store: Any
pool_lifetime: Any
pool_keepalive: Any
starting_tls: bool
check_names: Any
raise_exceptions: Any
auto_range: Any
extend: Any
fast_decoder: Any
receive_timeout: Any
empty_attributes: Any
use_referral_cache: Any
auto_escape: Any
auto_encode: Any
source_address: Any
source_port_list: Any
server_pool: Any | None
server: Any
strategy: Any
send: Any
open: Any
get_response: Any
post_send_single_response: Any
post_send_search: Any
def __init__(
self,
server: Server | str,
user: str | None = ...,
password: str | None = ...,
auto_bind: Literal["DEFAULT", "NONE", "NO_TLS", "TLS_BEFORE_BIND", "TLS_AFTER_BIND"] = ...,
version: int = ...,
authentication: Literal["ANONYMOUS", "SIMPLE", "SASL", "NTLM"] | None = ...,
client_strategy: Literal[
"SYNC", "SAFE_SYNC", "ASYNC", "LDIF", "RESTARTABLE", "REUSABLE", "MOCK_SYNC", "MOCK_ASYNC", "ASYNC_STREAM"
] = ...,
auto_referrals: bool = ...,
auto_range: bool = ...,
sasl_mechanism: str | None = ...,
sasl_credentials: Any | None = ...,
check_names: bool = ...,
collect_usage: bool = ...,
read_only: bool = ...,
lazy: bool = ...,
raise_exceptions: bool = ...,
pool_name: str | None = ...,
pool_size: int | None = ...,
pool_lifetime: int | None = ...,
cred_store: Any | None = ...,
fast_decoder: bool = ...,
receive_timeout: Any | None = ...,
return_empty_attributes: bool = ...,
use_referral_cache: bool = ...,
auto_escape: bool = ...,
auto_encode: bool = ...,
pool_keepalive: Any | None = ...,
source_address: str | None = ...,
source_port: int | None = ...,
source_port_list: Any | None = ...,
) -> None: ...
def repr_with_sensitive_data_stripped(self): ...
@property
def stream(self): ...
@stream.setter
def stream(self, value) -> None: ...
@property
def usage(self): ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> Literal[False] | None: ...
def bind(self, read_server_info: bool = ..., controls: Any | None = ...): ...
def rebind(
self,
user: Any | None = ...,
password: Any | None = ...,
authentication: Any | None = ...,
sasl_mechanism: Any | None = ...,
sasl_credentials: Any | None = ...,
read_server_info: bool = ...,
controls: Any | None = ...,
): ...
def unbind(self, controls: Any | None = ...): ...
def search(
self,
search_base: str,
search_filter: str,
search_scope: Literal["BASE", "LEVEL", "SUBTREE"] = ...,
dereference_aliases: Literal["NEVER", "SEARCH", "FINDING_BASE", "ALWAYS"] = ...,
attributes: Any | None = ...,
size_limit: int = ...,
time_limit: int = ...,
types_only: bool = ...,
get_operational_attributes: bool = ...,
controls: Any | None = ...,
paged_size: int | None = ...,
paged_criticality: bool = ...,
paged_cookie: str | bytes | None = ...,
auto_escape: bool | None = ...,
): ...
def compare(self, dn, attribute, value, controls: Any | None = ...): ...
def add(self, dn, object_class: Any | None = ..., attributes: Any | None = ..., controls: Any | None = ...): ...
def delete(self, dn, controls: Any | None = ...): ...
def modify(self, dn, changes, controls: Any | None = ...): ...
def modify_dn(
self, dn, relative_dn, delete_old_dn: bool = ..., new_superior: Any | None = ..., controls: Any | None = ...
): ...
def abandon(self, message_id, controls: Any | None = ...): ...
def extended(
self, request_name, request_value: Any | None = ..., controls: Any | None = ..., no_encode: Any | None = ...
): ...
def start_tls(self, read_server_info: bool = ...): ...
def do_sasl_bind(self, controls): ...
def do_ntlm_bind(self, controls): ...
def refresh_server_info(self) -> None: ...
def response_to_ldif(
self,
search_result: Any | None = ...,
all_base64: bool = ...,
line_separator: Any | None = ...,
sort_order: Any | None = ...,
stream: Any | None = ...,
): ...
def response_to_json(
self,
raw: bool = ...,
search_result: Any | None = ...,
indent: int = ...,
sort: bool = ...,
stream: Any | None = ...,
checked_attributes: bool = ...,
include_empty: bool = ...,
): ...
def response_to_file(self, target, raw: bool = ..., indent: int = ..., sort: bool = ...) -> None: ...
@property
def entries(self): ...

View File

@@ -0,0 +1,146 @@
import socket
from typing import Any, Type, TypeVar
_T = TypeVar("_T")
class LDAPException(Exception): ...
class LDAPOperationResult(LDAPException):
def __new__(
cls: Type[_T],
result: Any | None = ...,
description: Any | None = ...,
dn: Any | None = ...,
message: Any | None = ...,
response_type: Any | None = ...,
response: Any | None = ...,
) -> _T: ...
result: Any
description: Any
dn: Any
message: Any
type: Any
response: Any
def __init__(
self,
result: Any | None = ...,
description: Any | None = ...,
dn: Any | None = ...,
message: Any | None = ...,
response_type: Any | None = ...,
response: Any | None = ...,
) -> None: ...
class LDAPOperationsErrorResult(LDAPOperationResult): ...
class LDAPProtocolErrorResult(LDAPOperationResult): ...
class LDAPTimeLimitExceededResult(LDAPOperationResult): ...
class LDAPSizeLimitExceededResult(LDAPOperationResult): ...
class LDAPAuthMethodNotSupportedResult(LDAPOperationResult): ...
class LDAPStrongerAuthRequiredResult(LDAPOperationResult): ...
class LDAPReferralResult(LDAPOperationResult): ...
class LDAPAdminLimitExceededResult(LDAPOperationResult): ...
class LDAPUnavailableCriticalExtensionResult(LDAPOperationResult): ...
class LDAPConfidentialityRequiredResult(LDAPOperationResult): ...
class LDAPSASLBindInProgressResult(LDAPOperationResult): ...
class LDAPNoSuchAttributeResult(LDAPOperationResult): ...
class LDAPUndefinedAttributeTypeResult(LDAPOperationResult): ...
class LDAPInappropriateMatchingResult(LDAPOperationResult): ...
class LDAPConstraintViolationResult(LDAPOperationResult): ...
class LDAPAttributeOrValueExistsResult(LDAPOperationResult): ...
class LDAPInvalidAttributeSyntaxResult(LDAPOperationResult): ...
class LDAPNoSuchObjectResult(LDAPOperationResult): ...
class LDAPAliasProblemResult(LDAPOperationResult): ...
class LDAPInvalidDNSyntaxResult(LDAPOperationResult): ...
class LDAPAliasDereferencingProblemResult(LDAPOperationResult): ...
class LDAPInappropriateAuthenticationResult(LDAPOperationResult): ...
class LDAPInvalidCredentialsResult(LDAPOperationResult): ...
class LDAPInsufficientAccessRightsResult(LDAPOperationResult): ...
class LDAPBusyResult(LDAPOperationResult): ...
class LDAPUnavailableResult(LDAPOperationResult): ...
class LDAPUnwillingToPerformResult(LDAPOperationResult): ...
class LDAPLoopDetectedResult(LDAPOperationResult): ...
class LDAPNamingViolationResult(LDAPOperationResult): ...
class LDAPObjectClassViolationResult(LDAPOperationResult): ...
class LDAPNotAllowedOnNotLeafResult(LDAPOperationResult): ...
class LDAPNotAllowedOnRDNResult(LDAPOperationResult): ...
class LDAPEntryAlreadyExistsResult(LDAPOperationResult): ...
class LDAPObjectClassModsProhibitedResult(LDAPOperationResult): ...
class LDAPAffectMultipleDSASResult(LDAPOperationResult): ...
class LDAPOtherResult(LDAPOperationResult): ...
class LDAPLCUPResourcesExhaustedResult(LDAPOperationResult): ...
class LDAPLCUPSecurityViolationResult(LDAPOperationResult): ...
class LDAPLCUPInvalidDataResult(LDAPOperationResult): ...
class LDAPLCUPUnsupportedSchemeResult(LDAPOperationResult): ...
class LDAPLCUPReloadRequiredResult(LDAPOperationResult): ...
class LDAPCanceledResult(LDAPOperationResult): ...
class LDAPNoSuchOperationResult(LDAPOperationResult): ...
class LDAPTooLateResult(LDAPOperationResult): ...
class LDAPCannotCancelResult(LDAPOperationResult): ...
class LDAPAssertionFailedResult(LDAPOperationResult): ...
class LDAPAuthorizationDeniedResult(LDAPOperationResult): ...
class LDAPESyncRefreshRequiredResult(LDAPOperationResult): ...
exception_table: Any
class LDAPExceptionError(LDAPException): ...
class LDAPConfigurationError(LDAPExceptionError): ...
class LDAPUnknownStrategyError(LDAPConfigurationError): ...
class LDAPUnknownAuthenticationMethodError(LDAPConfigurationError): ...
class LDAPSSLConfigurationError(LDAPConfigurationError): ...
class LDAPDefinitionError(LDAPConfigurationError): ...
class LDAPPackageUnavailableError(LDAPConfigurationError, ImportError): ...
class LDAPConfigurationParameterError(LDAPConfigurationError): ...
class LDAPKeyError(LDAPExceptionError, KeyError, AttributeError): ...
class LDAPObjectError(LDAPExceptionError, ValueError): ...
class LDAPAttributeError(LDAPExceptionError, ValueError, TypeError): ...
class LDAPCursorError(LDAPExceptionError): ...
class LDAPCursorAttributeError(LDAPCursorError, AttributeError): ...
class LDAPObjectDereferenceError(LDAPExceptionError): ...
class LDAPSSLNotSupportedError(LDAPExceptionError, ImportError): ...
class LDAPInvalidTlsSpecificationError(LDAPExceptionError): ...
class LDAPInvalidHashAlgorithmError(LDAPExceptionError, ValueError): ...
class LDAPSignatureVerificationFailedError(LDAPExceptionError): ...
class LDAPBindError(LDAPExceptionError): ...
class LDAPInvalidServerError(LDAPExceptionError): ...
class LDAPSASLMechanismNotSupportedError(LDAPExceptionError): ...
class LDAPConnectionIsReadOnlyError(LDAPExceptionError): ...
class LDAPChangeError(LDAPExceptionError, ValueError): ...
class LDAPServerPoolError(LDAPExceptionError): ...
class LDAPServerPoolExhaustedError(LDAPExceptionError): ...
class LDAPInvalidPortError(LDAPExceptionError): ...
class LDAPStartTLSError(LDAPExceptionError): ...
class LDAPCertificateError(LDAPExceptionError): ...
class LDAPUserNameNotAllowedError(LDAPExceptionError): ...
class LDAPUserNameIsMandatoryError(LDAPExceptionError): ...
class LDAPPasswordIsMandatoryError(LDAPExceptionError): ...
class LDAPInvalidFilterError(LDAPExceptionError): ...
class LDAPInvalidScopeError(LDAPExceptionError, ValueError): ...
class LDAPInvalidDereferenceAliasesError(LDAPExceptionError, ValueError): ...
class LDAPInvalidValueError(LDAPExceptionError, ValueError): ...
class LDAPControlError(LDAPExceptionError, ValueError): ...
class LDAPExtensionError(LDAPExceptionError, ValueError): ...
class LDAPLDIFError(LDAPExceptionError): ...
class LDAPSchemaError(LDAPExceptionError): ...
class LDAPSASLPrepError(LDAPExceptionError): ...
class LDAPSASLBindInProgressError(LDAPExceptionError): ...
class LDAPMetricsError(LDAPExceptionError): ...
class LDAPObjectClassError(LDAPExceptionError): ...
class LDAPInvalidDnError(LDAPExceptionError): ...
class LDAPResponseTimeoutError(LDAPExceptionError): ...
class LDAPTransactionError(LDAPExceptionError): ...
class LDAPInfoError(LDAPExceptionError): ...
class LDAPCommunicationError(LDAPExceptionError): ...
class LDAPSocketOpenError(LDAPCommunicationError): ...
class LDAPSocketCloseError(LDAPCommunicationError): ...
class LDAPSocketReceiveError(LDAPCommunicationError, socket.error): ...
class LDAPSocketSendError(LDAPCommunicationError, socket.error): ...
class LDAPSessionTerminatedByServerError(LDAPCommunicationError): ...
class LDAPUnknownResponseError(LDAPCommunicationError): ...
class LDAPUnknownRequestError(LDAPCommunicationError): ...
class LDAPReferralError(LDAPCommunicationError): ...
class LDAPConnectionPoolNameIsMandatoryError(LDAPExceptionError): ...
class LDAPConnectionPoolNotStartedError(LDAPExceptionError): ...
class LDAPMaximumRetriesError(LDAPExceptionError): ...
def communication_exception_factory(exc_to_raise, exc): ...
def start_tls_exception_factory(exc): ...

View File

@@ -0,0 +1,42 @@
from typing import Any
POOLING_STRATEGIES: Any
class ServerState:
server: Any
last_checked_time: Any
available: Any
def __init__(self, server, last_checked_time, available) -> None: ...
class ServerPoolState:
server_states: Any
strategy: Any
server_pool: Any
last_used_server: int
initialize_time: Any
def __init__(self, server_pool) -> None: ...
def refresh(self) -> None: ...
def get_current_server(self): ...
def get_server(self): ...
def find_active_random_server(self): ...
def find_active_server(self, starting): ...
def __len__(self): ...
class ServerPool:
servers: Any
pool_states: Any
active: Any
exhaust: Any
single: Any
strategy: Any
def __init__(
self, servers: Any | None = ..., pool_strategy=..., active: bool = ..., exhaust: bool = ..., single_state: bool = ...
) -> None: ...
def __len__(self): ...
def __getitem__(self, item): ...
def __iter__(self): ...
def add(self, servers) -> None: ...
def remove(self, server) -> None: ...
def initialize(self, connection) -> None: ...
def get_server(self, connection): ...
def get_current_server(self, connection): ...

View File

@@ -0,0 +1,12 @@
from typing import Any
class ReverseDnsSetting:
OFF: Any
REQUIRE_RESOLVE_ALL_ADDRESSES: Any
REQUIRE_RESOLVE_IP_ADDRESSES_ONLY: Any
OPTIONAL_RESOLVE_ALL_ADDRESSES: Any
OPTIONAL_RESOLVE_IP_ADDRESSES_ONLY: Any
SUPPORTED_VALUES: Any
def get_hostname_by_addr(addr, success_required: bool = ...): ...
def is_ip_addr(addr): ...

View File

@@ -0,0 +1,56 @@
from typing import Any
RESULT_SUCCESS: int
RESULT_OPERATIONS_ERROR: int
RESULT_PROTOCOL_ERROR: int
RESULT_TIME_LIMIT_EXCEEDED: int
RESULT_SIZE_LIMIT_EXCEEDED: int
RESULT_COMPARE_FALSE: int
RESULT_COMPARE_TRUE: int
RESULT_AUTH_METHOD_NOT_SUPPORTED: int
RESULT_STRONGER_AUTH_REQUIRED: int
RESULT_RESERVED: int
RESULT_REFERRAL: int
RESULT_ADMIN_LIMIT_EXCEEDED: int
RESULT_UNAVAILABLE_CRITICAL_EXTENSION: int
RESULT_CONFIDENTIALITY_REQUIRED: int
RESULT_SASL_BIND_IN_PROGRESS: int
RESULT_NO_SUCH_ATTRIBUTE: int
RESULT_UNDEFINED_ATTRIBUTE_TYPE: int
RESULT_INAPPROPRIATE_MATCHING: int
RESULT_CONSTRAINT_VIOLATION: int
RESULT_ATTRIBUTE_OR_VALUE_EXISTS: int
RESULT_INVALID_ATTRIBUTE_SYNTAX: int
RESULT_NO_SUCH_OBJECT: int
RESULT_ALIAS_PROBLEM: int
RESULT_INVALID_DN_SYNTAX: int
RESULT_ALIAS_DEREFERENCING_PROBLEM: int
RESULT_INAPPROPRIATE_AUTHENTICATION: int
RESULT_INVALID_CREDENTIALS: int
RESULT_INSUFFICIENT_ACCESS_RIGHTS: int
RESULT_BUSY: int
RESULT_UNAVAILABLE: int
RESULT_UNWILLING_TO_PERFORM: int
RESULT_LOOP_DETECTED: int
RESULT_NAMING_VIOLATION: int
RESULT_OBJECT_CLASS_VIOLATION: int
RESULT_NOT_ALLOWED_ON_NON_LEAF: int
RESULT_NOT_ALLOWED_ON_RDN: int
RESULT_ENTRY_ALREADY_EXISTS: int
RESULT_OBJECT_CLASS_MODS_PROHIBITED: int
RESULT_AFFECT_MULTIPLE_DSAS: int
RESULT_OTHER: int
RESULT_LCUP_RESOURCES_EXHAUSTED: int
RESULT_LCUP_SECURITY_VIOLATION: int
RESULT_LCUP_INVALID_DATA: int
RESULT_LCUP_UNSUPPORTED_SCHEME: int
RESULT_LCUP_RELOAD_REQUIRED: int
RESULT_CANCELED: int
RESULT_NO_SUCH_OPERATION: int
RESULT_TOO_LATE: int
RESULT_CANNOT_CANCEL: int
RESULT_ASSERTION_FAILED: int
RESULT_AUTHORIZATION_DENIED: int
RESULT_E_SYNC_REFRESH_REQUIRED: int
RESULT_CODES: Any
DO_NOT_RAISE_EXCEPTIONS: Any

View File

@@ -0,0 +1,64 @@
from socket import AF_UNIX as AF_UNIX
from typing import Any
from typing_extensions import Literal
unix_socket_available: bool
class Server:
ipc: bool
host: Any
port: Any
allowed_referral_hosts: Any
ssl: Any
tls: Any
name: Any
get_info: Any
dit_lock: Any
custom_formatter: Any
custom_validator: Any
current_address: Any
connect_timeout: Any
mode: Any
def __init__(
self,
host: str,
port: int | None = ...,
use_ssl: bool = ...,
allowed_referral_hosts: Any | None = ...,
get_info: Literal["NO_INFO", "DSA", "SCHEMA", "ALL"] = ...,
tls: Any | None = ...,
formatter: Any | None = ...,
connect_timeout: Any | None = ...,
mode: Literal["IP_SYSTEM_DEFAULT", "IP_V4_ONLY", "IP_V6_ONLY", "IP_V4_PREFERRED", "IP_V6_PREFERRED"] = ...,
validator: Any | None = ...,
) -> None: ...
@property
def address_info(self): ...
def update_availability(self, address, available) -> None: ...
def reset_availability(self) -> None: ...
def check_availability(
self, source_address: Any | None = ..., source_port: Any | None = ..., source_port_list: Any | None = ...
): ...
@staticmethod
def next_message_id(): ...
def get_info_from_server(self, connection) -> None: ...
def attach_dsa_info(self, dsa_info: Any | None = ...) -> None: ...
def attach_schema_info(self, dsa_schema: Any | None = ...) -> None: ...
@property
def info(self): ...
@property
def schema(self): ...
@staticmethod
def from_definition(
host,
dsa_info,
dsa_schema,
port: Any | None = ...,
use_ssl: bool = ...,
formatter: Any | None = ...,
validator: Any | None = ...,
): ...
def candidate_addresses(self): ...
def has_control(self, control): ...
def has_extension(self, extension): ...
def has_feature(self, feature): ...

View File

@@ -0,0 +1,11 @@
from datetime import tzinfo
from typing import Any
class OffsetTzInfo(tzinfo):
offset: Any
name: Any
def __init__(self, offset, name) -> None: ...
def utcoffset(self, dt): ...
def tzname(self, dt): ...
def dst(self, dt): ...
def __getinitargs__(self): ...

View File

@@ -0,0 +1,36 @@
from typing import Any
use_ssl_context: bool
class Tls:
ssl_options: Any
validate: Any
ca_certs_file: Any
ca_certs_path: Any
ca_certs_data: Any
private_key_password: Any
version: Any
private_key_file: Any
certificate_file: Any
valid_names: Any
ciphers: Any
sni: Any
def __init__(
self,
local_private_key_file: Any | None = ...,
local_certificate_file: Any | None = ...,
validate=...,
version: Any | None = ...,
ssl_options: Any | None = ...,
ca_certs_file: Any | None = ...,
valid_names: Any | None = ...,
ca_certs_path: Any | None = ...,
ca_certs_data: Any | None = ...,
local_private_key_password: Any | None = ...,
ciphers: Any | None = ...,
sni: Any | None = ...,
) -> None: ...
def wrap_socket(self, connection, do_handshake: bool = ...) -> None: ...
def start_tls(self, connection): ...
def check_hostname(sock, server_name, additional_names) -> None: ...

View File

@@ -0,0 +1,41 @@
from typing import Any
class ConnectionUsage:
open_sockets: int
closed_sockets: int
wrapped_sockets: int
bytes_transmitted: int
bytes_received: int
messages_transmitted: int
messages_received: int
operations: int
abandon_operations: int
add_operations: int
bind_operations: int
compare_operations: int
delete_operations: int
extended_operations: int
modify_operations: int
modify_dn_operations: int
search_operations: int
unbind_operations: int
referrals_received: int
referrals_followed: int
referrals_connections: int
restartable_failures: int
restartable_successes: int
servers_from_pool: int
def reset(self) -> None: ...
initial_connection_start_time: Any
open_socket_start_time: Any
connection_stop_time: Any
last_transmitted_time: Any
last_received_time: Any
def __init__(self) -> None: ...
def __iadd__(self, other): ...
def update_transmitted_message(self, message, length) -> None: ...
def update_received_message(self, length) -> None: ...
def start(self, reset: bool = ...) -> None: ...
def stop(self) -> None: ...
@property
def elapsed_time(self): ...

View File

@@ -0,0 +1,105 @@
from typing import Any
class ExtendedOperationContainer:
def __init__(self, connection) -> None: ...
class StandardExtendedOperations(ExtendedOperationContainer):
def who_am_i(self, controls: Any | None = ...): ...
def modify_password(
self,
user: Any | None = ...,
old_password: Any | None = ...,
new_password: Any | None = ...,
hash_algorithm: Any | None = ...,
salt: Any | None = ...,
controls: Any | None = ...,
): ...
def paged_search(
self,
search_base,
search_filter,
search_scope=...,
dereference_aliases=...,
attributes: Any | None = ...,
size_limit: int = ...,
time_limit: int = ...,
types_only: bool = ...,
get_operational_attributes: bool = ...,
controls: Any | None = ...,
paged_size: int = ...,
paged_criticality: bool = ...,
generator: bool = ...,
): ...
def persistent_search(
self,
search_base: str = ...,
search_filter: str = ...,
search_scope=...,
dereference_aliases=...,
attributes=...,
size_limit: int = ...,
time_limit: int = ...,
controls: Any | None = ...,
changes_only: bool = ...,
show_additions: bool = ...,
show_deletions: bool = ...,
show_modifications: bool = ...,
show_dn_modifications: bool = ...,
notifications: bool = ...,
streaming: bool = ...,
callback: Any | None = ...,
): ...
def funnel_search(
self,
search_base: str = ...,
search_filter: str = ...,
search_scope=...,
dereference_aliases=...,
attributes=...,
size_limit: int = ...,
time_limit: int = ...,
controls: Any | None = ...,
streaming: bool = ...,
callback: Any | None = ...,
): ...
class NovellExtendedOperations(ExtendedOperationContainer):
def get_bind_dn(self, controls: Any | None = ...): ...
def get_universal_password(self, user, controls: Any | None = ...): ...
def set_universal_password(self, user, new_password: Any | None = ..., controls: Any | None = ...): ...
def list_replicas(self, server_dn, controls: Any | None = ...): ...
def partition_entry_count(self, partition_dn, controls: Any | None = ...): ...
def replica_info(self, server_dn, partition_dn, controls: Any | None = ...): ...
def start_transaction(self, controls: Any | None = ...): ...
def end_transaction(self, commit: bool = ..., controls: Any | None = ...): ...
def add_members_to_groups(self, members, groups, fix: bool = ..., transaction: bool = ...): ...
def remove_members_from_groups(self, members, groups, fix: bool = ..., transaction: bool = ...): ...
def check_groups_memberships(self, members, groups, fix: bool = ..., transaction: bool = ...): ...
class MicrosoftExtendedOperations(ExtendedOperationContainer):
def dir_sync(
self,
sync_base,
sync_filter: str = ...,
attributes=...,
cookie: Any | None = ...,
object_security: bool = ...,
ancestors_first: bool = ...,
public_data_only: bool = ...,
incremental_values: bool = ...,
max_length: int = ...,
hex_guid: bool = ...,
): ...
def modify_password(self, user, new_password, old_password: Any | None = ..., controls: Any | None = ...): ...
def unlock_account(self, user): ...
def add_members_to_groups(self, members, groups, fix: bool = ...): ...
def remove_members_from_groups(self, members, groups, fix: bool = ...): ...
def persistent_search(
self, search_base: str = ..., search_scope=..., attributes=..., streaming: bool = ..., callback: Any | None = ...
): ...
class ExtendedOperationsRoot(ExtendedOperationContainer):
standard: Any
novell: Any
microsoft: Any
def __init__(self, connection) -> None: ...

View File

@@ -0,0 +1 @@
def ad_add_members_to_groups(connection, members_dn, groups_dn, fix: bool = ..., raise_error: bool = ...): ...

View File

@@ -0,0 +1,30 @@
from typing import Any
class DirSync:
connection: Any
base: Any
filter: Any
attributes: Any
cookie: Any
object_security: Any
ancestors_first: Any
public_data_only: Any
incremental_values: Any
max_length: Any
hex_guid: Any
more_results: bool
def __init__(
self,
connection,
sync_base,
sync_filter,
attributes,
cookie,
object_security,
ancestors_first,
public_data_only,
incremental_values,
max_length,
hex_guid,
) -> None: ...
def loop(self): ...

View File

@@ -0,0 +1,3 @@
from typing import Any
def ad_modify_password(connection, user_dn, new_password, old_password, controls: Any | None = ...): ...

View File

@@ -0,0 +1,15 @@
from typing import Any
class ADPersistentSearch:
connection: Any
message_id: Any
base: Any
scope: Any
attributes: Any
controls: Any
filter: str
def __init__(self, connection, search_base, search_scope, attributes, streaming, callback) -> None: ...
def start(self) -> None: ...
def stop(self, unbind: bool = ...) -> None: ...
def next(self, block: bool = ..., timeout: Any | None = ...): ...
def funnel(self, block: bool = ..., timeout: Any | None = ...) -> None: ...

View File

@@ -0,0 +1 @@
def ad_remove_members_from_groups(connection, members_dn, groups_dn, fix, raise_error: bool = ...): ...

View File

@@ -0,0 +1,3 @@
from typing import Any
def ad_unlock_account(connection, user_dn, controls: Any | None = ...): ...

View File

@@ -0,0 +1 @@
def edir_add_members_to_groups(connection, members_dn, groups_dn, fix, transaction): ...

View File

@@ -0,0 +1 @@
def edir_check_groups_memberships(connection, members_dn, groups_dn, fix, transaction): ...

View File

@@ -0,0 +1,14 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class EndTransaction(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
asn1_spec: Any
def config(self) -> None: ...
def __init__(self, connection, commit: bool = ..., controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...
response_value: Any
def set_response(self) -> None: ...

View File

@@ -0,0 +1,11 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class GetBindDn(ExtendedOperation):
request_name: str
response_name: str
response_attribute: str
asn1_spec: Any
def config(self) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1,13 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class ListReplicas(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
asn1_spec: Any
response_attribute: str
def config(self) -> None: ...
def __init__(self, connection, server_dn, controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1,13 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class NmasGetUniversalPassword(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
asn1_spec: Any
response_attribute: str
def config(self) -> None: ...
def __init__(self, connection, user, controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1,13 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class NmasSetUniversalPassword(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
asn1_spec: Any
response_attribute: str
def config(self) -> None: ...
def __init__(self, connection, user, new_password, controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1,12 @@
from typing import Any
from ..operation import ExtendedOperation
class PartitionEntryCount(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
response_attribute: str
def config(self) -> None: ...
def __init__(self, connection, partition_dn, controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1 @@
def edir_remove_members_from_groups(connection, members_dn, groups_dn, fix, transaction): ...

View File

@@ -0,0 +1,12 @@
from typing import Any
from ..operation import ExtendedOperation
class ReplicaInfo(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
response_attribute: str
def config(self) -> None: ...
def __init__(self, connection, server_dn, partition_dn, controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1,14 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class StartTransaction(ExtendedOperation):
request_name: str
response_name: str
request_value: Any
asn1_spec: Any
def config(self) -> None: ...
def __init__(self, connection, controls: Any | None = ...) -> None: ...
def populate_result(self) -> None: ...
response_value: Any
def set_response(self) -> None: ...

View File

@@ -0,0 +1,19 @@
from typing import Any
class ExtendedOperation:
connection: Any
decoded_response: Any
result: Any
asn1_spec: Any
request_name: Any
response_name: Any
request_value: Any
response_value: Any
response_attribute: Any
controls: Any
def __init__(self, connection, controls: Any | None = ...) -> None: ...
def send(self): ...
def populate_result(self) -> None: ...
def decode_response(self, response: Any | None = ...) -> None: ...
def set_response(self) -> None: ...
def config(self) -> None: ...

View File

@@ -0,0 +1,32 @@
from typing import Any
def paged_search_generator(
connection,
search_base,
search_filter,
search_scope=...,
dereference_aliases=...,
attributes: Any | None = ...,
size_limit: int = ...,
time_limit: int = ...,
types_only: bool = ...,
get_operational_attributes: bool = ...,
controls: Any | None = ...,
paged_size: int = ...,
paged_criticality: bool = ...,
) -> None: ...
def paged_search_accumulator(
connection,
search_base,
search_filter,
search_scope=...,
dereference_aliases=...,
attributes: Any | None = ...,
size_limit: int = ...,
time_limit: int = ...,
types_only: bool = ...,
get_operational_attributes: bool = ...,
controls: Any | None = ...,
paged_size: int = ...,
paged_criticality: bool = ...,
): ...

View File

@@ -0,0 +1,36 @@
from typing import Any
class PersistentSearch:
connection: Any
changes_only: Any
notifications: Any
message_id: Any
base: Any
filter: Any
scope: Any
dereference_aliases: Any
attributes: Any
size_limit: Any
time_limit: Any
controls: Any
def __init__(
self,
connection,
search_base,
search_filter,
search_scope,
dereference_aliases,
attributes,
size_limit,
time_limit,
controls,
changes_only,
events_type,
notifications,
streaming,
callback,
) -> None: ...
def start(self) -> None: ...
def stop(self, unbind: bool = ...) -> None: ...
def next(self, block: bool = ..., timeout: Any | None = ...): ...
def funnel(self, block: bool = ..., timeout: Any | None = ...) -> None: ...

View File

@@ -0,0 +1,21 @@
from typing import Any
from ...extend.operation import ExtendedOperation
class ModifyPassword(ExtendedOperation):
request_name: str
request_value: Any
asn1_spec: Any
response_attribute: str
def config(self) -> None: ...
def __init__(
self,
connection,
user: Any | None = ...,
old_password: Any | None = ...,
new_password: Any | None = ...,
hash_algorithm: Any | None = ...,
salt: Any | None = ...,
controls: Any | None = ...,
) -> None: ...
def populate_result(self) -> None: ...

View File

@@ -0,0 +1,7 @@
from ...extend.operation import ExtendedOperation
class WhoAmI(ExtendedOperation):
request_name: str
response_attribute: str
def config(self) -> None: ...
def populate_result(self) -> None: ...

View File

View File

@@ -0,0 +1,2 @@
def abandon_operation(msg_id): ...
def abandon_request_to_dict(request): ...

View File

@@ -0,0 +1,7 @@
from typing import Any
def add_operation(
dn, attributes, auto_encode, schema: Any | None = ..., validator: Any | None = ..., check_names: bool = ...
): ...
def add_request_to_dict(request): ...
def add_response_to_dict(response): ...

View File

@@ -0,0 +1,23 @@
from typing import Any
def bind_operation(
version,
authentication,
name: str = ...,
password: Any | None = ...,
sasl_mechanism: Any | None = ...,
sasl_credentials: Any | None = ...,
auto_encode: bool = ...,
): ...
def bind_request_to_dict(request): ...
def bind_response_operation(
result_code,
matched_dn: str = ...,
diagnostic_message: str = ...,
referral: Any | None = ...,
server_sasl_credentials: Any | None = ...,
): ...
def bind_response_to_dict(response): ...
def sicily_bind_response_to_dict(response): ...
def bind_response_to_dict_fast(response): ...
def sicily_bind_response_to_dict_fast(response): ...

View File

@@ -0,0 +1,7 @@
from typing import Any
def compare_operation(
dn, attribute, value, auto_encode, schema: Any | None = ..., validator: Any | None = ..., check_names: bool = ...
): ...
def compare_request_to_dict(request): ...
def compare_response_to_dict(response): ...

View File

@@ -0,0 +1,3 @@
def delete_operation(dn): ...
def delete_request_to_dict(request): ...
def delete_response_to_dict(response): ...

View File

@@ -0,0 +1,8 @@
from typing import Any
def extended_operation(request_name, request_value: Any | None = ..., no_encode: Any | None = ...): ...
def extended_request_to_dict(request): ...
def extended_response_to_dict(response): ...
def intermediate_response_to_dict(response): ...
def extended_response_to_dict_fast(response): ...
def intermediate_response_to_dict_fast(response): ...

View File

@@ -0,0 +1,9 @@
from typing import Any
change_table: Any
def modify_operation(
dn, changes, auto_encode, schema: Any | None = ..., validator: Any | None = ..., check_names: bool = ...
): ...
def modify_request_to_dict(request): ...
def modify_response_to_dict(response): ...

View File

@@ -0,0 +1,5 @@
from typing import Any
def modify_dn_operation(dn, new_relative_dn, delete_old_rdn: bool = ..., new_superior: Any | None = ...): ...
def modify_dn_request_to_dict(request): ...
def modify_dn_response_to_dict(response): ...

View File

@@ -0,0 +1,63 @@
from typing import Any
ROOT: int
AND: int
OR: int
NOT: int
MATCH_APPROX: int
MATCH_GREATER_OR_EQUAL: int
MATCH_LESS_OR_EQUAL: int
MATCH_EXTENSIBLE: int
MATCH_PRESENT: int
MATCH_SUBSTRING: int
MATCH_EQUAL: int
SEARCH_OPEN: int
SEARCH_OPEN_OR_CLOSE: int
SEARCH_MATCH_OR_CLOSE: int
SEARCH_MATCH_OR_CONTROL: int
class FilterNode:
tag: Any
parent: Any
assertion: Any
elements: Any
def __init__(self, tag: Any | None = ..., assertion: Any | None = ...) -> None: ...
def append(self, filter_node): ...
def evaluate_match(match, schema, auto_escape, auto_encode, validator, check_names): ...
def parse_filter(search_filter, schema, auto_escape, auto_encode, validator, check_names): ...
def compile_filter(filter_node): ...
def build_attribute_selection(attribute_list, schema): ...
def search_operation(
search_base,
search_filter,
search_scope,
dereference_aliases,
attributes,
size_limit,
time_limit,
types_only,
auto_escape,
auto_encode,
schema: Any | None = ...,
validator: Any | None = ...,
check_names: bool = ...,
): ...
def decode_vals(vals): ...
def decode_vals_fast(vals): ...
def attributes_to_dict(attribute_list): ...
def attributes_to_dict_fast(attribute_list): ...
def decode_raw_vals(vals): ...
def decode_raw_vals_fast(vals): ...
def raw_attributes_to_dict(attribute_list): ...
def raw_attributes_to_dict_fast(attribute_list): ...
def checked_attributes_to_dict(attribute_list, schema: Any | None = ..., custom_formatter: Any | None = ...): ...
def checked_attributes_to_dict_fast(attribute_list, schema: Any | None = ..., custom_formatter: Any | None = ...): ...
def matching_rule_assertion_to_string(matching_rule_assertion): ...
def filter_to_string(filter_object): ...
def search_request_to_dict(request): ...
def search_result_entry_response_to_dict(response, schema, custom_formatter, check_names): ...
def search_result_done_response_to_dict(response): ...
def search_result_reference_response_to_dict(response): ...
def search_result_entry_response_to_dict_fast(response, schema, custom_formatter, check_names): ...
def search_result_reference_response_to_dict_fast(response): ...

View File

@@ -0,0 +1 @@
def unbind_operation(): ...

View File

View File

@@ -0,0 +1 @@
def build_control(oid, criticality, value, encode_control_value: bool = ...): ...

View File

@@ -0,0 +1,22 @@
from typing import Any
def to_str_or_normalized_unicode(val): ...
def attribute_to_dict(attribute): ...
def attributes_to_dict(attributes): ...
def referrals_to_list(referrals): ...
def search_refs_to_list(search_refs): ...
def search_refs_to_list_fast(search_refs): ...
def sasl_to_dict(sasl): ...
def authentication_choice_to_dict(authentication_choice): ...
def partial_attribute_to_dict(modification): ...
def change_to_dict(change): ...
def changes_to_list(changes): ...
def attributes_to_list(attributes): ...
def ava_to_dict(ava): ...
def substring_to_dict(substring): ...
def prepare_changes_for_request(changes): ...
def build_controls_list(controls): ...
def validate_assertion_value(schema, name, value, auto_escape, auto_encode, validator, check_names): ...
def validate_attribute_value(schema, name, value, auto_encode, validator: Any | None = ..., check_names: bool = ...): ...
def prepare_filter_for_sending(raw_string): ...
def prepare_for_sending(raw_string): ...

View File

@@ -0,0 +1,16 @@
from typing import Any
def format_unicode(raw_value): ...
def format_integer(raw_value): ...
def format_binary(raw_value): ...
def format_uuid(raw_value): ...
def format_uuid_le(raw_value): ...
def format_boolean(raw_value): ...
def format_ad_timestamp(raw_value): ...
time_format: Any
def format_time(raw_value): ...
def format_ad_timedelta(raw_value): ...
def format_time_with_0_year(raw_value): ...
def format_sid(raw_value): ...

View File

@@ -0,0 +1,7 @@
from typing import Any
standard_formatter: Any
def find_attribute_helpers(attr_type, name, custom_formatter): ...
def format_attribute_values(schema, name, values, custom_formatter): ...
def find_attribute_validator(schema, name, custom_validator): ...

View File

@@ -0,0 +1,16 @@
def check_backslash(value): ...
def check_type(input_value, value_type): ...
def always_valid(input_value): ...
def validate_generic_single_value(input_value): ...
def validate_zero_and_minus_one_and_positive_int(input_value): ...
def validate_integer(input_value): ...
def validate_bytes(input_value): ...
def validate_boolean(input_value): ...
def validate_time_with_0_year(input_value): ...
def validate_time(input_value): ...
def validate_ad_timestamp(input_value): ...
def validate_ad_timedelta(input_value): ...
def validate_guid(input_value): ...
def validate_uuid(input_value): ...
def validate_uuid_le(input_value): ...
def validate_sid(input_value): ...

View File

@@ -0,0 +1,27 @@
from typing import Any
# Enable when pyasn1 gets stubs:
# from pyasn1.type.univ import Sequence
Sequence = Any
class SicilyBindResponse(Sequence):
tagSet: Any
componentType: Any
class DirSyncControlRequestValue(Sequence):
componentType: Any
class DirSyncControlResponseValue(Sequence):
componentType: Any
class SdFlags(Sequence):
componentType: Any
class ExtendedDN(Sequence):
componentType: Any
def dir_sync_control(criticality, object_security, ancestors_first, public_data_only, incremental_values, max_length, cookie): ...
def extended_dn_control(criticality: bool = ..., hex_format: bool = ...): ...
def show_deleted_control(criticality: bool = ...): ...
def security_descriptor_control(criticality: bool = ..., sdflags: int = ...): ...
def persistent_search_control(criticality: bool = ...): ...

View File

@@ -0,0 +1,72 @@
from typing import Any
# Enable when pyasn1 gets stubs:
# from pyasn1.type.univ import Integer, OctetString, Sequence, SequenceOf
Integer = Any
OctetString = Any
Sequence = Any
SequenceOf = Any
NMAS_LDAP_EXT_VERSION: int
class Identity(OctetString):
encoding: str
class LDAPDN(OctetString):
tagSet: Any
encoding: str
class Password(OctetString):
tagSet: Any
encoding: str
class LDAPOID(OctetString):
tagSet: Any
encoding: str
class GroupCookie(Integer):
tagSet: Any
class NmasVer(Integer):
tagSet: Any
class Error(Integer):
tagSet: Any
class NmasGetUniversalPasswordRequestValue(Sequence):
componentType: Any
class NmasGetUniversalPasswordResponseValue(Sequence):
componentType: Any
class NmasSetUniversalPasswordRequestValue(Sequence):
componentType: Any
class NmasSetUniversalPasswordResponseValue(Sequence):
componentType: Any
class ReplicaList(SequenceOf):
componentType: Any
class ReplicaInfoRequestValue(Sequence):
tagSet: Any
componentType: Any
class ReplicaInfoResponseValue(Sequence):
tagSet: Any
componentType: Any
class CreateGroupTypeRequestValue(Sequence):
componentType: Any
class CreateGroupTypeResponseValue(Sequence):
componentType: Any
class EndGroupTypeRequestValue(Sequence):
componentType: Any
class EndGroupTypeResponseValue(Sequence):
componentType: Any
class GroupingControlValue(Sequence):
componentType: Any

View File

@@ -0,0 +1,29 @@
from typing import Any
OID_CONTROL: str
OID_EXTENSION: str
OID_FEATURE: str
OID_UNSOLICITED_NOTICE: str
OID_ATTRIBUTE_TYPE: str
OID_DIT_CONTENT_RULE: str
OID_LDAP_URL_EXTENSION: str
OID_FAMILY: str
OID_MATCHING_RULE: str
OID_NAME_FORM: str
OID_OBJECT_CLASS: str
OID_ADMINISTRATIVE_ROLE: str
OID_LDAP_SYNTAX: str
CLASS_STRUCTURAL: str
CLASS_ABSTRACT: str
CLASS_AUXILIARY: str
ATTRIBUTE_USER_APPLICATION: str
ATTRIBUTE_DIRECTORY_OPERATION: str
ATTRIBUTE_DISTRIBUTED_OPERATION: str
ATTRIBUTE_DSA_OPERATION: str
def constant_to_oid_kind(oid_kind): ...
def decode_oids(sequence): ...
def decode_syntax(syntax): ...
def oid_to_string(oid): ...
Oids: Any

View File

@@ -0,0 +1,17 @@
from typing import Any
# Enable when pyasn1 gets stubs:
# from pyasn1.type.univ import Enumerated, Sequence
Enumerated = Any
Sequence = Any
class PersistentSearchControl(Sequence):
componentType: Any
class ChangeType(Enumerated):
namedValues: Any
class EntryChangeNotificationControl(Sequence):
componentType: Any
def persistent_search_control(change_types, changes_only: bool = ..., return_ecs: bool = ..., criticality: bool = ...): ...

View File

@@ -0,0 +1,21 @@
from typing import Any
# Enable when pyasn1 gets stubs:
# from pyasn1.type.univ import Integer, OctetString, Sequence
Integer = Any
OctetString = Any
Sequence = Any
MAXINT: Any
rangeInt0ToMaxConstraint: Any
class Integer0ToMax(Integer):
subtypeSpec: Any
class Size(Integer0ToMax): ...
class Cookie(OctetString): ...
class RealSearchControlValue(Sequence):
componentType: Any
def paged_search_control(criticality: bool = ..., size: int = ..., cookie: Any | None = ...): ...

View File

@@ -0,0 +1,18 @@
from typing import Any
conf_ldif_line_length: Any
def safe_ldif_string(bytes_value): ...
def add_controls(controls, all_base64): ...
def add_attributes(attributes, all_base64): ...
def sort_ldif_lines(lines, sort_order): ...
def search_response_to_ldif(entries, all_base64, sort_order: Any | None = ...): ...
def add_request_to_ldif(entry, all_base64, sort_order: Any | None = ...): ...
def delete_request_to_ldif(entry, all_base64, sort_order: Any | None = ...): ...
def modify_request_to_ldif(entry, all_base64, sort_order: Any | None = ...): ...
def modify_dn_request_to_ldif(entry, all_base64, sort_order: Any | None = ...): ...
def operation_to_ldif(operation_type, entries, all_base64: bool = ..., sort_order: Any | None = ...): ...
def add_ldif_header(ldif_lines): ...
def ldif_sort(line, sort_order): ...
def decode_persistent_search_control(change): ...
def persistent_search_response_to_ldif(change): ...

View File

@@ -0,0 +1,28 @@
from typing import Any
# Enable when pyasn1 gets stubs:
# from pyasn1.type.univ import OctetString, Sequence
OctetString = Any
Sequence = Any
class UserIdentity(OctetString):
tagSet: Any
encoding: str
class OldPasswd(OctetString):
tagSet: Any
encoding: str
class NewPasswd(OctetString):
tagSet: Any
encoding: str
class GenPasswd(OctetString):
tagSet: Any
encoding: str
class PasswdModifyRequestValue(Sequence):
componentType: Any
class PasswdModifyResponseValue(Sequence):
componentType: Any

View File

@@ -0,0 +1,323 @@
from typing import Any as _Any
# Enable when pyasn1 gets stubs:
# from pyasn1.type.univ import Boolean, Choice, Enumerated, Integer, Null, OctetString, Sequence, SequenceOf, SetOf
Boolean = _Any
Choice = _Any
Enumerated = _Any
Integer = _Any
Null = _Any
OctetString = _Any
Sequence = _Any
SequenceOf = _Any
SetOf = _Any
LDAP_MAX_INT: int
MAXINT: _Any
rangeInt0ToMaxConstraint: _Any
rangeInt1To127Constraint: _Any
size1ToMaxConstraint: _Any
responseValueConstraint: _Any
numericOIDConstraint: _Any
distinguishedNameConstraint: _Any
nameComponentConstraint: _Any
attributeDescriptionConstraint: _Any
uriConstraint: _Any
attributeSelectorConstraint: _Any
class Integer0ToMax(Integer):
subtypeSpec: _Any
class LDAPString(OctetString):
encoding: str
class MessageID(Integer0ToMax): ...
class LDAPOID(OctetString): ...
class LDAPDN(LDAPString): ...
class RelativeLDAPDN(LDAPString): ...
class AttributeDescription(LDAPString): ...
class AttributeValue(OctetString):
encoding: str
class AssertionValue(OctetString):
encoding: str
class AttributeValueAssertion(Sequence):
componentType: _Any
class MatchingRuleId(LDAPString): ...
class Vals(SetOf):
componentType: _Any
class ValsAtLeast1(SetOf):
componentType: _Any
subtypeSpec: _Any
class PartialAttribute(Sequence):
componentType: _Any
class Attribute(Sequence):
componentType: _Any
class AttributeList(SequenceOf):
componentType: _Any
class Simple(OctetString):
tagSet: _Any
encoding: str
class Credentials(OctetString):
encoding: str
class SaslCredentials(Sequence):
tagSet: _Any
componentType: _Any
class SicilyPackageDiscovery(OctetString):
tagSet: _Any
encoding: str
class SicilyNegotiate(OctetString):
tagSet: _Any
encoding: str
class SicilyResponse(OctetString):
tagSet: _Any
encoding: str
class AuthenticationChoice(Choice):
componentType: _Any
class Version(Integer):
subtypeSpec: _Any
class ResultCode(Enumerated):
namedValues: _Any
subTypeSpec: _Any
class URI(LDAPString): ...
class Referral(SequenceOf):
tagSet: _Any
componentType: _Any
class ServerSaslCreds(OctetString):
tagSet: _Any
encoding: str
class LDAPResult(Sequence):
componentType: _Any
class Criticality(Boolean):
defaultValue: bool
class ControlValue(OctetString):
encoding: str
class Control(Sequence):
componentType: _Any
class Controls(SequenceOf):
tagSet: _Any
componentType: _Any
class Scope(Enumerated):
namedValues: _Any
class DerefAliases(Enumerated):
namedValues: _Any
class TypesOnly(Boolean): ...
class Selector(LDAPString): ...
class AttributeSelection(SequenceOf):
componentType: _Any
class MatchingRule(MatchingRuleId):
tagSet: _Any
class Type(AttributeDescription):
tagSet: _Any
class MatchValue(AssertionValue):
tagSet: _Any
class DnAttributes(Boolean):
tagSet: _Any
defaultValue: _Any
class MatchingRuleAssertion(Sequence):
componentType: _Any
class Initial(AssertionValue):
tagSet: _Any
class Any(AssertionValue):
tagSet: _Any
class Final(AssertionValue):
tagSet: _Any
class Substring(Choice):
componentType: _Any
class Substrings(SequenceOf):
subtypeSpec: _Any
componentType: _Any
class SubstringFilter(Sequence):
tagSet: _Any
componentType: _Any
class And(SetOf):
tagSet: _Any
subtypeSpec: _Any
class Or(SetOf):
tagSet: _Any
subtypeSpec: _Any
class Not(Choice): ...
class EqualityMatch(AttributeValueAssertion):
tagSet: _Any
class GreaterOrEqual(AttributeValueAssertion):
tagSet: _Any
class LessOrEqual(AttributeValueAssertion):
tagSet: _Any
class Present(AttributeDescription):
tagSet: _Any
class ApproxMatch(AttributeValueAssertion):
tagSet: _Any
class ExtensibleMatch(MatchingRuleAssertion):
tagSet: _Any
class Filter(Choice):
componentType: _Any
class PartialAttributeList(SequenceOf):
componentType: _Any
class Operation(Enumerated):
namedValues: _Any
class Change(Sequence):
componentType: _Any
class Changes(SequenceOf):
componentType: _Any
class DeleteOldRDN(Boolean): ...
class NewSuperior(LDAPDN):
tagSet: _Any
class RequestName(LDAPOID):
tagSet: _Any
class RequestValue(OctetString):
tagSet: _Any
encoding: str
class ResponseName(LDAPOID):
tagSet: _Any
class ResponseValue(OctetString):
tagSet: _Any
encoding: str
class IntermediateResponseName(LDAPOID):
tagSet: _Any
class IntermediateResponseValue(OctetString):
tagSet: _Any
encoding: str
class BindRequest(Sequence):
tagSet: _Any
componentType: _Any
class BindResponse(Sequence):
tagSet: _Any
componentType: _Any
class UnbindRequest(Null):
tagSet: _Any
class SearchRequest(Sequence):
tagSet: _Any
componentType: _Any
class SearchResultReference(SequenceOf):
tagSet: _Any
subtypeSpec: _Any
componentType: _Any
class SearchResultEntry(Sequence):
tagSet: _Any
componentType: _Any
class SearchResultDone(LDAPResult):
tagSet: _Any
class ModifyRequest(Sequence):
tagSet: _Any
componentType: _Any
class ModifyResponse(LDAPResult):
tagSet: _Any
class AddRequest(Sequence):
tagSet: _Any
componentType: _Any
class AddResponse(LDAPResult):
tagSet: _Any
class DelRequest(LDAPDN):
tagSet: _Any
class DelResponse(LDAPResult):
tagSet: _Any
class ModifyDNRequest(Sequence):
tagSet: _Any
componentType: _Any
class ModifyDNResponse(LDAPResult):
tagSet: _Any
class CompareRequest(Sequence):
tagSet: _Any
componentType: _Any
class CompareResponse(LDAPResult):
tagSet: _Any
class AbandonRequest(MessageID):
tagSet: _Any
class ExtendedRequest(Sequence):
tagSet: _Any
componentType: _Any
class ExtendedResponse(Sequence):
tagSet: _Any
componentType: _Any
class IntermediateResponse(Sequence):
tagSet: _Any
componentType: _Any
class ProtocolOp(Choice):
componentType: _Any
class LDAPMessage(Sequence):
componentType: _Any

View File

@@ -0,0 +1,218 @@
from typing import Any
def constant_to_class_kind(value): ...
def constant_to_attribute_usage(value): ...
def attribute_usage_to_constant(value): ...
def quoted_string_to_list(quoted_string): ...
def oids_string_to_list(oid_string): ...
def extension_to_tuple(extension_string): ...
def list_to_string(list_object): ...
class BaseServerInfo:
raw: Any
def __init__(self, raw_attributes) -> None: ...
@classmethod
def from_json(cls, json_definition, schema: Any | None = ..., custom_formatter: Any | None = ...): ...
@classmethod
def from_file(cls, target, schema: Any | None = ..., custom_formatter: Any | None = ...): ...
def to_file(self, target, indent: int = ..., sort: bool = ...) -> None: ...
def to_json(self, indent: int = ..., sort: bool = ...): ...
class DsaInfo(BaseServerInfo):
alt_servers: Any
naming_contexts: Any
supported_controls: Any
supported_extensions: Any
supported_features: Any
supported_ldap_versions: Any
supported_sasl_mechanisms: Any
vendor_name: Any
vendor_version: Any
schema_entry: Any
other: Any
def __init__(self, attributes, raw_attributes) -> None: ...
class SchemaInfo(BaseServerInfo):
schema_entry: Any
create_time_stamp: Any
modify_time_stamp: Any
attribute_types: Any
object_classes: Any
matching_rules: Any
matching_rule_uses: Any
dit_content_rules: Any
dit_structure_rules: Any
name_forms: Any
ldap_syntaxes: Any
other: Any
def __init__(self, schema_entry, attributes, raw_attributes) -> None: ...
def is_valid(self): ...
class BaseObjectInfo:
oid: Any
name: Any
description: Any
obsolete: Any
extensions: Any
experimental: Any
raw_definition: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
@property
def oid_info(self): ...
@classmethod
def from_definition(cls, definitions): ...
class MatchingRuleInfo(BaseObjectInfo):
syntax: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
syntax: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class MatchingRuleUseInfo(BaseObjectInfo):
apply_to: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
apply_to: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class ObjectClassInfo(BaseObjectInfo):
superior: Any
kind: Any
must_contain: Any
may_contain: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
superior: Any | None = ...,
kind: Any | None = ...,
must_contain: Any | None = ...,
may_contain: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class AttributeTypeInfo(BaseObjectInfo):
superior: Any
equality: Any
ordering: Any
substring: Any
syntax: Any
min_length: Any
single_value: Any
collective: Any
no_user_modification: Any
usage: Any
mandatory_in: Any
optional_in: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
superior: Any | None = ...,
equality: Any | None = ...,
ordering: Any | None = ...,
substring: Any | None = ...,
syntax: Any | None = ...,
min_length: Any | None = ...,
single_value: bool = ...,
collective: bool = ...,
no_user_modification: bool = ...,
usage: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class LdapSyntaxInfo(BaseObjectInfo):
def __init__(
self,
oid: Any | None = ...,
description: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class DitContentRuleInfo(BaseObjectInfo):
auxiliary_classes: Any
must_contain: Any
may_contain: Any
not_contains: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
auxiliary_classes: Any | None = ...,
must_contain: Any | None = ...,
may_contain: Any | None = ...,
not_contains: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class DitStructureRuleInfo(BaseObjectInfo):
superior: Any
name_form: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
name_form: Any | None = ...,
superior: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...
class NameFormInfo(BaseObjectInfo):
object_class: Any
must_contain: Any
may_contain: Any
def __init__(
self,
oid: Any | None = ...,
name: Any | None = ...,
description: Any | None = ...,
obsolete: bool = ...,
object_class: Any | None = ...,
must_contain: Any | None = ...,
may_contain: Any | None = ...,
extensions: Any | None = ...,
experimental: Any | None = ...,
definition: Any | None = ...,
) -> None: ...

View File

@@ -0,0 +1,2 @@
def pre_read_control(attributes, criticality: bool = ...): ...
def post_read_control(attributes, criticality: bool = ...): ...

View File

@@ -0,0 +1,9 @@
STATE_KEY: int
STATE_VALUE: int
def md5_h(value): ...
def md5_kd(k, s): ...
def md5_hex(value): ...
def md5_hmac(k, s): ...
def sasl_digest_md5(connection, controls): ...
def decode_directives(directives_string): ...

View File

@@ -0,0 +1 @@
def sasl_external(connection, controls): ...

View File

@@ -0,0 +1,8 @@
posix_gssapi_unavailable: bool
windows_gssapi_unavailable: bool
NO_SECURITY_LAYER: int
INTEGRITY_PROTECTION: int
CONFIDENTIALITY_PROTECTION: int
def get_channel_bindings(ssl_socket): ...
def sasl_gssapi(connection, controls): ...

View File

@@ -0,0 +1 @@
def sasl_plain(connection, controls): ...

View File

@@ -0,0 +1,5 @@
def sasl_prep(data): ...
def validate_simple_password(password, accept_empty: bool = ...): ...
def abort_sasl_negotiation(connection, controls): ...
def send_sasl_negotiation(connection, controls, payload): ...
def random_hex_string(size): ...

View File

@@ -0,0 +1,2 @@
ad_2012_r2_schema: str
ad_2012_r2_dsa_info: str

View File

@@ -0,0 +1,2 @@
ds389_1_3_3_schema: str
ds389_1_3_3_dsa_info: str

View File

@@ -0,0 +1,2 @@
edir_8_8_8_schema: str
edir_8_8_8_dsa_info: str

View File

@@ -0,0 +1,2 @@
edir_9_1_4_schema: str
edir_9_1_4_dsa_info: str

View File

@@ -0,0 +1,2 @@
slapd_2_4_schema: str
slapd_2_4_dsa_info: str

View File

View File

@@ -0,0 +1,18 @@
from typing import Any
from ..strategy.asynchronous import AsyncStrategy
class AsyncStreamStrategy(AsyncStrategy):
can_stream: bool
line_separator: Any
all_base64: bool
stream: Any
order: Any
persistent_search_message_id: Any
streaming: bool
callback: Any
events: Any
def __init__(self, ldap_connection) -> None: ...
def accumulate_stream(self, message_id, change) -> None: ...
def get_stream(self): ...
def set_stream(self, value) -> None: ...

View File

@@ -0,0 +1,27 @@
from threading import Thread
from typing import Any
from ..strategy.base import BaseStrategy
class AsyncStrategy(BaseStrategy):
class ReceiverSocketThread(Thread):
connection: Any
socket_size: Any
def __init__(self, ldap_connection) -> None: ...
def run(self) -> None: ...
sync: bool
no_real_dsa: bool
pooled: bool
can_stream: bool
receiver: Any
async_lock: Any
event_lock: Any
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = ..., read_server_info: bool = ...) -> None: ...
def close(self) -> None: ...
def set_event_for_message(self, message_id) -> None: ...
def post_send_search(self, message_id): ...
def post_send_single_response(self, message_id): ...
def receiving(self) -> None: ...
def get_stream(self) -> None: ...
def set_stream(self, value) -> None: ...

View File

@@ -0,0 +1,42 @@
from typing import Any
unix_socket_available: bool
SESSION_TERMINATED_BY_SERVER: str
TRANSACTION_ERROR: str
RESPONSE_COMPLETE: str
class BaseStrategy:
connection: Any
sync: Any
no_real_dsa: Any
pooled: Any
can_stream: Any
referral_cache: Any
thread_safe: bool
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = ..., read_server_info: bool = ...) -> None: ...
def close(self) -> None: ...
def send(self, message_type, request, controls: Any | None = ...): ...
def get_response(self, message_id, timeout: Any | None = ..., get_request: bool = ...): ...
@staticmethod
def compute_ldap_message_size(data): ...
def decode_response(self, ldap_message): ...
def decode_response_fast(self, ldap_message): ...
@staticmethod
def decode_control(control): ...
@staticmethod
def decode_control_fast(control, from_server: bool = ...): ...
@staticmethod
def decode_request(message_type, component, controls: Any | None = ...): ...
def valid_referral_list(self, referrals): ...
def do_next_range_search(self, request, response, attr_name): ...
def do_search_on_auto_range(self, request, response): ...
def create_referral_connection(self, referrals): ...
def do_operation_on_referral(self, request, referrals): ...
def sending(self, ldap_message) -> None: ...
def receiving(self) -> None: ...
def post_send_single_response(self, message_id) -> None: ...
def post_send_search(self, message_id) -> None: ...
def get_stream(self) -> None: ...
def set_stream(self, value) -> None: ...
def unbind_referral_cache(self) -> None: ...

View File

@@ -0,0 +1,21 @@
from typing import Any
from .base import BaseStrategy
class LdifProducerStrategy(BaseStrategy):
sync: bool
no_real_dsa: bool
pooled: bool
can_stream: bool
line_separator: Any
all_base64: bool
stream: Any
order: Any
def __init__(self, ldap_connection) -> None: ...
def receiving(self) -> None: ...
def send(self, message_type, request, controls: Any | None = ...): ...
def post_send_single_response(self, message_id): ...
def post_send_search(self, message_id) -> None: ...
def accumulate_stream(self, fragment) -> None: ...
def get_stream(self): ...
def set_stream(self, value) -> None: ...

View File

@@ -0,0 +1,11 @@
from typing import Any
from .asynchronous import AsyncStrategy
from .mockBase import MockBaseStrategy
class MockAsyncStrategy(MockBaseStrategy, AsyncStrategy):
def __init__(self, ldap_connection) -> None: ...
def post_send_search(self, payload): ...
bound: Any
def post_send_single_response(self, payload): ...
def get_response(self, message_id, timeout: Any | None = ..., get_request: bool = ...): ...

View File

@@ -0,0 +1,37 @@
from typing import Any
SEARCH_CONTROLS: Any
SERVER_ENCODING: str
def random_cookie(): ...
class PagedSearchSet:
size: Any
response: Any
cookie: Any
sent: int
done: bool
def __init__(self, response, size, criticality) -> None: ...
def next(self, size: Any | None = ...): ...
class MockBaseStrategy:
entries: Any
no_real_dsa: bool
bound: Any
custom_validators: Any
operational_attributes: Any
def __init__(self) -> None: ...
def add_entry(self, dn, attributes, validate: bool = ...): ...
def remove_entry(self, dn): ...
def entries_from_json(self, json_entry_file) -> None: ...
def mock_bind(self, request_message, controls): ...
def mock_delete(self, request_message, controls): ...
def mock_add(self, request_message, controls): ...
def mock_compare(self, request_message, controls): ...
def mock_modify_dn(self, request_message, controls): ...
def mock_modify(self, request_message, controls): ...
def mock_search(self, request_message, controls): ...
def mock_extended(self, request_message, controls): ...
def evaluate_filter_node(self, node, candidates): ...
def equal(self, dn, attribute_type, value_to_check): ...
def send(self, message_type, request, controls: Any | None = ...): ...

View File

@@ -0,0 +1,10 @@
from typing import Any
from .mockBase import MockBaseStrategy
from .sync import SyncStrategy
class MockSyncStrategy(MockBaseStrategy, SyncStrategy):
def __init__(self, ldap_connection) -> None: ...
def post_send_search(self, payload): ...
bound: Any
def post_send_single_response(self, payload): ...

View File

@@ -0,0 +1,19 @@
from typing import Any
from .sync import SyncStrategy
class RestartableStrategy(SyncStrategy):
sync: bool
no_real_dsa: bool
pooled: bool
can_stream: bool
restartable_sleep_time: Any
restartable_tries: Any
exception_history: Any
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = ..., read_server_info: bool = ...) -> None: ...
def send(self, message_type, request, controls: Any | None = ...): ...
def post_send_single_response(self, message_id): ...
def post_send_search(self, message_id): ...
def get_stream(self) -> None: ...
def set_stream(self, value) -> None: ...

View File

@@ -0,0 +1,71 @@
from threading import Thread
from typing import Any
from .base import BaseStrategy
TERMINATE_REUSABLE: str
BOGUS_BIND: int
BOGUS_UNBIND: int
BOGUS_EXTENDED: int
BOGUS_ABANDON: int
class ReusableStrategy(BaseStrategy):
pools: Any
def receiving(self) -> None: ...
def get_stream(self) -> None: ...
def set_stream(self, value) -> None: ...
class ConnectionPool:
def __new__(cls, connection): ...
name: Any
master_connection: Any
workers: Any
pool_size: Any
lifetime: Any
keepalive: Any
request_queue: Any
open_pool: bool
bind_pool: bool
tls_pool: bool
counter: int
terminated_usage: Any
terminated: bool
pool_lock: Any
started: bool
def __init__(self, connection) -> None: ...
def get_info_from_server(self) -> None: ...
def rebind_pool(self) -> None: ...
def start_pool(self): ...
def create_pool(self) -> None: ...
def terminate_pool(self) -> None: ...
class PooledConnectionThread(Thread):
daemon: bool
worker: Any
master_connection: Any
def __init__(self, worker, master_connection) -> None: ...
def run(self) -> None: ...
class PooledConnectionWorker:
master_connection: Any
request_queue: Any
running: bool
busy: bool
get_info_from_server: bool
connection: Any
creation_time: Any
task_counter: int
thread: Any
worker_lock: Any
def __init__(self, connection, request_queue) -> None: ...
def new_connection(self) -> None: ...
sync: bool
no_real_dsa: bool
pooled: bool
can_stream: bool
pool: Any
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = ..., read_server_info: bool = ...) -> None: ...
def terminate(self) -> None: ...
def send(self, message_type, request, controls: Any | None = ...): ...
def validate_bind(self, controls): ...
def get_response(self, counter, timeout: Any | None = ..., get_request: bool = ...): ...
def post_send_single_response(self, counter): ...
def post_send_search(self, counter): ...

View File

@@ -0,0 +1,5 @@
from .restartable import RestartableStrategy
class SafeRestartableStrategy(RestartableStrategy):
thread_safe: bool
def __init__(self, ldap_connection) -> None: ...

View File

@@ -0,0 +1,5 @@
from .sync import SyncStrategy
class SafeSyncStrategy(SyncStrategy):
thread_safe: bool
def __init__(self, ldap_connection) -> None: ...

View File

@@ -0,0 +1,19 @@
from typing import Any
from ..strategy.base import BaseStrategy
LDAP_MESSAGE_TEMPLATE: Any
class SyncStrategy(BaseStrategy):
sync: bool
no_real_dsa: bool
pooled: bool
can_stream: bool
socket_size: Any
def __init__(self, ldap_connection) -> None: ...
def open(self, reset_usage: bool = ..., read_server_info: bool = ...) -> None: ...
def receiving(self): ...
def post_send_single_response(self, message_id): ...
def post_send_search(self, message_id): ...
def set_stream(self, value) -> None: ...
def get_stream(self) -> None: ...

View File

Some files were not shown because too many files have changed in this diff Show More