I'm trying to implement two modules authentication for clients. I've tried to do as this documentation:
http://doc.otrs.org/3.2/en/html/externa ... nd-example
But no effect emerged for both. Authentication is still performed only by one or the LDAP or the DB and I would like to do the two.
I wonder if there is some configuration that must be done and that is not described in the documentation or if I have to edit the Kernel / Config / Defaults.pm too.
Note: I'm editing the Kernel / Config.pm:
Code: Select all
########### ----------------------------------------------------------------- DB CONFIGURATION --------------------------------------------------------- ####
$Self->{CustomerUser1} = {
Name => 'DB_local',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
Table => 'customer_user',
},
# customer unique id
CustomerKey => 'login',
# customer #
CustomerID => 'customer_id',
CustomerValid => 'valid_id',
CustomerUserListFields => ['first_name', 'last_name', 'email'],
CustomerUserSearchFields => ['login', 'email'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => ['first_name', 'last_name'],
CustomerUserEmailUniqCheck => 1,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-127
#[ 'UserCPF', 'CPF', 'title', 1, 1, 'var', '', 0 ],
[ 'UserFirstname', 'Primerio Nome', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Ultimo Nome', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Usuario(CPF)', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Senha', 'pw', 0, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 0, 1, 'var', '', 0 ],
[ 'UserOAB', 'OAB Num.', 'comments', 0, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
[ 'UserCity', 'Cidade', 'city', 0, 1, 'var', '', 0 ],
[ 'UserState', 'Estado', 'street', 0, 1, 'var', '', 0 ],
[ 'UserPhone', 'Telefone', 'phone', 0, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'email', 1, 1,
# 'var','$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
#[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
# default selections
Selections => {
UserCustomerID => {
'Normal' => 'Normal',
},
UserState => {
'Default' => '-',
'AC' => 'Acre',
'AL' => 'Alagoas',
'AM' => 'Amazonas',
'AP' => 'Amapá',
'BA' => 'Bahia',
'CE' => 'Ceará',
'DF' => 'Distrito Federal',
'ES' => 'Espírito Santo',
'GO' => 'Goiás',
'MA' => 'Maranhão',
'MT' => 'Mato Grosso',
'MS' => 'Mato Grosso do Sul',
'MG' => 'Minas Gerais',
'PA' => 'Pará',
'PB' => 'Paraíba',
'PR' => 'Paraná',
'PE' => 'Pernambuco',
'PI' => 'Piauí',
'RJ' => 'Rio de Janeiro',
'RN' => 'Rio Grande do Norte',
'RO' => 'Rondônia',
'RS' => 'Rio Grande do Sul',
'RR' => 'Roraima',
'SC' => 'Santa Catarina',
'SE' => 'Sergipe',
'SP' => 'São Paulo',
'TO' => 'Tocantins',
},
},
};
########### ----------------------------------------------------------------- LDAP CONFIGURATION --------------------------------------------------------- ####
# customer unique id
# 2. Customer user backend: LDAP
# (customer ldap backend and settings)
$Self->{CustomerUser2} = {
Name => 'LDAP SEDE',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'host',
# ldap base dn
BaseDN => 'base',
# search scope (one|sub)
SSCOPE => 'sub',
# # The following is valid but would only be necessary if the
# # anonymous user does NOT have permission to read from the LDAP tree
UserDN => 'user',
UserPw => 'password',
# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
AlwaysFilter => '(&(tipoAtendimento=*)(mail=*)(!(situacao=inativo)))',
# if both your frontend and your LDAP are unicode, use this:
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
# if your frontend is e. g. iso-8859-1 and the character set of your
# ldap server is utf-8, use these options:
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
scheme => 'ldap',
timeout => 120,
async => 0,
version => 3,
},
},
# customer unique id
#CustomerKey => 'uid',
CustomerKey => 'uid',
# customer #
#CustomerID => 'uid',
CustomerID => 'uid',
#CustomerUserListFields => ['uid', 'mail'],
CustomerUserListFields => ['trtCodFunc','displayName','uid','mail'],
#CustomerUserSearchFields => ['uid','cn','mail'], - Para Novell
CustomerUserSearchFields => ['trtCodFunc','displayName','mail','uid'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '',
CustomerUserSearchListLimit => 3000,
CustomerUserPostMasterSearchFields => ['mail','trtCodFunc'],
CustomerUserNameFields => ['displayName','cn','uid'],
# show not own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# admin can't change customer preferences
AdminSetPreferences => 0,
CacheTTL => 300,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
#[ 'UserCodFunc', 'Codigo', 'trtCodFunc', 1, 0, 'var', '', 0 ],
[ 'UserTitle', 'Codigo Funcionario', 'trtCodFunc', 1, 1, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'displayName', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', '', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'uid', 1, 1, 'var', 'http://otrs.trt10.jus.br/otrs/index.pl?Action=AdminCustomerUser;Subaction=Change;ID=$Data{"UserLogin"};Search=%2A;Nav=Agent', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'tipoAtendimento', 1, 1, 'var', '', 0 ],
[ 'UserComment', 'Codigo Unico', 'codigoUnico', 1, 0, 'var', '', 0 ],
[ 'UserLotacao', 'Lotacao', 'trtLotacao', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Telefone', 'telephoneNumber', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Localizacao', 'localizacao', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'Localidade', 'localidade', 1, 0, 'var', '', 0 ],
[ 'UserZip', 'Andar', 'andar', 1, 0, 'var', '', 0 ],
[ 'UserCountry', 'Sala', 'sala', 1, 0, 'var', '', 0 ],
[ 'UserCI', 'Computador (BDGC)', 'sambaSID', 1, 0, 'var', 'http://otrs.trt10.jus.br/otrs/index.pl?Action=AgentITSMConfigItemSearch;Subaction=Search;ClassID=32;SearchDialog=1;LastLogin=*$Data{"UserLogin"};PreviousVersionSearch=0;ResultForm=3', 0 ],
],
};