Code: Select all
# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2014 xxx, 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.CryptPassword.pl
# for crypted passwords
$Self->{DatabasePw} = 'xxxx';
$Self->{SecureMode}=1;
$Self->{"Package::Timeout"}=120;
$Self->{'SystemID'}=42;
$Self->{'SessionName'}='OTRSAgentInterface';
### MARKER ###
# The database DSN for MySQL ==> more: "perldoc DBD::mysql"
$Self->{DatabaseDSN} = "DBI:Pg:dbname=$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};";
# if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
# $Self->{DatabasePostgresqlBefore82} = 1;
# 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"
# $ENV{ORACLE_HOME} = '/u01/app/oracle/product/10.2.0/client_1';
# $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS';
# $ENV{NLS_LANG} = "american_america.utf8";
# $Self->{DatabaseDSN} = "DBI:Oracle:sid=OTRS;host=$Self->{DatabaseHost};port=1522;";
# ---------------------------------------------------- #
# 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$
# ----------------------------------------------------- #
# Configuration for sync Customer with Active Directory #
# ----------------------------------------------------- #
# LDAP Parameters
$Self->{OTRSLDAPUser} = 'xxx';
$Self->{OTRSLDAPPassword} = 'xxx';
$Self->{OTRSLDAPServer} = 'xxx';
$Self->{OTRSLDAPBaseDN} = 'DC=unitedtractors,DC=com';
$Self->{OTRSLDAPBaseDNCustomer} = 'DC=unitedtractors,DC=com';
$Self->{OTRSLDAPBaseDNCustomerExternal} = 'OU=Mail Contact,DC=unitedtractors,DC=com';
$Self->{OTRSLDAPBaseDNCustomerLogin} = 'OU=HO Email Account,DC=unitedtractors,DC=com';
$Self->{OTRSLDAPBaseDNAgent} = 'OU=HO Email Account,DC=unitedtractors,DC=com';
$Self->{OTRSLDAPBaseDNAgentFilter} = 'CN=OTRS Agent,CN=Users,DC=unitedtractors,DC=com';
#Enable LDAP authentication for Customers / Users
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = $Self->{OTRSLDAPServer};
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = $Self->{OTRSLDAPBaseDNCustomer};
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
#The following is valid but would only be necessary if the
#anonymous user do NOT have permission to read from the LDAP tree
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = $Self->{OTRSLDAPUser};
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = $Self->{OTRSLDAPPassword};
#CustomerUser
#(customer user database backend and settings) // Internal users
$Self->{CustomerUser1} = {
Name => 'UT Internal',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => $Self->{OTRSLDAPServer},
BaseDN => $Self->{OTRSLDAPBaseDNCustomer},
SSCOPE => 'sub',
UserDN => $Self->{OTRSLDAPUser},
UserPw => $Self->{OTRSLDAPPassword},
},
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'division', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 0,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn', 'division'],
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', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
[ 'UserAddress', 'Address', 'department', 1, 0, 'var' ],
[ 'UserComment', 'Comment', 'division', 1, 0, 'var' ],
],
};
#(customer user database backend and settings) // External users
$Self->{CustomerUser2} = {
Name => 'UT External',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => $Self->{OTRSLDAPServer},
BaseDN => $Self->{OTRSLDAPBaseDNCustomerExternal},
SSCOPE => 'sub',
UserDN => $Self->{OTRSLDAPUser},
UserPw => $Self->{OTRSLDAPPassword},
},
# customer unique id
CustomerKey => 'mail',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'division', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 0,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn', 'division'],
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', 'mail', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
[ 'UserAddress', 'Address', 'department', 1, 0, 'var' ],
[ 'UserComment', 'Comment', 'division', 1, 0, 'var' ],
],
};
#Add the following lines when only users are allowed to login if they reside in the spicified security group
#Remove these lines if you want to provide login to all users specified in the User Base DN
#example: $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=BaseOU, dc=example, dc=com';
$Self->{'Customer::AuthModule::LDAP::GroupDN'} = $Self->{OTRSLDAPBaseDNCustomerLogin};
#$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
#$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN'
# ----------------------------------------------------- #
# Configuration for sync Agent with Active Directory #
# ----------------------------------------------------- #
#Enable LDAP authentication for Agents
$Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host1'} = $Self->{OTRSLDAPServer};
$Self->{'AuthModule::LDAP::BaseDN1'} = $Self->{OTRSLDAPBaseDNAgent};
$Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName';
#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'} = $Self->{OTRSLDAPUser};
$Self->{'AuthModule::LDAP::SearchUserPw1'} = $Self->{OTRSLDAPPassword};
#Add the following lines when only users are allowed to login if they reside in the specified security group
#Remove these lines if you want to provide login to all users specified in the User Base DN
#$Self->{'AuthModule::LDAP::GroupDN1'} = $Self->{OTRSLDAPBaseDNAgentFilter};
#$Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
#$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
# UserSyncLDAPMap
# (map if agent should create/synced from LDAP to DB after login)
$Self->{UserSyncLDAPMap1} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail'
};
# defines AuthSyncBackend (AuthSyncModule) for AuthModule
# if this key exists and is empty, there won't be a sync.
# example values: AuthSyncBackend, AuthSyncBackend2
$Self->{'AuthModule::UseSyncBackend1'} = 'AuthSyncBackend';
# agent data sync against ldap
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = $Self->{OTRSLDAPServer};
$Self->{'AuthSyncModule::LDAP::BaseDN'} = $Self->{OTRSLDAPBaseDNAgent};
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = $Self->{OTRSLDAPUser};
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = $Self->{OTRSLDAPPassword};
$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',
];
# UserSyncLDAPGroups
# (If "LDAP" was selected for AuthModule, you can specify
# initial user groups for first login.)
$Self->{UserSyncLDAPGroups} = [
'users',
];
# Attributes needed for group syncs
# (attribute name for group value key)
#$Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
# (attribute for type of group content UID/DN for full ldap name)
#$Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
# AuthSyncModule::LDAP::UserSyncGroupsDefinition
# (If "LDAP" was selected for AuthModule and you want to sync LDAP
# groups to otrs groups, define the following.)
#$Self->{'AuthSyncModule::LDAP::UserSyncGroupsDefinition'} = {
# # ldap group
# 'CN=OTRS Admin,CN=Users,DC=unitedtractors,DC=com' => {
# # otrs group
# 'admin' => {
# # permission
# rw => 1,
# ro => 1,
# },
# },
# 'CN=OTRS Agent,CN=Users,DC=unitedtractors,DC=com' => {
# 'users' => {
# rw => 1,
# ro => 1,
# },
# }
#};
# AuthSyncModule::LDAP::UserSyncRolesDefinition
# (If "LDAP" was selected for AuthModule and you want to sync LDAP
# groups to otrs roles, define the following.)
# $Self->{'AuthSyncModule::LDAP::UserSyncRolesDefinition'} = {
# # ldap group
# 'CN=OTRS Agent,CN=Users,DC=unitedtractors,DC=com' => {
# # otrs role
# 'OTRS Agent' => 1,
# },
# 'CN=OTRS Admin,CN=Users,DC=unitedtractors,DC=com' => {
# # otrs role
# 'OTRS Admin' => 1,
# }
# };
# UserTable
$Self->{DatabaseUserTable} = 'users';
$Self->{DatabaseUserTableUserID} = 'id';
$Self->{DatabaseUserTableUserPW} = 'pw';
$Self->{DatabaseUserTableUser} = 'login';
# Attributes needed for group syncs
# (attribute name for group value key)
$Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
# (attribute for type of group content UID/DN for full ldap name)
$Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
# ---------------------------------------------------------- #
# Configuration for sync Agent with Active PostMaster Filter #
# ---------------------------------------------------------- #
# Job Name: 00-All
# Set default priority
# $Self->{'PostMaster::PreFilterModule'}->{'00-All'} = {
# Module => 'Kernel::System::PostMaster::Filter::Match',
# Match => {
# # From => 'noreply@',
# },
# Set => {
# 'X-OTRS-Ignore' => 'yes',
# },
# };
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# end of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
}
# ---------------------------------------------------- #
# needed system stuff (don't edit this) #
# ---------------------------------------------------- #
use base qw(Kernel::Config::Defaults);
# -----------------------------------------------------#
1;