我根据客户页面上用户的电子邮件地址配置了otrs开源版本进行身份验证。我们有什么方法可以根据用户名进行身份验证吗?
答案 0 :(得分:0)
是的,这是可能的。
OTRS(DB,LDAP,BASIC)的身份验证后端是什么
如果是DB,请在Kernel / Config.pm
中添加这些行$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
$Self->{'Customer::AuthModule::DB::Table'} = 'customer_user';
$Self->{'Customer::AuthModule::DB::CustomerKey'} = 'login';
它会将所需的customerKey设置为表customer_user
的登录列更新#1
那么,在这种情况下编辑您的Config.pm文件并添加以下行:
注意变量LDAP :: UID,CustomerKey和UserCustomerID的映射。检查您的AD并确保每个客户在sAMAccountName
中具有独特价值 $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{CustomerUser} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'host.example.com',
BaseDN => 'OU=BaseOU,DC=example,DC=com',
SSCOPE => 'sub',
UserDN =>'otrs_ldap',
UserPw => 'PASSWORD',
},
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ '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', 'sAMAccountName', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};