Skip to content

Commit 267c39f

Browse files
boojackclaude
andauthored
docs: enhance LDAP user filter configuration guide (#937)
* docs: enhance LDAP user filter configuration guide - Improve User Filter field description with more detail - Add comprehensive User Filter Configuration section - Include provider-specific filter patterns table (Okta, JumpCloud, AD, OpenLDAP) - Document best practices and common issues - Add troubleshooting tips with LDAP browser tool recommendation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * docs: restructure Common Issues into 4-column table Address review feedback to improve clarity: - Convert bullet list to table format - Add Bad Example column with incorrect filter patterns - Add Correction column showing proper fixes - Maintain all four issue types with concrete examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent 5346013 commit 267c39f

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

mintlify/administration/sso/ldap.mdx

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Identity provider information:
1919
- **Bind DN**: the Distinguished Name (DN) of the user to bind as a service account to perform search requests (e.g. `uid=system,ou=Users,dc=jumpcloud,dc=com`)
2020
- **Bind Password**: the password of the user to bind as a service account
2121
- **Base DN**: the base Distinguished Name (DN) to search for users (e.g. `ou=users,dc=jumpcloud,dc=com`)
22-
- **User Filter**: the filter to search for users (e.g. `(uid=%s)`, where `%s` will be subsituted by the username)
22+
- **User Filter**: the LDAP search filter to match users during authentication. The `%s` placeholder will be replaced with the username entered during login (e.g. `(uid=%s)` searches for a user with matching `uid` attribute)
2323
- **Security protocol**: the security protocol to be used for establishing connections with the LDAP server
2424

2525
User information field mapping:
@@ -28,6 +28,58 @@ User information field mapping:
2828
- **Display name**: the attribute to be used as the Bytebase user display name (e.g. `displayName`, optional)
2929
- **Phone**: the attribute to be used as the Bytebase user phone number (e.g. `phone`, optional)
3030

31+
## User Filter Configuration
32+
33+
The **User Filter** field is critical for LDAP authentication. It defines how Bytebase searches for users in your LDAP directory.
34+
35+
### Understanding the User Filter
36+
37+
- The `%s` placeholder is **required** and will be replaced with the username entered during login
38+
- Filters must use valid LDAP filter syntax with proper parentheses
39+
- The filter should uniquely identify users to prevent authentication issues
40+
41+
### Common User Filter Patterns
42+
43+
Different LDAP providers use different object classes and attributes:
44+
45+
| Provider | Recommended User Filter | Description |
46+
| ---------------- | ------------------------------------------ | --------------------------------------------------------------- |
47+
| Okta | `(&(objectClass=inetOrgPerson)(uid=%s))` | Matches users with `inetOrgPerson` class and matching `uid` |
48+
| JumpCloud | `(&(objectClass=posixAccount)(uid=%s))` | Matches users with `posixAccount` class and matching `uid` |
49+
| Active Directory | `(&(objectClass=user)(sAMAccountName=%s))` | Matches users with matching `sAMAccountName` (Windows username) |
50+
| OpenLDAP | `(&(objectClass=inetOrgPerson)(uid=%s))` | Standard OpenLDAP user filter |
51+
52+
### Best Practices
53+
54+
1. **Use AND conditions**: Combine object class with the user identifier for more precise matching:
55+
56+
- Good: `(&(objectClass=inetOrgPerson)(uid=%s))`
57+
- Avoid: `(uid=%s)` (too broad, may match non-user entries)
58+
59+
2. **Match your directory schema**: Verify the object class used in your LDAP directory:
60+
61+
- Common classes: `inetOrgPerson`, `posixAccount`, `user`, `person`
62+
- Use LDAP browser tools to inspect your directory structure
63+
64+
3. **Test the filter**: Use the **Test Connection** button to verify your filter works before saving
65+
66+
### Common Issues
67+
68+
| Issue Type | Description | Bad Example | Correction |
69+
| -------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------ | ---------------------------------------- |
70+
| **Invalid filter syntax** | Parentheses must be balanced and properly nested following LDAP filter syntax | `&(objectClass=user)(uid=%s)` | `(&(objectClass=user)(uid=%s))` |
71+
| **Missing %s placeholder** | The `%s` placeholder must be present for username substitution | `(uid=username)` | `(uid=%s)` |
72+
| **Wrong attribute name** | Username attribute must match your LDAP schema (common: `uid`, `sAMAccountName`, `cn`, `mail`) | `(&(objectClass=user)(username=%s))` | `(&(objectClass=user)(uid=%s))` |
73+
| **Wrong object class** | Object class must match the user entries in your LDAP directory | `(&(objectClass=person)(uid=%s))` | `(&(objectClass=inetOrgPerson)(uid=%s))` |
74+
75+
<Tip>
76+
77+
If you're unsure about your LDAP schema, use an LDAP browser tool (like Apache Directory Studio or ldapsearch) to inspect a user entry and identify the correct object class and username attribute.
78+
79+
</Tip>
80+
81+
## Examples
82+
3183
### JumpCloud
3284

3385
<Note>

0 commit comments

Comments
 (0)