Code: Select all
# Agent DB authentication
$Self->{'AuthModule1'} = 'Kernel::System::Auth::DB';
# Agent LDAP authentication
$Self->{'AuthModule2'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host2'} = 'server.domain.com';
$Self->{'AuthModule::LDAP::BaseDN2'} = 'OU=OTRS_Groups,dc=domain,dc=com';
$Self->{'AuthModule::LDAP::UID2'} = 'sAMAccountName';
# Check if the user is allowed to auth based on AD group membership
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=OTRS_Agents, OU=OTRS_Groups, dc=domain, dc=com';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
# The following is valid but would only be necessary if the
# anonymous user does NOT have permission to read from the LDAP tree
$Self->{'AuthModule::LDAP::SearchUserDN2'} = 'adreader@domain.com';
$Self->{'AuthModule::LDAP::SearchUserPw2'} = 'pw';
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
# agent data sync against ldap
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'server.domain.com';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain,dc=com';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'adreader@domain.com';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'pw';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent
# login)
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
'users',
];
# Customer DB authentication
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::DB';
$Self->{'Customer::AuthModule::DB::Table1'} = 'customer_user';
$Self->{'Customer::AuthModule::DB::CustomerKey1'} = 'login';
$Self->{'Customer::AuthModule::DB::CustomerPassword1'} = 'pw';
# Customer DB Backend
$Self->{CustomerUser1} = {
Name => 'OTRS DB',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
Table => 'customer_user',
},
CustomerKey => 'login',
CustomerID => 'customer_id',
CustomerValid => 'valid_id',
CustomerUserListFields => ['first_name', 'last_name', 'email'],
CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => ['title', 'first_name', 'last_name'],
CustomerUserEmailUniqCheck => 1,
Map => [
[ 'UserTitle', 'Title', 'title', 1, 0 ,'var', '', 0 ],
[ 'UserFirstname', 'Fristname', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ],
[ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
[ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ],
[ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidId', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
Selections => {
UserTitle => {
'Mr.' => 'Mr.',
'Mrs.' => 'Mrs.',
},
},
};
#-------------------------------------------------------------------------------------------#
# Customer Authentication #
#-------------------------------------------------------------------------------------------#
$Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host2'} = 'server.domain.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN2'} = 'ou=Managed Units,dc=domain,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID2'} = 'sAMAccountName';
#$Self->{'Customer::AuthModule::LDAP::GroupDN2'} = 'CN=otrscustomer,CN=Users,DC=Company,DC=tld';
# only Member of this group are allowed to login, erase the commentsymbol(#) to enable filtering
$Self->{'Customer::AuthModule::LDAP::SearchUserDN2'} = 'adreader@domain.com';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw2'} = 'pw';
#-------------------------------------------------------------------------------------------#
# Customerdata #
#-------------------------------------------------------------------------------------------#
$Self->{CustomerUser2} = {
Name => 'ActiveDirectory',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'server.domain.com',
BaseDN => 'OU=Managed Units,DC=domain,DC=com',
SSCOPE => 'sub',
UserDN => 'adreader@domain.com',
UserPw => 'pw',
AlwaysFilter => '(&)',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'domain',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
['UserFirstname', 'Firstname', 'givenname', '1', '1', 'var'],
['UserLastname', 'Lastname', 'sn', '1', '1', 'var'],
['UserLogin', 'Login', 'sAMAccountName', '1', '1', 'var'],
['UserEmail', 'Email', 'mail', '1', '1', 'var'],
['UserCustomerID', 'CustomerID', 'mail', '0', '1', 'var'],
],
};
#-------------------------------------------------------------------------------------------#
# Company1 End #
#-------------------------------------------------------------------------------------------#