Expand description
§ldap-utils
Implements some LDAP utility functionality around OpenLDAP config files and the ldap3 Rust library
Structs§
- Connect
Parameters - a set of parameters for connecting to an LDAP server, including client-side certificate auth support
- Connect
Parameters Builder - Builder for
ConnectParameters
. - OIDError
- an error type in case parsing an OID fails when querying the RootDSE from ldap3 during the parsing of supported controls, extensions and features
Enums§
- Connect
Error - errors which can happen when connecting to an LDAP server
- Connect
Parameters Builder Error - Error type for ConnectParametersBuilder
- Ldap
Operation Error - an error during normal ldap operations (search, add, modify, update, delete,…)
- Ldap
Schema Error - error which can happen while retrieving and parsing the LDAP schema
- Open
Ldap Connect Parameter Error - errors which can happen when trying to retrieve connect parameters from openldap config
- Scope
Parser Error - error which can occur while parsing a scope
- Toml
Config Error - error which can happen while reading connect parameters from a file
Functions§
- apply_
ldap_ operations - apply the LDAP operations on a given LDAP server.
- connect
- try to connect to an LDAP server using ldap3 using the OpenLDAP config files supplemented by hardcoded default values
- connect_
with_ parameters - connect to an LDAP server using ldap3 with the given set of default parameters
- default_
connect_ parameters - fill the builder with hardcoded default parameters
- delete_
recursive - delete an LDAP entry recursively using ldap3
- diff_
entries - diff two sets of LDAPEntries which had their base DNs removed and generates LDAP operations (add, update, delete) to apply to the destination to make it identical to the source
- ldap_
search - perform an LDAP search via ldap3, logging a proper error message if it fails and returning an iterator to already unwrapped search entries
- mod_
value - generate an ldap3::Mod if there is a DN-valued attribute in the source entry that needs its base DN translated to the destination base DN
- mods_
as_ bin_ mods - of the same modify operation because otherwise we might successfully apply the textual modifications and then fail on the binary ones, leaving behind a half-modified object
- noop_
control - creates a noop_control object for use with ldap3
- openldap_
connect_ parameters - try to detect OpenLDAP connect parameters from its config files (ldap.conf in /etc/ldap or /etc/openldap and .ldaprc in the user home dir)
- parse_
scope - parse an ldap3::Scope from the string one would specify to use the same scope with OpenLDAP’s ldapsearch -s parameter
- query_
ldap_ schema - Retrieve the LDAP schema from an LDAP server using ldap3
- query_
root_ dse - retrieve the RootDSE from an LDAP server using ldap3
- search_
entries - helper function to search an LDAP server and generate LDAPEntry values with the base DN removed to make them server-independent
- success_
or_ noop_ success - check if an ldap3::LdapResult is either a success or the success code returned by an operation using the noop_control
- toml_
connect_ parameters - load ldap connect parameters from a toml file