# This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{AuthModule} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'dc.test.local';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=test,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
# Definimos grupo, en el que estarán los agentes de OTRS, si no definimos grupos, todos los usuarios del Active Directory
# podran hacer login como agentes
# En el caso del ejemplo, necesitarás crear el grupo otrs_agents y añadir a él los usuarios que quieres que hagan login como agentes.
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=otrs_agents,OU=grupos,DC=test,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
# Definimos el usuario (que crearemos previamente en AD) con el que realizaremos las consultas
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=otrs,OU=users,DC=test,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'password_otrs_user';
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
# --------------------------------------------------- #
# authentication sync settings #
# (enable agent data sync. after succsessful #
# authentication) #
# --------------------------------------------------- #
# Definimos la sincronización con BBDD de AD. Cuando se loggeen correctamente, se sincronizarán datos a BBDD.
# (take care that Net::LDAP is installed!)
$Self->{AuthSyncModule} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'dc.test.local';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=test,dc=local';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
# Definimos el usuario (que crearemos previamente en AD) con el que realizaremos las consultas
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=otrs,OU=users,DC=test,DC=local';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'password_otrs_user';
# Mapeo de campos de sincronizacion
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};