Introduction
TIB supports Lightweight Directory Access Protocol (LDAP) and Active Directory using theADProvider method, which uses a passthrough flow; user credentials are submitted directly to TIB, which validates them against your LDAP server. No browser redirect to an external IdP is involved.
Because LDAP is a passthrough flow, you must provide a login page that submits credentials to TIB. Tyk Dashboard and Tyk Developer Portal do not include a built-in LDAP login page.
Before configuring your TIB profile, read Dashboard SSO or Portal SSO to understand the ActionType, ReturnURL, and IdentityHandlerConfig fields required for your use case.
TIB Profile
The LDAP-specific configuration goes in theProviderConfig block of the TIB profile. Set ProviderName to ADProvider and Type to passthrough.
ProviderConfig fields are:
| Field | Description |
|---|---|
LDAPServer | Hostname or IP address of your LDAP server. |
LDAPPort | Port of your LDAP server. Use 389 for standard LDAP or 636 for LDAPS. |
LDAPUserDN | Distinguished Name template used to bind as the authenticating user. The literal string *USERNAME* is replaced at runtime with the submitted username. |
LDAPBaseDN | Base DN from which LDAP searches are performed. |
LDAPFilter | LDAP search filter applied when looking up users. |
LDAPEmailAttribute | LDAP attribute containing the user’s email address. Defaults to mail. |
LDAPFirstNameAttribute | LDAP attribute containing the user’s first name. Defaults to givenName. |
LDAPLastNameAttribute | LDAP attribute containing the user’s last name. Defaults to sn. |
LDAPAttributes | Additional LDAP attributes to retrieve. Can be an empty list. |
LDAPUseSSL | Set to true to connect using LDAPS. |
LDAPAdminUser | DN of an admin user for performing user-lookup searches, if required. |
LDAPAdminPassword | Password for the admin user. |
LDAPSearchScope | Depth of the LDAP search: 0 for base object only, 1 for single level below the base DN, 2 for the entire subtree. Defaults to 2. |
DefaultDomain | Domain appended to the username when building the full user identifier. Used to construct the username but not for performing LDAP requests. |
FailureRedirect | URL to redirect the user to on authentication failure. |
GetAuthFromBAHeader | Set to true to read the username and password from the HTTP Basic Auth header. Recommended for form-based login pages. |
SlugifyUserName | Set to true to normalize the username to a URL-safe slug. |
Login Page
Since LDAP is a passthrough flow, users submit credentials directly to TIB via a formPOST. Create a login page with a form that posts to the TIB authentication endpoint:
POST method and include username and password fields. TIB reads these field names exactly.
For embedded TIB, {tib-host} is the same as your Dashboard or Portal host.
Worked Examples
- Dashboard SSO
- Portal SSO
In this example, Tyk Dashboard is running at With this configuration, registered users (with a Tyk Dashboard user account) get their own permissions; unregistered users fall back to the group specified in Redirect to login pageTo redirect users to your custom login page instead of the default Dashboard login, set See Dashboard SSO for details on session behavior, permissions, and user group mapping.
http://dashboard.example.com on port 3000; replace the example values with your own.Tyk Dashboard configurationsso_default_group_id. See Dashboard SSO for full details.TIB profileThe TIB profile is created via the Tyk Identity Broker API or the Tyk Dashboard UI.- set
DashboardCredentialto the TIB service account’s Dashboard credentials - update
LDAPUserDNto match your LDAP directory structure, keeping*USERNAME*as a literal placeholder
POST to:sso_custom_login_url in the Tyk Dashboard configuration: