Skip to main content
Version: 2.2-dev

LDAP / Active Directory

LDAP (Lightweight Directory Access Protocol) provides direct integration with on-premise directory services. Use it to connect to Active Directory, OpenLDAP, FreeIPA, or any other LDAP-compliant directory server.

How It Works

  1. A user clicks Sign in with {Provider Name} on the login page and enters their directory username and password.
  2. MaestroHub connects to the LDAP server using one of two methods:
    • Search Bind (default): Binds with a service account, searches for the user by filter, then re-binds with the user's DN and password.
    • Direct Bind: Constructs the user's DN from a template and binds directly with their password.
  3. If authentication succeeds, MaestroHub retrieves user attributes and group memberships from the directory.
  4. A local user account is created or linked, roles are mapped from directory groups, and the user is logged in.

Configuration Reference

Connection Settings

FieldTypeRequiredDefaultDescription
HostTextYesLDAP server hostname or IP address (e.g., ldap.company.com or 192.168.1.100). Do not include the protocol prefix.
PortNumberNo389LDAP port. Standard ports: 389 for LDAP, 636 for LDAPS. Automatically set to 636 when TLS is enabled and port is left at 389.
Base DNTextYesBase Distinguished Name for user searches (e.g., dc=company,dc=com). All user searches start from this point in the directory tree.

Authentication Method

FieldTypeDefaultDescription
Bind MethodSelectSearch BindSearch Bind (recommended): Uses a service account to find the user, then authenticates as the user. Works with any directory structure. Direct Bind: Constructs the user's DN from a template — faster but requires a predictable DN structure.

Search Bind Fields

FieldTypeRequiredDescription
Bind DNTextNoDistinguished Name of the service account (e.g., cn=ldap-service,ou=service-accounts,dc=company,dc=com). Leave empty for anonymous bind (if your server allows it).
Bind PasswordPasswordNoPassword for the service account. Required if Bind DN is set.

Direct Bind Fields

FieldTypeRequiredDescription
User DN TemplateTextYesTemplate for constructing the user's DN. Use %s as a placeholder for the username (e.g., uid=%s,ou=users,dc=company,dc=com).

Search Settings

FieldTypeDefaultDescription
User FilterText(uid=%s)LDAP filter for finding user entries. %s is replaced with the username entered at login. For Active Directory, use (sAMAccountName=%s).
Search ScopeSelectSubtreeHow deep to search from the Base DN. Base: only the Base DN entry. One Level: direct children of Base DN. Subtree (default): entire tree below Base DN.

Advanced Settings

TLS/SSL

FieldTypeDefaultDescription
Use STARTTLSSwitchOffUpgrade the plain LDAP connection to TLS after connecting (port 389). Use this for encrypted connections on the standard port.
Skip TLS VerificationSwitchOffSkip certificate verification for TLS connections. Not recommended for production — use only for testing with self-signed certificates.
note

For LDAPS (TLS from connection start), set the port to 636 and enable STARTTLS. The connection will use TLS immediately.

Timeouts

FieldTypeDefaultRangeDescription
Connection TimeoutNumber (seconds)101–120Maximum time to wait when establishing a connection to the LDAP server.
Request TimeoutNumber (seconds)301–300Maximum time to wait for LDAP operations (search, bind) to complete.

Attribute Mapping

Map LDAP attributes to MaestroHub user fields. The defaults work with most standard LDAP schemas. Active Directory equivalents are noted where they differ.

FieldDefaultAD EquivalentDescription
UID AttributeentryUUIDobjectGUIDUnique identifier attribute. Used to match directory users to local accounts across sessions.
Email AttributemailmailEmail address attribute.
First Name AttributegivenNamegivenNameFirst name attribute.
Last Name AttributesnsnLast name (surname) attribute.
Display Name AttributedisplayNamedisplayNameFull display name attribute.
Member Of AttributememberOfmemberOfGroup membership attribute on user entries. Used for role mapping.

Group Settings

These optional fields support advanced group lookup when the memberOf attribute is not available on user entries.

FieldDefaultDescription
Group Base DNBase DN for group searches, if different from the user Base DN.
Group FilterLDAP filter for finding groups.
Group Member AttributememberAttribute on group entries that lists member DNs.

Role Mapping

Optionally map LDAP groups to MaestroHub roles.

FieldTypeDefaultDescription
Enable Role MappingSwitchOffActivate role mapping for this provider.
Role ClaimTextmemberOfThe attribute containing group memberships. Defaults to memberOf. LDAP groups are automatically extracted — you usually don't need to change this.
Default RoleSelectMemberRole assigned when no mapping matches.
Strict EnrollmentSwitchOffBlock login if no specific mapping matches.
MappingsKey → Value pairsMap LDAP group DNs or names to MaestroHub roles (e.g., cn=Admins,ou=Groups,dc=company,dc=comSystem.Admin).

Setup Guide

Step 1: Prepare the LDAP Server

Ensure you have:

  • Server hostname and port — network accessibility from the MaestroHub server.
  • Service account (for Search Bind) — a dedicated LDAP account with read access to user entries. Note its full DN and password.
  • Base DN — the starting point in the directory tree where your users are located.
  • User filter — know which attribute your users log in with (uid for standard LDAP, sAMAccountName for Active Directory).

Step 2: Create the Provider in MaestroHub

  1. Go to Identity & Access → SSO Configuration.
  2. Click Add ProviderLDAP / Active Directory.
  3. Fill in:
    • Host and Port
    • Base DN
    • Bind Method — choose Search Bind or Direct Bind
    • Bind DN and Bind Password (for Search Bind)
    • User DN Template (for Direct Bind)
  4. Adjust the User Filter if needed (e.g., (sAMAccountName=%s) for Active Directory).

Step 3: Test and Enable

  1. Click Test Connection. MaestroHub connects to the LDAP server and performs a service account bind.
  2. A success message confirms connectivity. If it fails, check the host, port, Bind DN, and password.
  3. Save the provider.
  4. The provider appears on the login page. Users see a username/password form when they select it.

Active Directory Quick Setup

For a typical Active Directory environment:

FieldValue
Hostad.company.com
Port389 (or 636 for LDAPS)
Base DNdc=company,dc=com
Bind MethodSearch Bind
Bind DNcn=svc-maestrohub,ou=Service Accounts,dc=company,dc=com
User Filter(sAMAccountName=%s)
UID AttributeobjectGUID
Use STARTTLSOn (recommended)

Login Experience

Unlike OIDC and SAML (which redirect to an external login page), LDAP authentication uses an inline login form directly on the MaestroHub login page:

  1. The user selects their LDAP provider from a dropdown (if multiple are configured).
  2. They enter their directory username and password.
  3. MaestroHub authenticates against the LDAP server in the background.
  4. On success, the user is logged in immediately without any redirect.

Troubleshooting

ProblemSolution
"Connection failed"Verify the hostname, port, and network connectivity. Ensure the LDAP port is not blocked by a firewall. Test with 389 before trying 636.
"Bind failed"Confirm the Bind DN and Bind Password are correct. The service account must have permission to search the user Base DN.
"User not found"Check the Base DN and User Filter. Ensure the user exists under the Base DN and the filter matches their attributes. For AD, use (sAMAccountName=%s) not (uid=%s).
"Invalid credentials"The user's password is incorrect, or the account is locked/disabled in the directory. Check the directory directly.
"TLS errors"When using STARTTLS or LDAPS, ensure the server's certificate is valid. Use Skip TLS Verification only for testing with self-signed certificates.
"Timeout errors"Increase the Connection Timeout and Request Timeout values. Check network latency to the LDAP server.
Users not getting correct rolesVerify the Member Of Attribute is populated on user entries. For AD, ensure group membership is replicated. Check that the group DNs in Mappings match exactly.
"Multiple users found"The User Filter is matching more than one entry. Make the filter more specific (e.g., add (objectClass=person) to narrow results).