Advertisement
capitannemo

Config.pm

Nov 4th, 2012
2,511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. # --
  2. # Kernel/Config.pm - Config file for OTRS kernel
  3. # Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
  4. # --
  5. # $Id: Config.pm.dist,v 1.25 2011/09/16 10:58:28 mg Exp $
  6. # --
  7. # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  8. # the enclosed file COPYING for license information (AGPL). If you
  9. # did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
  10. # --
  11. # Note:
  12. #
  13. # -->> OTRS does have a lot of config settings. For more settings
  14. # (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
  15. # LDAP, PostMaster, Session, Preferences, ...) see
  16. # Kernel/Config/Defaults.pm and copy your wanted lines into "this"
  17. # config file. This file will not be changed on update!
  18. #
  19. # --
  20.  
  21. package Kernel::Config;
  22.  
  23. use utf8;
  24.  
  25. sub Load {
  26. my $Self = shift;
  27. # ---------------------------------------------------- #
  28. # ---------------------------------------------------- #
  29. # #
  30. # Start of your own config options!!! #
  31. # #
  32. # ---------------------------------------------------- #
  33. # ---------------------------------------------------- #
  34.  
  35. # ---------------------------------------------------- #
  36. # database settings #
  37. # ---------------------------------------------------- #
  38. # DatabaseHost
  39. # (The database host.)
  40. $Self->{'DatabaseHost'} = 'localhost';
  41. # Database
  42. # (The database name.)
  43. $Self->{'Database'} = 'otrs';
  44. # DatabaseUser
  45. # (The database user.)
  46. $Self->{'DatabaseUser'} = 'otrs';
  47. # DatabasePw
  48. # (The password of database user. You also can use bin/otrs.CryptPassword.pl
  49. # for crypted passwords.)
  50. $Self->{'DatabasePw'} = 'hot';
  51. # DatabaseDSN
  52. # (The database DSN for MySQL ==> more: "man DBD::mysql")
  53. $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
  54.  
  55. # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
  56. # if you want to use a local socket connection
  57. # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
  58. # if you want to use a tcpip connection
  59. # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
  60. # if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
  61. # $Self->{DatabasePostgresqlBefore82} = 1;
  62.  
  63. # ---------------------------------------------------- #
  64. # fs root directory
  65. # ---------------------------------------------------- #
  66. $Self->{Home} = 'C:/OTRS/OTRS';
  67.  
  68. # ---------------------------------------------------- #
  69. # insert your own config settings "here" #
  70. # config settings taken from Kernel/Config/Defaults.pm #
  71. # ---------------------------------------------------- #
  72. # $Self->{SessionUseCookie} = 0;
  73. # $Self->{CheckMXRecord} = 0;
  74.  
  75. # ---------------------------------------------------- #
  76.  
  77. # ---------------------------------------------------- #
  78. # data inserted by installer #
  79. # ---------------------------------------------------- #
  80.  
  81. $Self->{LogModule} = 'Kernel::System::Log::File';
  82. $Self->{LogModule::LogFile} = 'C:/OTRS/OTRS/var/log/otrs.log';
  83. # $DIBI$
  84. $Self->{'DefaultCharset'} = 'utf-8';
  85. #+ аутентификация + авторизация LDAP
  86. # Enable LDAP Authentication Sync for Agent #
  87. $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
  88. $Self->{'AuthSyncModule::LDAP::Host'} = 'w2003.smallbusiness.local';# заменить значение !
  89. $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'OU=Agents OTRS,dc=smallbusiness,dc=local';# заменить значение !
  90. $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
  91. $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
  92. $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=otrs,CN=Users,dc=smallbusiness,dc=local';# заменить значение !
  93. $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'password';# заменить значение !
  94. # Enable Agent Mapping from LDAP to DB #
  95. $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
  96. UserFirstname => 'givenName',
  97. UserLastname => 'sn',
  98. UserEmail => 'mail',
  99. };
  100.  
  101. $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
  102. 'users',
  103. ];
  104. $Self->{'AuthModule::LDAP::Params'} = {
  105. port => 389,
  106. timeout => 120,
  107. async => 0,
  108. version => 3,
  109. };
  110. # Authenticate customer users against an LDAP backend #
  111. $Self->{CustomerUser} = {
  112. Name => 'Active Directory',
  113. Module => 'Kernel::System::CustomerUser::LDAP',
  114. Params => {
  115. Host => 'w2003.smallbusiness.local', # заменить значение !
  116. BaseDN => 'OU=Customers OTRS,dc=smallbusiness,dc=local', # заменить значение !
  117. SSCOPE => 'sub',
  118. UserDN => 'CN=otrs,CN=Users,dc=smallbusiness,dc=local', # заменить значение !
  119. UserPw => 'password', # заменить значение !
  120. AlwaysFilter => '(&(objectcategory=person)(objectclass=user)(mail=*)(!(description=built-In))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',
  121. SourceCharset => 'utf-8',
  122. DestCharset => 'utf-8',
  123. },
  124.  
  125. ReadOnly => 1,
  126. CustomerKey => 'sAMAccountName',
  127. CustomerID => 'mail',
  128. CustomerUserListFields => ['givenname', 'sn', 'mail'],
  129. CustomerUserSearchFields => ['displayName','sAMAccountName','givenName', 'sn', 'mail','description'],
  130. CustomerUserSearchPrefix => '',
  131. CustomerUserSearchSuffix => '*',
  132. CustomerUserPostMasterSearchFields => ['displayName','sAMAccountName','givenName','sn','mail','description'],
  133. CustomerUserNameFields => ['givenname', 'sn'],
  134. CustomerUserExcludePrimaryCustomerID => 0,
  135. CacheTTL => 120,
  136. Map => [
  137. [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
  138. [ 'UserFirstname', 'Firstname', 'givenName', 1, 1, 'var' ],
  139. [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
  140. [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
  141. [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
  142. [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
  143. [ 'UserPhone', 'Phone', 'telephoneNumber', 1, 0, 'var' ],
  144. [ 'UserAddress', 'Address', 'postalAddress', 1, 0, 'var' ],
  145. [ 'UserStreet', 'Street', 'streetAddress', 1, 0, 'var' ],
  146. [ 'UserCity', 'City', 'l', 1, 0, 'var' ],
  147. [ 'UserZip', 'ZIP', 'postalCode', 1, 0, 'var' ],
  148. [ 'UserCountry', 'Country', 'co', 1, 0, 'var' ],
  149. [ 'UserComment', 'Comment', 'wWWHomePage', 1, 0, 'var' ],
  150. ],
  151. };
  152.  
  153. #- аутентификация + авторизация LDAP
  154. #+ single sign on
  155. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
  156. $Self->{'Customer::AuthModule::LDAP::Charset'} = 'utf-8';
  157. $Self->{'Customer::AuthModule::LDAP::SourceCharset'} = 'utf-8';
  158. $Self->{'Customer::AuthModule::LDAP::DestCharset'} = 'utf-8';
  159. $Self->{'Customer::AuthModule::HTTPBasicAuth::Replace'} = 'smallbusiness\\'; # заменить значение ! при опции SSPIOmitDomain On вся строка не требуется
  160. $Self->{CustomerPanelLoginURL} = 'http://yandex.ru'; # заменить значение !
  161. $Self->{CustomerPanelLogoutURL} = 'http://google.com'; # заменить значение !
  162.  
  163. $Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';
  164. $Self->{'AuthModule::LDAP::Charset'} = 'utf-8';
  165. $Self->{'AuthModule::LDAP::SourceCharset'} = 'utf-8';
  166. $Self->{'AuthModule::LDAP::DestCharset'} = 'utf-8';
  167. $Self->{'AuthModule::HTTPBasicAuth::Replace'} = 'smallbusiness\\'; # заменить значение ! при опции SSPIOmitDomain On вся строка не требуется
  168. $Self->{AgentPanelLoginURL} = 'http://yandex.ru'; # заменить значение !
  169. $Self->{AgentPanelLogoutURL} = 'http://google.com'; # заменить значение !
  170. #- single sign on
  171.  
  172. # ---------------------------------------------------- #
  173. # ---------------------------------------------------- #
  174. # #
  175. # End of your own config options!!! #
  176. # #
  177. # ---------------------------------------------------- #
  178. # ---------------------------------------------------- #
  179. }
  180.  
  181. # ---------------------------------------------------- #
  182. # needed system stuff (don't edit this) #
  183. # ---------------------------------------------------- #
  184. use strict;
  185. use warnings;
  186.  
  187. use vars qw(@ISA $VERSION);
  188. $VERSION = qw($Revision: 1.25 $)[1];
  189.  
  190. use Kernel::Config::Defaults;
  191. push (@ISA, 'Kernel::Config::Defaults');
  192.  
  193. # -----------------------------------------------------#
  194.  
  195. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement