LDAP authentication¶
- Overview
- Before you begin
- Configuring an LDAP provider
- Configure OpenLDAP
- Configure Active Directory
- Role mapping examples
- Test the LDAP connection
- Sign in with LDAP
- Update a provider
- Deactivate or delete a provider
- Custom CA certificates for LDAP/LDAPS authentication
- OpenLDAP configuration notes and sample LDIF expectations
- Troubleshoot custom CA certificate issues
- General LDAP troubleshooting
- Acceptance checklist
- References
Overview¶
Use the LDAP provider to authenticate with OpenLDAP or Microsoft Active Directory (AD). This guide covers directory configuration, group resolution, connection testing, and certificates.
Before you begin¶
- You have an administrator account in F5 Insight.
- You have a directory account that can read users and groups.
- F5 Insight can reach your directory server.
- You have the directory connection details and attribute mappings.
Configure a group-to-role mapping before testing user access. F5 Insight blocks access when no role is found. See External authentication and role-based access control.
Important
If there is any risk of username collisions, don’t use local and external users together. Keep external usernames distinct from all local usernames.
Avoid the external username admin. F5 Insight assigns the Admin role to that username regardless of remote role mappings.
When a local and an external username collide, you can no longer manage the local user or reset the local password. For example, after an external admin sign-in, the local admin account disappears from the user list. See Known authentication issues.
Note
Reset Password appears for external users, but password resets apply only to local users. Manage directory passwords through your directory service.
Configuring an LDAP provider¶
- Sign in to F5 Insight as an administrator.
- Go to .
- Select LDAP.
- Fill in the required configuration fields:
| Field | Description | Required |
|---|---|---|
| Provider Name | Display name for the provider (appears on the sign-in screen) | Yes |
| Server URL | LDAP server hostname or IP address with port (for example, ldap://ldap.example.com:389 or ldaps://ldap.example.com:636) |
Yes |
| Base DN | Base Distinguished Name (DN) for user search queries | Yes |
| Bind DN | DN used to authenticate with the LDAP server | Yes |
| Bind Password | Password for the Bind DN account | Yes |
| LDAP Attributes | Mapping of LDAP attributes to user properties, such as mail and username | Yes |
| Userbase DN | User search base DN | Yes |
| User filters | Attribute name used to find the directory entry that matches the sign-in value, such as uid or sAMAccountName. Don’t enter a full LDAP filter expression. |
Yes |
| User object | LDAP object class used for user entries | Yes |
- Select Create to save the configuration, then select Activate to enable the provider.
LDAP lookup and attribute examples¶
Use these examples to choose the lookup attribute and account mappings for your directory. The AD values are schema examples. Attribute names are case-sensitive in F5 Insight. Match the spelling that your directory returns. Enter one attribute name per mapping, not a list of alternatives.
| Form setting | Purpose | OpenLDAP | Active Directory |
|---|---|---|---|
| User filters | Finds the directory entry that matches the value you enter at sign-in. | uid |
sAMAccountName or userPrincipalName |
| User ID attribute | Supplies the stable, unique identifier for the account. This is separate from the account username. | uid |
sAMAccountName or userPrincipalName |
| Username attribute | Supplies the account username after F5 Insight finds the directory entry. This can differ from User filters. | uid |
sAMAccountName or userPrincipalName |
| Email attribute | Supplies the email address. | mail |
mail |
| Displayname attribute | Supplies the display name. | displayName or cn |
displayName |
| First name attribute | Supplies the first name. | givenName |
givenName |
| Last name attribute | Supplies the last name. | sn |
sn |
Keep User ID attribute stable. If you change the identifier, existing user links can break.
The OpenLDAP sample directory entry uses cn for the display name.
Note
Username in Test LDAP User Authentication is the sign-in value, not an attribute name. For example, set User filters to sAMAccountName and Username attribute to userPrincipalName. Enter usera in the test’s Username box. F5 Insight finds the entry whose sAMAccountName is usera. If the entry’s userPrincipalName is user@example.com, F5 Insight uses user@example.com as the account username.
Only one active LDAP provider and one active SAML provider (such as Okta or Ping) can be enabled at a time. After activation, a Sign in with <Provider Name> button appears on the sign-in page immediately.
For OpenLDAP, set User filters to uid. For AD, use your directory’s user lookup attribute. Don’t enter a full LDAP filter string such as (&(objectClass=inetOrgPerson)(uid={0})). The LDAP server must be reachable on a standard LDAP port: 389 for LDAP (or LDAP with StartTLS) and 636 for LDAPS. Make sure firewall and network policy rules allow traffic from F5 Insight to the selected port.
Configure OpenLDAP¶
OpenLDAP uses the LDAP provider type. Follow Configuring an LDAP provider with the connection settings for your directory.
- Set Userbase DN to the container that holds your user entries, such as
ou=People,dc=ldap,dc=example,dc=com. - Set User filters to the user lookup attribute, such as
uid. Don’t enter a full LDAP filter expression. - Set User object to the object class for your users, such as
inetOrgPerson.
For sample directory entries and attribute mappings, see OpenLDAP configuration notes and sample LDIF expectations.
For role mapping, enter the exact group common name (CN), such as f5-admin, in Grouped Resource Attribute. Matching is case-sensitive. The cn= prefix is optional, and anything after the first comma is ignored. For example, f5-admin, cn=f5-admin, and cn=f5-admin,ou=Groups,dc=ldap,dc=example,dc=com all identify f5-admin.
If the user’s memberOf attribute provides no groups, F5 Insight searches under ou=groups,<BASE_DN> using member or memberUid membership attributes. Replace <BASE_DN> with your configured Base DN. If the search base doesn’t exist, F5 Insight logs a warning that also notes the unsuccessful memberOf lookup.
Configure Active Directory¶
Microsoft Active Directory also uses the LDAP provider type. Follow Configuring an LDAP provider with the connection settings for your directory.
- Set Userbase DN to the search base that holds your AD user entries.
- Set User filters to your directory’s user lookup attribute. Don’t enter a full LDAP filter expression.
- Set User object to the object class for your AD user entries.
For AD, the full user principal name (UPN) is a workaround to avoid collisions with local usernames. Set Username attribute to userPrincipalName instead of the short username attribute. User filters can still use sAMAccountName for sign-in lookup.
Verify that the resulting account username doesn’t match any local username, including admin. If there is still a risk of collisions, don’t use local and external users together.
F5 Insight first reads the memberOf attribute on the user’s directory entry. For each group DN, F5 Insight extracts the CN for role mapping. For example, CN=F5 Admins,CN=Users,DC=example,DC=com resolves to F5 Admins. Groups resolved through memberOf don’t need to be under ou=groups.
For role mapping, enter F5 Admins in Grouped Resource Attribute to match that group. The cn= prefix is optional, and anything after the first comma is ignored. For example, F5 Admins, cn=F5 Admins, and cn=F5 Admins,CN=Users,DC=example,DC=com all identify F5 Admins.
Matching preserves the group’s exact casing. For example, domain admins doesn’t match Domain Admins. If memberOf provides no groups, F5 Insight uses the OpenLDAP-style fallback described in Configure OpenLDAP. See Role mapping to assign roles.
Known issue: Active Directory accounts with missing profile attributes¶
If an Active Directory account is missing a mail, firstname, or lastname value, F5 Insight displays a registration prompt. As a workaround, map mail to userPrincipalName and map firstname and lastname to cn. Confirm that the replacement attributes are populated for affected accounts. When mail is mapped to userPrincipalName, the user’s principal name appears as the email address. userPrincipalName is typically in email format but is not guaranteed to be a routable mailbox.
Role mapping examples¶
OpenLDAP role mapping¶
| OpenLDAP user | Group name | F5 Insight role | Access level |
|---|---|---|---|
john.smith |
f5-admin |
Admin | Full access including User Administration |
jane.doe |
f5-operator |
Operator | Operational access, no User Administration |
bob.wilson |
f5-viewer |
Viewer | Read-only access |
new.user |
(not configured) | None | Access denied |
Active Directory role mapping¶
For a user whose memberOf attribute contains CN=F5 Admins,CN=Users,DC=example,DC=com, set Grouped Resource Attribute to F5 Admins. Map that group to Admin. You can also enter cn=F5 Admins or cn=F5 Admins,CN=Users,DC=example,DC=com. The prefix is optional, and anything after the first comma is ignored. Matching remains case-sensitive, so f5 admins doesn’t match F5 Admins.
To grant read-only access to another AD group, create a separate mapping from that group’s exact CN to Viewer. Without a matching role mapping, access is blocked.
Test the LDAP connection¶
Note
Test Connection is available for LDAP providers only. It validates the LDAP connection and retrieves the available LDAP groups. When you edit an existing LDAP provider, re-enter the bind password to enable the Test Connection button.
For AD, connection validation and runtime group lookup suppress LDAP referral continuations so that searches under the domain root don’t stall on referrals. By default, LDAP operations have a 30-second timeout. An operation that exceeds this limit returns a timeout error. This limit applies to individual operations, not the entire Test Connection workflow.
Understand the two LDAP tests¶
F5 Insight provides two diagnostic tests and one end-to-end verification:
| Test | What it checks | What it does not prove |
|---|---|---|
| Test Connection (Configuration tab) | LDAP/TLS connectivity, service-account bind, user search, configured attribute mappings, and directory group discovery | Does not verify a user’s password, activate or save the provider, or establish an F5 Insight session |
| LDAP User Authentication tab | Service-account connection, lookup of a specific user, that user’s password bind, user information, group memberships, and a preview of saved group-to-role mappings | Does not save the provider, create an application session, or guarantee a successful browser sign-in |
| Browser sign-in | The complete external authentication flow: redirects, identity provisioning and linking, role resolution, and access to F5 Insight | A passing directory test alone does not replace this check |
Important
The user-authentication test evaluates mappings that belong to the currently active LDAP provider, not necessarily the configuration you are testing. This test has no provider selector. When no LDAP provider is active, discovered groups show No match. When you test a new or inactive provider while another provider is active, the mapping preview may not relate to the provider you are evaluating.
Test a connection¶
- Open the LDAP provider’s Configuration tab.
- Confirm all required fields are complete (see Configuring an LDAP provider).
- Select Test Connection. The button shows Testing… while the test runs.
- If the button is disabled, check for missing required fields, TLS Certificate Authority (CA) selection issues, or field-validation errors.
- Review the result:
- Success: The result reports Connection successful. Found N user(s). It may also show group counts and names. The UI displays only the first five group names when more are found.
- Failure: The result identifies a connection, bind, search, TLS, or attribute-mapping problem.
Test LDAP user authentication¶
- Open the provider’s actions menu and choose Edit, or use the unsaved Add LDAP Provider drawer for a candidate test.
- Select the LDAP User Authentication tab.
- Enter the test user’s Username and Password. These are the user’s directory credentials, not the service-account credentials. Use the sign-in value that matches the configured attribute (for example,
aliceforuid). - Re-enter the Bind Password for the service account. Stored passwords are not shown, even in edit mode.
- Confirm the Server URL, Base DN, Bind DN, User filters, and optional TLS/CA settings. In edit mode, these fields are read-only on this tab. Use the Configuration tab to change them.
- Use one login attribute in User filters for a consistent test. This tab does not use User Object Classes or Userbase DN. The user lookup starts from Base DN.
- Select Test Connection inside this tab. Despite the shared button label, this runs the user-authentication test—not the Configuration tab’s service-account-only connection test.
- Review the success or error banner and the result sections:
| UI section | What to verify |
|---|---|
| User Information | The expected user DN, attributes, and Member Of values. |
| Resolved LDAP Groups | The expected group DN and group CN or resolved names. This section is hidden when no groups are returned. |
| Group Mapping Test | The expected LDAP group and F5 Insight role. Permit means a preview mapping was found. No match means no saved mapping exists for that group. This section is hidden when no rows exist. Confirm the intended provider is active and that mappings are exact. |
| Authentication Test Summary | User lookup and Password bind should show Pass. For a group-based account, also verify the Group lookup result. Skipped is not Pass—it may mean a prerequisite failed or no memberships were found. |
If the test fails, the UI shows an error banner instead of the result tables. A mapping preview does not issue a role or application token.
Important
This tab has no Create or Save changes button. It does not save settings.
Sign in with LDAP¶
Before you sign in, confirm that the provider is active and that group-to-role mappings are configured. See Role mapping examples.
- Go to the F5 Insight sign-in page.
- Select Sign in with <LDAP Provider Name>.
- F5 Insight redirects you to the LDAP credential screen.
- Enter your LDAP username and password.
- After successful authentication, F5 Insight redirects you to the dashboard with permissions based on your assigned role.
Verify a real LDAP sign-in¶
Keep your administrator session open. Use a separate private or incognito browser window for the test user. This avoids mistaking an existing session for a fresh LDAP sign-in.
Open the configured F5 Insight external URL and refresh the sign-in page. Confirm the intended LDAP provider is active.
Select Sign in with <provider name> (for example, Sign in with corp-ldap-test). Don’t use the main local or system username-password form as a substitute for the external LDAP path.
Complete the LDAP sign-in with the test user’s credentials and follow the redirect back to F5 Insight.
Verify the expected user identity and role-appropriate application access—not just arrival at a page. For a viewer test user, confirm permitted read access and verify that operations outside the role’s scope are unavailable, without attempting a real destructive change.
If directory authentication succeeds but F5 Insight denies access, check:
- The active provider
- Exact saved group mappings
- Group lookup results
- Identity-service configuration
Unresolved roles are denied by default. Don’t change authorization policy just to make a test pass.
Update a provider¶
- Choose Edit from the provider row’s actions menu, then select Configuration.
- Change only the values you intend to update. Leave Bind Password empty to keep the stored password. Enter a new password only to replace it.
- To test while editing, re-enter the service-account password. The Test Connection panel on the Configuration tab is hidden until you enter a bind password.
- Select Save changes. Verify the provider’s details and status afterward. Control availability separately through Activate or Deactivate.
- Run the user-authentication test again and complete a fresh browser sign-in where appropriate. Testing unsaved edits does not mean those edits have been saved.
Deactivate or delete a provider¶
Deactivate¶
- Choose Deactivate from an active provider’s actions menu.
- Verify the status changes to Inactive and that the external sign-in option no longer appears on a refreshed sign-in page.
- The saved configuration stays available for later activation. Local sign-in is managed separately.
Delete¶
- First, remove the provider’s references under . Use Delete Mapping for the selected provider and role.
- Confirm the recovery path, then choose Delete in the provider row.
- Review the Remove IdP dialog. Select Continue only when removal is intended.
- Verify the provider row is gone. If deletion is blocked by mappings or a service error, resolve the reported condition. Don’t assume the provider was removed.
Custom CA certificates for LDAP/LDAPS authentication¶
F5 Insight 1.2.2 lets you use custom CA certificates to secure LDAP authentication. As an administrator, you can:
- Upload a CA certificate or CA bundle to the Trust Store.
- Select the uploaded CA when you configure an LDAP identity provider.
- Validate the LDAP server certificate for LDAPS connections using the selected CA.
Warning
LDAP + StartTLS with a custom CA certificate is not functional for runtime sign-in in this release. Use LDAPS with a custom CA instead. If your environment requires StartTLS, apply the workaround script before you configure the provider. See Known limitations.
Supported LDAP connection types¶
F5 Insight supports three LDAP connection types. The level of custom CA support differs for each type.
| Connection type | Custom CA support | Notes |
|---|---|---|
| Plain LDAP | Not required | No TLS is used. A CA certificate is not needed. |
| LDAPS | Supported | Recommended for custom CA deployments. Uses port 636 by default. |
| LDAP + StartTLS | Partial | Connection testing works with a custom CA, but sign-in has known limitations. See Known limitations. |
Certificate requirements¶
Before you upload a CA certificate, make sure it meets the following requirements.
File format
- The certificate must be PEM encoded.
- Accepted file extensions are
.pem,.crt, or.cer(as long as the content is PEM format). - If your file is in DER or binary
.cerformat, convert it to PEM before you upload it.
Certificate chain
- Upload the full CA bundle (root and intermediate certificates), not only the LDAP server’s leaf certificate.
- If the LDAP server doesn’t send its intermediate certificate chain, include the full chain in your uploaded bundle.
Server certificate matching
- The Subject Alternative Name (SAN) in the LDAP server certificate must match the hostname in your LDAP URL.
- If you use an IP address in the LDAP URL, the server certificate must include that IP address as an IP SAN.
- The LDAP server must present the configured server certificate along with a matching private key.
Note
F5 Insight doesn’t support LDAP mutual TLS or client certificate authentication.
Verify the LDAP server certificate¶
Before you configure F5 Insight, verify that your LDAP server’s TLS certificate is valid. Run the following OpenSSL command to test the connection:
openssl s_client \
-connect ldap.example.com:636 \
-servername ldap.example.com \
-CAfile ca-bundle.pem \
-verify_hostname ldap.example.com
Look for this result in the output:
Verify return code: 0 (ok)
If the verification fails, review the custom CA troubleshooting section before you continue.
Configure a custom CA for LDAPS¶
Use these steps for LDAPS connections. This is the recommended approach for custom CA deployments.
Go to .
Select an existing LDAP provider and select Edit, or select Create to add a new one.
In the Server URL field, enter the LDAPS URL for your LDAP server. Use the explicit port in the URL. For example:
ldaps://ldap.example.com:636
Make sure the StartTLS checkbox is cleared.
In the CA certificate section, select Upload and select your CA certificate file or full CA bundle.
From the Certificate Authority dropdown, select the CA you uploaded.
Select Test Connection to verify that F5 Insight can reach and validate the LDAP server.
Select Save.
Activate the provider and test an LDAP sign-in to confirm the setup works.
Configure a custom CA for LDAP + StartTLS¶
Use these steps only if your environment requires StartTLS. For reliable custom CA support, LDAPS is recommended. See Known limitations.
Go to .
Select an existing LDAP provider and select Edit, or select Create to add a new one.
In the Server URL field, enter the LDAP URL for your server.
Important
Don’t include a port number in the URL. The system defaults to port 389 automatically. Adding a port causes malformed Server Name Indication (SNI) requests during the TLS upgrade.
For example:
ldap://ldap.example.com
Select the StartTLS checkbox.
In the CA certificate section, select Upload and select your CA certificate file or full CA bundle.
From the Certificate Authority dropdown, select the CA you uploaded.
Select Test Connection to verify that F5 Insight can reach and validate the LDAP server.
Select Save.
Activate the provider and test an LDAP sign-in to confirm the setup works.
Workaround: apply a custom CA for StartTLS¶
workaround.sh
#!/bin/bash
set -e
# --- Configuration Variables ---
NAMESPACE="f5-insight"
DEPLOYMENT="f5-insight-zitadel"
CONFIGMAP_NAME="ldap-custom-ca-bundle"
CERT_MOUNT_PATH="/etc/ssl/ldap-custom-certs"
CERT_ENV_VAL="/etc/ssl/certs:/etc/ssl/ldap-custom-certs"
# --- Input Validation ---
if [ -z "$1" ]; then
echo "Error: Missing certificate file."
echo "Usage: ./apply-zitadel-starttls-workaround.sh <path-to-custom-ca.crt>"
exit 1
fi
CA_FILE="$1"
if [ ! -f "$CA_FILE" ]; then
echo "Error: File '$CA_FILE' not found."
exit 1
fi
echo "============================================================"
echo "Applying ZITADEL StartTLS Custom CA Workaround"
echo "Target Namespace: $NAMESPACE"
echo "Certificate File: $CA_FILE"
echo "============================================================"
# Step 1: Create or Update the ConfigMap
echo "[1/4] Injecting certificate into ConfigMap: $CONFIGMAP_NAME..."
kubectl create configmap $CONFIGMAP_NAME \
-n $NAMESPACE \
--from-file=ldap-custom-ca.crt="$CA_FILE" \
--dry-run=client -o yaml | kubectl apply -f -
# Step 2: Patch the ZITADEL Deployment
echo "[2/4] Patching ZITADEL deployment to mount the certificate..."
NOW=$(date +%s)
kubectl patch deployment $DEPLOYMENT \
-n $NAMESPACE \
--type strategic \
-p "{
\"spec\": {
\"template\": {
\"metadata\": {
\"annotations\": {
\"f5insight.io/ldap-ca-workaround-restarted-at\": \"$NOW\"
}
},
\"spec\": {
\"containers\": [
{
\"name\": \"zitadel\",
\"env\": [
{
\"name\": \"SSL_CERT_DIR\",
\"value\": \"$CERT_ENV_VAL\"
}
],
\"volumeMounts\": [
{
\"name\": \"$CONFIGMAP_NAME\",
\"mountPath\": \"$CERT_MOUNT_PATH\",
\"readOnly\": true
}
]
}
],
\"volumes\": [
{
\"name\": \"$CONFIGMAP_NAME\",
\"configMap\": {
\"name\": \"$CONFIGMAP_NAME\"
}
}
]
}
}
}
}"
# Step 3: Wait for the rollout to complete
echo "[3/4] Waiting for ZITADEL pods to restart..."
kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout=180s
echo "[4/4] Done! The workaround has been successfully applied."
echo "============================================================"
echo "Next Steps:"
echo "In the F5 Insight UI, configure your LDAP Provider:"
echo " - Server: ldap://<YOUR_LDAP_HOSTNAME> (Do NOT use custom ports)"
echo " - StartTLS: Checked"
echo " - CA: Select the same Custom CA uploaded to the Trust Store"
echo "============================================================"
Note
Verify that the namespace and deployment names in the script match your environment before you run it.
Apply the workaround¶
Important
Complete this workaround after you upload the CA certificate and save the LDAP provider configuration in the F5 Insight UI.
Connect to the F5 Insight virtual machine (VM) using SSH.
Create the workaround script:
nano workaround.shPaste the script content into the editor, then save and close the file.
Make the script executable:
chmod +x workaround.sh
Copy the CA certificate from your LDAP server to the F5 Insight VM. Use
scpto transfer the file. For example:scp <username>@<ldap-server-ip>:<path-to-certificate>/custom-ca.crt ./custom-ca.crt
Alternatively, create a new file on the VM and paste the certificate content directly.
Run the workaround script with the path to your CA certificate:
sudo ./workaround.sh ./custom-ca.crt
Test an LDAP sign-in to confirm that the custom CA is now used for StartTLS connections.
Known limitations for custom CA¶
- Updating a CA on an existing LDAP provider: When you update the CA certificate on an existing LDAP provider, the new CA might not take effect for sign-in. The system can save the updated certificate in the provider configuration, but sign-in requests might continue to use the previous CA. If a CA update doesn’t take effect after you save the provider, delete the existing LDAP provider and create a new one with the updated CA certificate.
- LDAP + StartTLS with custom CA: Connection testing can use the selected custom CA, but sign-in has known limitations with the current identity management component. For reliable custom CA support, use LDAPS instead of LDAP + StartTLS. If your environment requires StartTLS, apply the workaround script.
OpenLDAP configuration notes and sample LDIF expectations¶
The following values represent the expected LDAP entry patterns used by OpenLDAP deployments similar to the sample data used for F5 Insight validation.
Expected user object classes and attributes¶
User entries are expected under a people container such as ou=People,dc=ldap,dc=example,dc=com with object classes:
personorganizationalPersoninetOrgPerson
Common user attributes expected by provider mapping:
uid: sign-in identifier (for example,adminuser)mail: email addresscn: display namegivenName: first namesn: last nameuserPassword: LDAP bind password hash
Expected group object classes and attributes¶
Group entries are expected under a groups container such as ou=Groups,dc=ldap,dc=example,dc=com.
Dual-compatible group entries can include both:
groupOfUniqueNameswithuniqueMemberDN valuesposixGroupwithgidNumberandmemberUidvalues
This supports both DN-based and POSIX username-based membership lookup.
Sample LDIF entry shapes¶
dn: uid=adminuser,ou=People,dc=ldap,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
uid: adminuser
mail: adminuser@ldap.example.com
cn: Addy Ministrator
givenName: Addy
sn: Ministrator
userPassword: {SSHA}<hash>
dn: cn=admin,ou=Groups,dc=ldap,dc=example,dc=com
objectClass: groupOfUniqueNames
objectClass: posixGroup
cn: admin
gidNumber: 10002
uniqueMember: uid=adminuser,ou=People,dc=ldap,dc=example,dc=com
memberUid: adminuser
Associated OpenLDAP search commands¶
Use these commands to validate expected directory content and group mapping behavior.
# Base user lookup by uid
ldapsearch -x -H ldap://localhost \
-b ou=People,dc=ldap,dc=example,dc=com \
-D "cn=admin,dc=ldap,dc=example,dc=com" -w <password> \
"(uid=adminuser)" dn uid mail cn givenName sn
# Inspect one group and verify dual object classes and membership attributes
ldapsearch -x -H ldap://localhost \
-b ou=Groups,dc=ldap,dc=example,dc=com \
-D "cn=admin,dc=ldap,dc=example,dc=com" -w <password> \
"(cn=admin)" dn objectClass gidNumber uniqueMember memberUid
# POSIX-style group membership query
ldapsearch -x -H ldap://localhost \
-b ou=Groups,dc=ldap,dc=example,dc=com \
-D "cn=admin,dc=ldap,dc=example,dc=com" -w <password> \
"(memberUid=adminuser)" dn cn
# Dual-mode membership query (DN-based OR POSIX-style)
ldapsearch -x -H ldap://localhost \
-b ou=Groups,dc=ldap,dc=example,dc=com \
-D "cn=admin,dc=ldap,dc=example,dc=com" -w <password> \
"(|(uniqueMember=uid=adminuser,ou=People,dc=ldap,dc=example,dc=com)(memberUid=adminuser))" dn cn
Recommended LDAP provider mapping values¶
- User search base:
ou=People,dc=ldap,dc=example,dc=com - User object class:
inetOrgPerson - Username attribute:
uid - Email attribute:
mail - Display name attribute:
cn - First name attribute:
givenName - Last name attribute:
sn
Troubleshoot custom CA certificate issues¶
| Error | Cause | Solution |
|---|---|---|
x509: certificate signed by unknown authority |
The selected CA doesn’t include the certificate that signed your LDAP server’s certificate. | Upload the correct CA certificate or full CA bundle to the Trust Store. Make sure the bundle includes the root and any intermediate CAs in the trust chain. |
hostname mismatch |
The hostname in the LDAP URL doesn’t match any SAN entry in the LDAP server certificate. | Update the LDAP URL to use the hostname that appears in the server certificate’s SAN field. If neither hostname is correct, reissue the LDAP server certificate with the correct SAN. |
Server presents a default container certificate (for example, CN=openldap or docker-light-baseimage) |
The LDAP server is still using a default container certificate instead of your issued certificate. | Install the issued server certificate and its matching private key on the LDAP server. Restart the LDAP service after you replace the certificate. |
EOF during LDAPS validation |
The LDAP server is closing the TLS connection before the handshake completes. This can happen when the server or an upstream device (such as F5 BIG-IP) requires client certificate authentication. | Check the LDAP server configuration and any TLS profiles on intermediate devices. Make sure client certificate authentication is not required, because F5 Insight doesn’t support mutual TLS for LDAP connections. |
| StartTLS connection refused or SNI errors | The provider URL contains a port number (for example, ldap://ldap.example.com:389). Adding a port to a StartTLS URL causes malformed SNI requests during the TLS upgrade. |
Remove the port number from the provider URL. Use only the hostname—for example, ldap://ldap.example.com. The system defaults to port 389 automatically. |
General LDAP troubleshooting¶
| Symptom | What to check |
|---|---|
| Cannot reach LDAP, connection refused, or timeout | Hostname, scheme, port, DNS, firewall, and reachability from F5 Insight services. Both tests contact the first server URL only. |
| Certificate or StartTLS error | Correct CA trust-store selection, certificate chain and expiry, hostname match, and mutually exclusive LDAPS vs. StartTLS settings. See also Troubleshoot custom CA certificate issues. |
| Service-account bind failed | Bind account identity, password, lock or expiry status, and directory policy. Re-enter the password after you open an existing provider. |
| Found no users or user search failed | Base DN, login attribute names, required object classes, and read permissions. Keep assertions out of User filters. |
| Attribute mapping validation failed | Exact attribute spelling and populated values in directory users. Map the display name to an attribute that is actually populated. Don’t assume schema examples are populated in your directory. |
| User not found or ambiguous lookup | Test username matches the chosen login attribute. Check Base DN. Use one unambiguous login attribute. |
| Authenticated, but no groups or group lookup skipped | Expected memberships and service-account access. If the directory doesn’t use memberOf attributes, group discovery may not find all memberships. Contact your directory administrator to confirm the group membership model. |
| Groups exist, but No match | Check which LDAP provider is active, whether that provider’s mappings were saved, and exact group spelling. |
| Preview mapping and browser authorization disagree | Exact capitalization of mapped group names, AD sAMAccountName vs. group CN, sign-in group resolution, selected provider, identity provisioning and linking, and callback or external URL configuration. The preview is not the complete authorization flow. |
| Test Connection button absent while editing | Enter Bind Password on the Configuration tab. Stored passwords are not read back. |
| Create, Save, or Test Connection disabled | Check required fields, TLS CA selection, field errors, pending requests, and account permissions. A disabled button doesn’t mean the LDAP server failed. |
| Provider name already exists or second-provider activation conflict | Use a unique name. For activation, confirm the currently active LDAP provider and deactivate it only after you review the impact. |
| LDAP button missing or redirect/sign-in failure | Confirm the provider is active, refresh the sign-in page, verify identity services are ready, and check the canonical external fully qualified domain name (FQDN), DNS, TLS, and callback configuration. Wait for approved external URL updates to complete. |
Acceptance checklist¶
| Check | Expected outcome |
|---|---|
| Create | New UI row. LDAP provider saved as Inactive with the correct configuration. |
| Connection test | Connection, bind, and user search succeed. At least one user is found. Mapped attributes are valid. Review group discovery separately. |
| User authentication test | User lookup and password bind pass. The returned user is the intended account. Expected groups are present. The group step is explicitly reviewed. |
| Role mapping | The intended provider is active. Exact group names map to the expected least-privilege role. Don’t rely only on a Permit preview. |
| Activate | Status shows Active. The sign-in page offers Sign in with <provider name>. Another LDAP provider is not silently deactivated. |
| Browser sign-in | A fresh external sign-in succeeds as the intended user with expected authorization. |
| Update | Saved changes survive reopening. A blank bind password keeps the saved secret. Required configuration stays intact. |
| Deactivate / reactivate | Status changes and sign-in choices reflect availability. Configuration remains saved. Don’t assume existing sessions are immediately revoked. |
| Delete (approved test provider only) | Provider row is removed. References are removed first. No directory users are deleted. |
Optional negative tests in an approved lab¶
Don’t run these automatically against production. Coordinate directory lockout limits and use a disposable provider and test user.
| Scenario | Expected observation |
|---|---|
| Wrong service-account password | Bind failure, not a connection or authentication pass |
| Unknown username or ambiguous matching users | User lookup fails. Subsequent steps don’t establish successful authentication. |
| Wrong test-user password | Password bind fails. User, group, and mapping details are not returned. No application session is established. |
| Missing or wrong CA, or mismatched TLS hostname | TLS verification fails. Repair trust or hostname. Don’t bypass verification. |
| No LDAP provider active | Directory authentication may succeed, but discovered groups show No match. No LDAP sign-in option is offered. |
| No mapping or wrong group capitalization | Confirm sign-in authorization independently. The preview may permit a case-insensitive match that actual role lookup doesn’t match. |
| Activate a second LDAP provider | Activation conflict. Explicitly resolve the existing active provider before retrying. |
| Delete a referenced provider | Deletion is blocked with mapping-usage details. The provider remains until references are removed. |

