Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.79 KB | None | 0 0
  1. # --
  2. # Modified version of the work: Copyright (C) 2006-2017 c.a.p.e. IT GmbH, http://www.cape-it.de
  3. # based on the original work of:
  4. # Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
  5. # --
  6. # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  7. # the enclosed file COPYING for license information (AGPL). If you
  8. # did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
  9. # --
  10.  
  11. package Kernel::Config;
  12.  
  13. use strict;
  14. use warnings;
  15. use utf8;
  16.  
  17. sub Load {
  18. my $Self = shift;
  19.  
  20. # ---------------------------------------------------- #
  21. # database settings #
  22. # ---------------------------------------------------- #
  23.  
  24. # The database host
  25. $Self->{DatabaseHost} = 'localhost';
  26.  
  27. # The database name
  28. $Self->{Database} = 'kix17';
  29.  
  30. # The database user
  31. $Self->{DatabaseUser} = 'kix';
  32.  
  33. # The password of database user. You also can use bin/kix.Console.pm
  34. # for crypted passwords
  35. $Self->{DatabasePw} = 'xxxxxxxxxxxxxx';
  36.  
  37. # The database DSN
  38. $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
  39.  
  40. # ---------------------------------------------------- #
  41. # insert your own config settings "here" #
  42. # config settings taken from Kernel/Config/Defaults.pm #
  43. # ---------------------------------------------------- #
  44. $Self->{CheckMXRecord} = 0;
  45. $Self->{SecureMode} = 1;
  46. $Self->{FQDN} = 'ucs-7758.domain.intranet';
  47.  
  48. # ---------------------------------------------------- #
  49.  
  50. # ---------------------------------------------------- #
  51. # data inserted by installer #
  52. # ---------------------------------------------------- #
  53. # $DIBI$
  54. # $$KIX4UCS-start$$
  55.  
  56. $Self->{'KIX4UCS::Configured'} = 1;
  57. $Self->{'ProductName'} = 'KIX';
  58. $Self->{'CustomerHeadline'} = 'KIX';
  59. $Self->{'NotificationSenderName'} = 'KIX Notification';
  60. $Self->{'Organization'} = 'US';
  61. $Self->{'FQDN'} = 'ucs-7758.domain.intranet';
  62. $Self->{'AdminEmail'} = '[email protected]';
  63. $Self->{'LDAPBaseDN'} = 'dc=domain,dc=intranet';
  64. $Self->{'DomainMaster'} = 'ucs-8023.domain.intranet';
  65. $Self->{'LDAPAgentGroupDN'} = 'cn=kix-agents,cn=groups,dc=domain,dc=intranet';
  66. $Self->{'LDAPAdminGroupDN'} = 'cn=kix-admins,cn=groups,dc=domain,dc=intranet';
  67. $Self->{'LDAPCustomerGroupDN'} = 'cn=kix-customers,cn=groups,dc=domain,dc=intranet';
  68. $Self->{'LDAPBindUserDN'} = 'uid=kixldapusr,cn=users,dc=domain,dc=intranet';
  69. $Self->{'LDAPBindUserPw'} = 'xxxxxxxxxxxxxxx';
  70.  
  71. $Self->{'SendmailModule'} = 'Kernel::System::Email::SMTP';
  72. $Self->{'SendmailModule::Host'} = 'ucs-8023.domain.intranet';
  73.  
  74. # ---------------------------------------------------- #
  75. # LDAP auth for agents
  76. # ---------------------------------------------------- #
  77. $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
  78. $Self->{'AuthModule::LDAP::Host'} = $Self->{'DomainMaster'};
  79. $Self->{'AuthModule::LDAP::BaseDN'} = 'cn=users,' . $Self->{'LDAPBaseDN'};
  80. $Self->{'AuthModule::LDAP::UID'} = 'uid';
  81. $Self->{'AuthModule::LDAP::GroupDN'} = $Self->{'LDAPAgentGroupDN'};
  82. $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
  83. $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
  84. $Self->{'AuthModule::LDAP::Die'} = 0;
  85. $Self->{'AuthModule::LDAP::SearchUserDN'} = $Self->{'LDAPBindUserDN'};
  86. $Self->{'AuthModule::LDAP::SearchUserPw'} = $Self->{'LDAPBindUserPw'};
  87. $Self->{'AuthModule::LDAP::Params'} = {
  88. port => 7389,
  89. timeout => 120,
  90. async => 0,
  91. version => 3,
  92. };
  93.  
  94. # ---------------------------------------------------- #
  95. # LDAP auth for admins
  96. # ---------------------------------------------------- #
  97. $Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP';
  98. $Self->{'AuthModule::LDAP::Host1'} = $Self->{'DomainMaster'};
  99. $Self->{'AuthModule::LDAP::BaseDN1'} = 'cn=users,' . $Self->{'LDAPBaseDN'};
  100. $Self->{'AuthModule::LDAP::UID1'} = 'uid';
  101. $Self->{'AuthModule::LDAP::GroupDN1'} = $Self->{'LDAPAdminGroupDN'};
  102. $Self->{'AuthModule::LDAP::AccessAttr1'} = 'memberUid';
  103. $Self->{'AuthModule::LDAP::UserAttr1'} = 'UID';
  104. $Self->{'AuthModule::LDAP::Die1'} = 0;
  105. $Self->{'AuthModule::LDAP::SearchUserDN1'} = $Self->{'LDAPBindUserDN'};
  106. $Self->{'AuthModule::LDAP::SearchUserPw1'} = $Self->{'LDAPBindUserPw'};
  107. $Self->{'AuthModule::LDAP::Params1'} = {
  108. port => 7389,
  109. timeout => 120,
  110. async => 0,
  111. version => 3,
  112. };
  113.  
  114. # ---------------------------------------------------- #
  115. # LDAP sync for agents
  116. # ---------------------------------------------------- #
  117. $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
  118. $Self->{'AuthSyncModule::LDAP::Host'} = $Self->{'DomainMaster'};
  119. $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'cn=users,' . $Self->{'LDAPBaseDN'};
  120. $Self->{'AuthSyncModule::LDAP::UID'} = 'uid';
  121. $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'UID';
  122. $Self->{'AuthSyncModule::LDAP::Die'} = 0;
  123. $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = $Self->{'LDAPBindUserDN'};
  124. $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = $Self->{'LDAPBindUserPw'};
  125. $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
  126. UserFirstname => 'givenName',
  127. UserLastname => 'sn',
  128. UserEmail => 'mailPrimaryAddress',
  129. UserLogin => 'uid',
  130. };
  131. $Self->{'AuthSyncModule::LDAP::Params'} = {
  132. port => 7389,
  133. timeout => 120,
  134. async => 0,
  135. version => 3,
  136. };
  137.  
  138. $Self->{'AuthSyncModule::LDAP::UserSyncGroupsDefinition'} = {
  139. # ldap group
  140. $Self->{'LDAPAdminGroupDN'} => {
  141. # otrs group
  142. 'admin' => {
  143. # permission
  144. rw => 1,
  145. ro => 1,
  146. },
  147. 'faq_admin' => {
  148. rw => 1,
  149. ro => 1,
  150. },
  151. 'itsm-service' => {
  152. rw => 1,
  153. ro => 1,
  154. },
  155. 'stats' => {
  156. rw => 1,
  157. ro => 1,
  158. },
  159. },
  160. $Self->{'LDAPAgentGroupDN'} => {
  161. 'users' => {
  162. rw => 1,
  163. ro => 1,
  164. },
  165. 'faq' => {
  166. rw => 1,
  167. ro => 1,
  168. },
  169. 'itsm-configitem' => {
  170. rw => 1,
  171. ro => 1,
  172. },
  173. 'itsm-service' => {
  174. rw => 0,
  175. ro => 1,
  176. },
  177. 'stats' => {
  178. rw => 0,
  179. ro => 1,
  180. },
  181. }
  182. };
  183.  
  184. # ---------------------------------------------------- #
  185. # DB fallback for agents
  186. # ---------------------------------------------------- #
  187. $Self->{'AuthModule10'} = 'Kernel::System::Auth::DB';
  188.  
  189. # ---------------------------------------------------- #
  190. # LDAP auth for customers
  191. # ---------------------------------------------------- #
  192. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  193. $Self->{'Customer::AuthModule::LDAP::Host'} = $Self->{'DomainMaster'};
  194. $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'cn=users,' . $Self->{'LDAPBaseDN'};
  195. $Self->{'Customer::AuthModule::LDAP::UID'} = 'uid';
  196. $Self->{'Customer::AuthModule::LDAP::GroupDN'} = $Self->{'LDAPCustomerGroupDN'};
  197. $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';
  198. $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';
  199. $Self->{'Customer::AuthModule::LDAP::Die'} = 0;
  200. $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = $Self->{'LDAPBindUserDN'};
  201. $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = $Self->{'LDAPBindUserPw'};
  202. $Self->{'Customer::AuthModule::LDAP::Params'} = {
  203. port => 7389,
  204. timeout => 120,
  205. async => 0,
  206. version => 3,
  207. };
  208.  
  209. # ---------------------------------------------------- #
  210. # LDAP source for customer users
  211. # ---------------------------------------------------- #
  212. $Self->{CustomerUser} = {
  213. Name => 'UCS Customers',
  214. Module => 'Kernel::System::CustomerUser::LDAP',
  215. Params => {
  216.  
  217. # ldap host
  218. Host => $Self->{'DomainMaster'},
  219.  
  220. # ldap base dn
  221. BaseDN => 'cn=users,' . $Self->{'LDAPBaseDN'},
  222.  
  223. # ldap group dn
  224. GroupDN => $Self->{'LDAPCustomerGroupDN'},
  225.  
  226. # search scope (one|sub)
  227. SSCOPE => 'sub',
  228.  
  229. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP
  230. port => 7389,
  231. version => 3,
  232. CustomerUserSearchListLimit => 2000,
  233. SourceCharset => 'utf-8',
  234. DestCharset => 'utf-8',
  235. AlwaysFilter => '(mailPrimaryAddress=*)',
  236.  
  237. # search binding
  238. UserDN => $Self->{'LDAPBindUserDN'},
  239. UserPw => $Self->{'LDAPBindUserPw'},
  240. },
  241.  
  242. # customer uniq id
  243. CustomerKey => 'uid',
  244.  
  245. # customer #
  246. CustomerID => 'o',
  247. CustomerUserListFields => [ 'cn', 'mailPrimaryAddress' ],
  248. CustomerUserSearchFields => [ 'uid', 'cn', 'mailPrimaryAddress', 'o', 'l' ],
  249. CustomerUserPostMasterSearchFields => ['mailPrimaryAddress'],
  250. CustomerUserNameFields => [ 'givenname', 'sn' ],
  251. CustomerUserSearchPrefix => '*',
  252. CustomerUserSearchSuffix => '*',
  253. LinkedPersonKey => 'UserLogin',
  254. CacheTTL => 0,
  255. ReadOnly => 1,
  256. Map => [
  257.  
  258. # note: Login, Email and CustomerID needed!
  259. # var, frontend, storage, shown, required, storage-type, link, udm parameter
  260. [ 'UserCompany', 'Company', 'o', 1, 0, 'var', '', '', 'organisation' ],
  261. [ 'UserOrganisation', 'Organisation', 'ou', 1, 0, 'var', '', '', '' ],
  262. [ 'UserSalutation', 'Title', 'title', 1, 0, 'var', '', '', 'title' ],
  263. [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', '', 'firstname' ],
  264. [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', '', 'lastname' ],
  265. [ 'UserFunction', 'Function', 'businessCategory', 1, 0, 'var', '', '', '' ],
  266. [ 'UserLogin', 'Login', 'uid', 1, 1, 'var', '', '', 'username' ],
  267. [ 'UserPassword', 'Password', 'password', 1, 1, 'var', '', '', 'password' ],
  268. [ 'UserEmail', 'Email', 'mailPrimaryAddress', 1, 1, 'var', '', '', 'mailPrimaryAddress' ],
  269. [ 'UserCustomerID', 'CustomerID', 'o', 0, 1, 'var', '', '', 'organisation' ],
  270. [ 'UserPhone', 'Phone', 'telephoneNumber', 1, 0, 'var', '', '', 'phone' ],
  271. [ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', '', '' ],
  272. [ 'UserFax', 'Fax', 'facsimileTelephoneNumber', 1, 0, 'var', '', '', '' ],
  273. [ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', '', 'street' ],
  274. [ 'UserRoom', 'Room', 'roomNumber', 1, 0, 'var', '', '', 'roomNumber' ],
  275. [ 'UserZIP', 'ZIP', 'postalCode', 1, 0, 'var', '', '', 'postcode' ],
  276. [ 'UserCity', 'City', 'l', 1, 0, 'var', '', '', 'city' ],
  277. [ 'UserCounty', 'County', 'st', 1, 0, 'var', '', '', '' ],
  278. [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', '', 'description' ],
  279. ],
  280.  
  281. };
  282.  
  283. # $$KIX4UCS-end$$
  284.  
  285. # ---------------------------------------------------- #
  286. # ---------------------------------------------------- #
  287. # #
  288. # end of your own config options!!! #
  289. # #
  290. # ---------------------------------------------------- #
  291. # ---------------------------------------------------- #
  292. }
  293.  
  294. # ---------------------------------------------------- #
  295. # needed system stuff (don't edit this) #
  296. # ---------------------------------------------------- #
  297. use strict;
  298. use warnings;
  299.  
  300. use vars qw(@ISA);
  301.  
  302. use Kernel::Config::Defaults;
  303. push (@ISA, 'Kernel::Config::Defaults');
  304.  
  305. # -----------------------------------------------------#
  306.  
  307. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement