# -- # Copyright (C) 2001-2016 OTRS AG, http://otrs.com/ # -- # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (AGPL). If you # did not receive this file, see http://www.gnu.org/licenses/agpl.txt. # -- # Note: # # -->> Most OTRS configuration should be done via the OTRS web interface # and the SysConfig. Only for some configuration, such as database # credentials and customer data source changes, you should edit this # file. For changes do customer data sources you can copy the definitions # from Kernel/Config/Defaults.pm and paste them in this file. # Config.pm will not be overwritten when updating OTRS. # -- package Kernel::Config; use strict; use warnings; use utf8; sub Load { my $Self = shift; # ---------------------------------------------------- # # database settings # # ---------------------------------------------------- # # The database host $Self->{'DatabaseHost'} = '127.0.0.1'; # The database name $Self->{'Database'} = "otrs"; # The database user $Self->{'DatabaseUser'} = "otrs"; # The password of database user. You also can use bin/otrs.Console.pl Maint::Database::PasswordCrypt # for crypted passwords $Self->{'DatabasePw'} = 'n9c8drhDC9qhW3Rb'; # The database DSN for MySQL ==> more: "perldoc DBD::mysql" $Self->{'DatabaseDSN'} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost}"; # The database DSN for PostgreSQL ==> more: "perldoc DBD::Pg" # if you want to use a local socket connection # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};"; # if you want to use a TCP/IP connection # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};"; # The database DSN for Microsoft SQL Server - only supported if OTRS is # installed on Windows as well # $Self->{DatabaseDSN} = "DBI:ODBC:driver={SQL Server};Database=$Self->{Database};Server=$Self->{DatabaseHost},1433"; # The database DSN for Oracle ==> more: "perldoc DBD::oracle" # $Self->{DatabaseDSN} = "DBI:Oracle://$Self->{DatabaseHost}:1521/$Self->{Database}"; # # $ENV{ORACLE_HOME} = '/path/to/your/oracle'; # $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS'; # $ENV{NLS_LANG} = 'AMERICAN_AMERICA.AL32UTF8'; # ---------------------------------------------------- # # fs root directory # ---------------------------------------------------- # $Self->{Home} = '/opt/otrs'; # ---------------------------------------------------- # # insert your own config settings "here" # # config settings taken from Kernel/Config/Defaults.pm # # ---------------------------------------------------- # # $Self->{SessionUseCookie} = 0; # $Self->{CheckMXRecord} = 0; # ---------------------------------------------------- # # ---------------------------------------------------- # # data inserted by installer # # ---------------------------------------------------- # # $DIBI$ # # CustomerUser # (customer ldap backend and settings) $Self->{CustomerUser} = { Name => 'CONET Services LDAP Data Source', Module => 'Kernel::System::CustomerUser::LDAP', Params => { # ldap host Host => '10.101.0.101 10.101.0.102', # ldap base dn BaseDN => 'DC=conacc,DC=local', # 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 => 'CN=OTRS_LDAP,OU=AdminUser,OU=CON,OU=CONET,DC=conacc,DC=local', UserPw => 'Poo7aipi', # 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 => '', # if both your frontend and your LDAP are unicode, use this: SourceCharset => 'utf-8', DestCharset => 'utf-8', # if your frontend is unicode and the charset of your # ldap server is iso-8859-1, use these options. # SourceCharset => 'iso-8859-1', # DestCharset => 'utf-8', # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP) Params => { port => 389, timeout => 120, async => 0, version => 3, }, }, # customer unique id CustomerKey => 'sAMAccountName', # customer # CustomerID => 'mail', CustomerUserListFields => ['cn', 'mail'], CustomerUserSearchFields => ['sAMAccountName', 'givenName', 'sn', 'name', 'displayNane', 'mail'], CustomerUserSearchPrefix => '*', CustomerUserSearchSuffix => '*', CustomerUserSearchListLimit => 1000, CustomerUserPostMasterSearchFields => ['mail'], CustomerUserNameFields => ['givenName', 'sn'], # show not own tickets in customer panel, CompanyTickets CustomerUserExcludePrimaryCustomerID => 0, # add an ldap filter for valid users (expert setting) # CustomerUserValidFilter => '(!(description=locked))', # administrator can't change customer preferences AdminSetPreferences => 0, # # cache time to live in sec. - cache any database queries # CacheTTL => 0, Map => [ # note: Login, Email and CustomerID are mandatory! # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ], [ 'UserFirstname', 'Firstname', 'givenName', 1, 1, 'var', '', 0 ], [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ], [ 'UserLogin', 'Username', 'sAMAccountName', 1, 1, 'var', '', 0 ], [ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ], [ 'UserCustomerID', 'CustomerID', 'sAMAccountName', 0, 1, 'var', '', 0 ], #[ 'UserCustomerID', 'CustomerID', 'extensionAttribute1', 0, 1, 'var', '', 0 ], [ 'UserCustomerIDs', 'CustomerIDs', 'extensionAttribute1', 1, 0, 'var', '', 0 ], [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ], [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ], [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ], ], }; # # LDAP agent auth. backend. # (Make sure Net::LDAP is installed!) $Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP'; $Self->{'AuthModule::LDAP::Host1'} = '10.101.0.101 10.101.0.102'; $Self->{'AuthModule::LDAP::BaseDN1'} = 'OU=CON,OU=CONET,DC=conacc,DC=local'; $Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName'; # Check if the user is allowed to auth in a posixGroup # (e. g. user needs to be in a group xyz to use otrs) #$Self->{'AuthModule::LDAP::GroupDN1'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com'; #$Self->{'AuthModule::LDAP::AccessAttr1'} = 'memberUid'; # for ldap posixGroups objectclass (just uid) # $Self->{'AuthModule::LDAP::UserAttr1'} = 'UID'; # for non ldap posixGroups objectclass (with full user dn) # $Self->{'AuthModule::LDAP::UserAttr1'} = 'DN'; # The following is valid but would only be necessary if the # anonymous user do NOT have permission to read from the LDAP tree $Self->{'AuthModule::LDAP::SearchUserDN1'} = 'CN=OTRS_LDAP,OU=AdminUser,OU=CON,OU=CONET,DC=conacc,DC=local'; $Self->{'AuthModule::LDAP::SearchUserPw1'} = 'Poo7aipi'; # in case you want to add always one filter to each ldap query, use # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)' #$Self->{'AuthModule::LDAP::AlwaysFilter1'} = ''; # in case you want to add a suffix to each login name, then # you can use this option. e. g. user just want to use user but # in your ldap directory exists user@domain. # $Self->{'AuthModule::LDAP::UserSuffix1'} = '@domain.com'; # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP) $Self->{'AuthModule::LDAP::Params1'} = { port => 389, timeout => 120, async => 0, version => 3, }; # # OTRS-Database agent auth. backend. $Self->{'AuthModule2'} = 'Kernel::System::Auth::DB'; # # LDAP customer auth. backend. # (make sure Net::LDAP is installed!) $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP'; $Self->{'Customer::AuthModule::LDAP::Host'} = '10.101.0.101 10.101.0.102'; $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'OU=CUSTOMER,DC=conacc,DC=local'; $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName'; # Check if the user is allowed to auth in a posixGroup # (e. g. user needs to be in a group xyz to use otrs) #$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com'; #$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid'; # for ldap posixGroups objectclass (just uid) #$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID'; # for non ldap posixGroups objectclass (full user dn) #$Self->{'Customer::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->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=OTRS_LDAP,OU=AdminUser,OU=CON,OU=CONET,DC=conacc,DC=local'; $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'Poo7aipi'; # in case you want to add always one filter to each ldap query, use # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)' #$Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = ''; # in case you want to add a suffix to each customer login name, then # you can use this option. e. g. user just want to use user but # in your ldap directory exists user@domain. #$Self->{'Customer::AuthModule::LDAP::UserSuffix'} = '@domain.com'; # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP) $Self->{'Customer::AuthModule::LDAP::Params'} = { port => 389, timeout => 120, async => 0, version => 3, }; # # ---------------------------------------------------- # # ---------------------------------------------------- # # # # end of your own config options!!! # # # # ---------------------------------------------------- # # ---------------------------------------------------- # } # ---------------------------------------------------- # # needed system stuff (don't edit this) # # ---------------------------------------------------- # use base qw(Kernel::Config::Defaults); # -----------------------------------------------------# 1;