Overview
ITSM-NG supports authentication and data synchronization with LDAP directories, including Microsoft Active Directory, OpenLDAP, and other LDAP-compliant services.Prerequisites
PHP LDAP Extension
The PHP LDAP extension must be installed:Adding LDAP Server
Choose preconfiguration
Select a template for quick setup:
- Active Directory: Microsoft AD with typical settings
- Default values: Standard LDAP configuration
LDAP Server Configuration
Basic Connection Settings
If RootDN and password are not provided, ITSM-NG will attempt anonymous binding.
Active Directory Preconfiguration
When selecting Active Directory preset, these values are configured:/inc/authldap.class.php:157-189 for AD preconfiguration details.
Connection Filter
The connection filter determines which LDAP objects are considered valid users:Active Directory Example
OpenLDAP Example
Advanced Configuration
Connection Options
Paged results
Enable for large directories:
- Use paged results: Enable pagination
- Page size: 100-100,000 results per page
- Maximum results: Total limit (0 = unlimited)
Field Mapping
Map LDAP attributes to ITSM-NG user fields:Field names are automatically converted to lowercase by ITSM-NG.
Synchronization Field
The sync field uniquely identifies users:- Active Directory: Use
objectguid(binary GUID) - OpenLDAP: Use
entryuuid(UUID) - Other: Any unique, immutable attribute
/inc/authldap.class.php:220-237 for sync field validation.
Group Configuration
Group Search Types
In users
Search for group membership in user objects:
- User attribute contains group DNs or names
- Example:
memberOfin Active Directory
In groups
Search for members in group objects:
- Group attribute contains user DNs
- Example:
memberattribute in groups
Group Field Configuration
Active Directory Groups
User Import and Synchronization
Manual Import
Search for users
Enter search criteria:
- Login: Search by username
- Email: Search by email address
- Advanced filter: Custom LDAP filter
Set import options
Configure:
- Entity: Target entity
- Recursive: Include child entities
- Import type: User or contact
Automatic Synchronization
Enable automatic import and sync:Configure in Setup > Authentication
- Automatically add users: Import on first login
- Add without accreditation: Create account without profile
- Action when deleted from LDAP:
- Preserve (0): Keep account unchanged
- Delete (1): Move to trashbin
- Withdraw rights (2): Remove dynamic authorizations
- Disable (3): Deactivate account
- Disable and withdraw (4): Combine both
/inc/authldap.class.php:64-88 for action constants.
Group Synchronization
Groups are synchronized automatically:- On user creation (if
_groupsis set in input) - On user update (if authentication type is LDAP)
- Dynamic groups are marked as
is_dynamic = 1 - Manual group memberships coexist with dynamic ones
- Groups not in LDAP are removed (if dynamic)
/inc/user.class.php:1199-1264 for group sync implementation.
LDAP Replication
Adding Replicas
For high availability, configure LDAP replicas:Add replica
Click Add a replicate:
- Name: Replica identifier
- Server: Replica hostname
- Port: Replica port
Entity Mapping
LDAP to Entity Mapping
Map LDAP organizational units to ITSM-NG entities:Testing LDAP Configuration
Connection Test
Basic test
Click Test button on the LDAP configuration form to verify:
- Server connectivity
- Authentication with RootDN
- BaseDN accessibility
User search test
Use the import interface to test:
- User search queries
- Attribute mapping
- Filter correctness
Troubleshooting
Cannot Connect to LDAP
Check:- Server hostname is correct and reachable
- Port is open (use
telnet server 389) - Firewall allows LDAP traffic
- RootDN and password are correct
- BaseDN exists in directory
Users Not Found
Verify:- Connection filter includes the users
- BaseDN encompasses user objects
- Login field matches LDAP attribute
- Attribute names are lowercase
Groups Not Synchronized
Confirm:- Group search type is correct
- Group field attribute exists on users/groups
- Group filter matches group objects
- “Use DN” setting matches attribute format
Slow LDAP Searches
Optimize:- Enable paged results
- Reduce page size
- Set maximum result limit
- Add indexes on LDAP server
- Use more specific filters
Security Best Practices
LDAP Security
- Use TLS: Encrypt LDAP traffic when possible
- Bind credentials: Use dedicated service account with minimal rights
- Read-only access: Bind account only needs read permission
- Filter users: Exclude service accounts and system users
- Monitor access: Log LDAP authentication attempts
- Regular audits: Review LDAP configuration periodically
- Test replicas: Ensure failover works correctly
Advanced Topics
Custom Attribute Expressions
For location field and others, use expressions:Picture Synchronization
Ifpicture_field is configured:
- User photo is synchronized from LDAP
- Stored as JPEG in
GLPI_PICTURE_DIR - Thumbnail generated automatically
- Updated when photo changes in LDAP
/inc/user.class.php:1274-1352 for picture sync implementation.