Skip to content

LDAP Backend

dagster_authkit.auth.backends.ldap

LDAP Authentication Backend

Supports: - Microsoft Active Directory - OpenLDAP - Any RFC 4511 compliant LDAP server

Uses ldap3 (pure Python, thread-safe, cross-platform).

LDAPAuthBackend

Bases: AuthBackend

LDAP/Active Directory authentication backend.

Features: - Thread-safe (uses ldap3 SAFE_SYNC strategy) - Pure Python (no C dependencies) - TLS support - Smart group pattern matching - Flexible role mapping (groups or attributes)

__init__

__init__(config)

Initialise LDAP connection and validation.

Parameters:

Name Type Description Default
config Dict[str, Any]

Dict with LDAP settings (see AuthConfig documentation for the full list of DAGSTER_AUTH_LDAP_* variables).

required

Raises:

Type Description
ValueError

If required LDAP settings (SERVER, BASE_DN) are missing.

authenticate

authenticate(username, password)

Authenticates user against LDAP.

get_user

get_user(username)

Fetch user info from LDAP without password check.

list_users

list_users()

Iterate through raw response to list users.