Request Lifecycle
The LDAP provider operates over TCP using the LDAP protocol (not HTTP). Each operation type has its own processing flow and hook point.Search
Simple Bind Authentication
NTLM Authentication (GSSAPI/SPNEGO)
NTLM authentication is a multi-message handshake within a SASL bind. ThegetHashedCredentialsSE hook is called during the final Authenticate phase to retrieve the password hashes needed for verification.
Hooks
searchSE
Handle LDAP search requests by returning directory entries that match the query. Each entry maps a distinguished name (DN) to its attributes. Use this to implement custom search logic, query external directories, filter results, or build virtual directory entries from non-LDAP sources like databases or REST APIs.
Signature:
ldapProvider.search.searchSE
Parameters:
| Parameter | Type | Description |
|---|---|---|
api | orchestrator.Orchestrator | Access to sessions, caches, secrets, logging, and other Orchestrator services |
baseDN | string | The base distinguished name for the search |
filter | string | The LDAP search filter expression |
attrs | []string | The list of attribute names to return |
map[string]map[string]interface{}— a map of DNs to attribute maps, where each attribute map contains the requested attribute name-value pairserror— returnnilon success, or an error if the search fails
authenticateSE
Authenticate a user via LDAP simple bind. Return true if the credentials are valid, or false to deny authentication. Use this to validate credentials against an external system, implement custom password policies, or bridge LDAP authentication to a non-LDAP identity store.
Signature:
ldapProvider.authentication.methods.simple.authenticateSE
Parameters:
| Parameter | Type | Description |
|---|---|---|
api | orchestrator.Orchestrator | Access to sessions, caches, secrets, logging, and other Orchestrator services |
dn | string | The distinguished name of the user attempting to bind |
password | string | The password provided by the user |
bool—trueif the credentials are valid,falseotherwiseerror— returnnilon success, or an error if the authentication process fails
Delegate simple bind to an IdP via ROPC
Delegate simple bind to an IdP via ROPC
When an LDAP client performs a simple bind, this extension extracts the
username from the bind DN and authenticates the user against an OIDC identity
provider using the Resource Owner Password Credentials (ROPC) grant. This
bridges LDAP authentication with a modern IdP without changes to the
client application.
- Extension
- Configuration
ldap-authenticate.go
Add TOTP multi-factor authentication to simple bind
Add TOTP multi-factor authentication to simple bind
Applications that authenticate via LDAP simple bind have no built-in way
to support multi-factor authentication. This extension works around that
limitation by treating the password field as a concatenation of the real
password and a TOTP code (e.g.,
myP@ssword12345678). The password portion
is verified against an IdP via ROPC, and the TOTP code is verified against
an external MFA API.- Extension
- Configuration
ldap-authenticate-totp.go
getHashedCredentialsSE
Provide the password hashes needed for Windows integrated authentication (NTLM). The Orchestrator calls this during the GSSAPI/SPNEGO handshake with the user and domain identifiers, and expects back the pre-computed NT and LM password hashes. Use this to look up hashes from a credential store or compute them from a source system.
Signature:
ldapProvider.authentication.methods.sasl.mechanisms.gssspnego.ntlm.getHashedCredentialsSE
Parameters:
| Parameter | Type | Description |
|---|---|---|
api | orchestrator.Orchestrator | Access to sessions, caches, secrets, logging, and other Orchestrator services |
user | []byte | The user identifier for the NTLM authentication |
domain | []byte | The domain identifier for the NTLM authentication |
[]byte— the NT password hash for the user[]byte— the LM password hash for the usererror— returnnilon success, or an error if the credential lookup fails