Table of Contents
Configure Indefero to LDAP authentication
LDAP Authentication
A how-to configure Indefero to accept LDAP authentication.
List of LDAP configuration keys
The following table list of configuration key for LDAP authentification.
Thoses keys must be inserted in the common configuration file at "src/IDF/conf/idf.conf".
Configuration key | Default value |
---|---|
auth_ldap_dn | ou=users,dc=example,dc=com |
auth_ldap_user | null |
auth_ldap_password | null |
auth_ldap_version | 3 |
auth_ldap_user_key | uid |
auth_ldap_password_key | null |
auth_ldap_surname_key | sn |
auth_ldap_givenname_key | cn |
auth_ldap_email_key | |
auth_ldap_host | localhost |
Example of configuration
Into configuration file (src/IDF/conf/idf.php):
# Authentication
$cfg['auth_backends'] = array('Pluf_Auth_ModelBackend', 'Pluf_Auth_LdapBackend'); # Local and LDAP
$cfg['auth_backends'] = array('Pluf_Auth_LdapBackend'); # LDAP only
$cfg['auth_ldap_dn'] = 'dc=COMPANY,dc=COM';
$cfg['auth_ldap_user'] = 'cn=testuser,cn=Users,dc=COMPANY,dc=COM';
$cfg['auth_ldap_password'] = '123test456';
$cfg['auth_ldap_host'] = 'sv01.company.com'; # for ldaps this should be 'ldaps://sv01.company.com'
# Active Directory
$cfg['auth_ldap_user_key'] = 'sAMAccountName';
# Default values
$cfg['auth_ldap_version'] = 3;
$cfg['auth_ldap_user_key'] = 'uid';
$cfg['auth_ldap_surname_key'] = 'sn';
$cfg['auth_ldap_givenname_key'] = 'cn';
$cfg['auth_ldap_email_key'] = 'mail';