Expand description
LDAP and Active Directory authentication and directory lookup.
§coqui-access-ldap
Authenticates against LDAP or Active Directory and uses the same directory for names and groups. Passwords are sent only over TLS, StartTLS or loopback; search filters escape user-supplied values. No connection is made until a request is checked.
§Features
- Search, then bind — finds the account with a service account, refuses disabled ones, then binds as the account with the supplied password.
- Groups — from
memberOf, from a group search, or nested with Active Directory’s matching rule; an Active Directory account’s primary group (primaryGroupID, normally Domain Users), whichmemberOfleaves out, is added. - Private CA — an optional PEM file as the only trusted roots.
§Installation
cargo add coqui-access-ldap --git https://github.com/Boriken-Dev/coqui-accessBuild coqui-access-ldap-plugin for the loadable library.
§Quick start
Provider id coqui_access_ldap, configuration:
url = "ldaps://directory.example.org"
base = "DC=example,DC=org"
bind = "CN=search,DC=example,DC=org"
bind_password = "..."
# user_filter = "(sAMAccountName={name})"
# nested_groups = true§API overview
| Item | Purpose |
|---|---|
LdapAccounts | The provider: new(config), Authenticator and Directory. |
LdapAccountsConfig | The Guatiao configuration. |
search | Filter and result helpers that need no directory. |
The live test in tests/live_directory.rs is ignored unless run against a disposable
directory; see AGENTS.md.
§Development
cargo test -p coqui-access-ldap --all-features
cargo clippy -p coqui-access-ldap --all-targets --all-features -- -D warnings§Releasing
This project follows Semantic Versioning and keeps a
CHANGELOG.md.
Pushing a tag matching v* triggers the release workflow of the repository.
§License
MPL-2.0 — see LICENSE.
Modules§
- search
- LDAP filter and result helpers, independent of a live directory.
Structs§
- Ldap
Accounts - LDAP accounts as authentication and directory providers, with lookups kept as the
configuration’s
cachesays. - Ldap
Accounts Config - LDAP authentication and query settings.
Constants§
- DEFAULT_
OBJECT_ FILTER - The account filter a filter lookup is ANDed with unless the configuration says another: people who are users, which leaves out Active Directory’s computer accounts.
Traits§
- Ldap
Accounts Config Setters - The typed setters of
LdapAccountsConfig, for any builder that holds its settings.