1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126
|
<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- $Id: external-backends.xml,v 1.11 2006/02/28 05:52:34 martin Exp $ -->
<chapter id="external-backends">
<title>Einbinden externer Back-ends</title>
<sect1 id='customer-data'>
<title>Kundenbenutzerdaten</title>
<para>
OTRS ist in der Lage, mit verschiedenen Kundendaten (insbesondere
Login, Email, Telefon) umzugehen. Diese Informationen knnen im
Agenten-Interface angezeigt und fr das Kunden-Interface verwendet
werden. Weiterhin werden die Daten fr die Authentifizierung der
Kunden am System bentigt.
</para>
<para>
Die benutzten/angezeigten Kundendaten sind frei konfigurierbar, es
gibt jedoch drei bentigte Optionen die unbedingt vorhanden sein mssen,
damit OTRS ordnungsgem funktioniert:
</para>
<para>
Benutzer-Login, Benutzer-Email und Benutzer-Kunden-ID
</para>
<para>
Wenn Sie die Kundendaten (z.B. Firma, Name, eMail, ...) in Ihrem
Agenten-Interface anzeigen mchten, benutzen Sie die folgenden
Konfigurations-Optionen und fgen Sie diese in die Datei
<filename>Kernel/Config.pm</filename> ein.
</para>
<para>
<programlisting>
# Ticket::Frontend::CustomerInfo*
# (show customer user info on Compose (Phone and Email), Zoom and
# Queue view)
$Self->{'Ticket::Frontend::CustomerInfoCompose'} = 1;
$Self->{'Ticket::Frontend::CustomerInfoZoom'} = 1;
$Self->{'Ticket::Frontend::CustomerInfoQueue'} = 0;
</programlisting>
</para>
</sect1>
<sect1 id="customer-user-backend">
<title>Kundenbenutzer Back-end</title>
<para>
Es existieren zwei Kundenbenutzer Back-ends, DB und LDAP. Falls Sie
bereits ein Kundenverzeichnis (z.B. SAP, ...) haben, ist es natrlich
mglich, dafr ein eigenes Back-end zu schreiben.
</para>
<sect2 id='customer-backend-db'>
<title>Datenbank (Standard)</title>
<example id='db-customer-backend'>
<title>Konfiguration eines DB Kunden Back-ends</title>
<para>
Dies ist ein Beispiel fr die Konfiguration eines Back-ends, welches die
Kundendaten in der normalen OTRS Datenbank verwaltet.
</para>
<para>
<programlisting>
# CustomerUser
# (customer user database backend and settings)
$Self->{CustomerUser} = {
Name => 'Datenbank Quelle',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
# if you want to use an external database, add the
# required settings
# DSN => 'DBI:odbc:yourdsn',
# DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
# User => '',
# Password => '',
Table => 'customer_user',
},
# customer uniq id
CustomerKey = 'login',
# customer #
CustomerID = 'customer_id',
CustomerValid = 'valid_id',
CustomerUserListFields => ['first_name', 'last_name', 'email'],
CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => ['salutation','first_name','last_name'],
CustomerUserEmailUniqCheck => 1,
# # show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # just a read only source
# ReadOnly => 1,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserSalutation', 'Salutation', 'salutation', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'pw', 0, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 0, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'email', 1, 1,
# 'var','$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
[ '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 => {
UserSalutation => {
'Mr.' => 'Mr.',
'Mrs.' => 'Mrs.',
},
},
};
</programlisting>
</para>
</example>
<para>
Falls Sie die Kundendaten anpassen mchten, ndern Sie in der Datenbank die
Tabellenspalten oder fgen Sie weitere hinzu (im folgenden Beispiel wird
ein Feld fr die Telefonnummer hinzugefgt)
</para>
<para>
<screen>
linux:~# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 116 to server version: 5.0.18-Debian_7-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use otrs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> ALTER TABLE customer_user ADD phone VARCHAR (250);
Query OK, 1 rows affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> quit
Bye
linux:~#
</screen>
</para>
<para>
Danach fgen Sie Ihre eigenen Spalten dem MAP Array in
der Datei <filename>Kernel/Config.pm</filename> hinzu:
</para>
<para>
<programlisting>
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[...]
[ 'UserPhone', 'Phone', 'phone', 0, 1, 'var', '', 0 ],
</programlisting>
</para>
<para>
Natrlich knnen Sie all diese Kundeninformationen dann auch
ber das Admin-Interface bzw. die Kundenverwaltung pflegen.
</para>
<sect3 id='multi-customer-ids-db'>
<title>Kunden mit multiblen IDs (Firmen Tickets)</title>
<para>
Es ist mglich, einem Kunden mehr als nur eine Kundennummer zuzuweisen.
Dies kann z.B. dann sinnvoll sein, wenn ein Kunde auf Tickets anderer
Kunden zugreifen muss, z.B. der Abteilungsleiter auf die Tickets der
Mitarbeiter seiner Abteilung. Hat ein Kunde Zugriff auf Tickets anderer
Kunden, verwendet man in OTRS das sog. Firmen Ticket Feature. Im
Kunden-Interface knnen diese Tickets ber den "Firmen Ticket" Link
eingesehen werden.
</para>
<para>
Um Firmen Tickets zu verwenden, muss die customer_user Tabelle in der OTRS
Datenbank um eine Spalte erweitert werden, in die spter die Kundennummern
eingetragen werden, auf die ein Kunde zustzlich zu den eigenen Tickets
Zugriff haben soll:
</para>
<para>
<screen>
linux:~# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 124 to server version: 5.0.18-Debian_7-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use otrs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> ALTER TABLE customer_user ADD customer_ids VARCHAR (250);
Query OK, 1 rows affected (0.02 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> quit
Bye
linux:~#
</screen>
</para>
<para>
Danach fgen Sie die neue Spalte dem MAP Array in
der Datei <filename>Kernel/Config.pm</filename> hinzu:
</para>
<para>
<programlisting>
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[...]
[ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
</programlisting>
</para>
<para>
Die Spalte fr die Multi-Kundennummern kann ab nun ber das
Admin-Interface bzw. ber die Kundenverwaltung gepflegt werden.
</para>
<para>
Um nun den Zugriff fr einen Kunden auf die Tickets anderer Kunden zu
ermglichen, tragen Sie in die neue Spalte die IDs der Kunden ein, auf
deren Tickets der Zugriff ermglicht werden soll. Die einzelnen IDs trennen
Sie durch ein Semikolon.
</para>
<example id='company-tickets-db'>
<title>Firmen Tickets mit einem DB Back-end</title>
<para>
Angenommen es sind die Kunden A, B und C im System angelegt. A soll mit
Hilfe von Firmen Tickets ber das Kunden-Interface Zugriff auf die Tickets
von B und C haben, B und C sollen jedoch jeweils nur ihre eigenen Tickets
einsehen und bearbeiten knnen.
</para>
<para>
Um dieses Setup zu realisieren, ndern Sie wie oben beschrieben die
customer_user Tabelle in der OTRS Datenbank und das Mapping in
<filename>Kernel/Config.pm</filename>. Anschlieend laden Sie ber die
Kundenverwaltung die Einstellungen des Kunden A und tragen bei
"Kundennummern" die Werte "B;C;" ein.
</para>
</example>
</sect3>
</sect2>
<sect2 id='customer-backend-ldap'>
<title>LDAP</title>
<para>
Falls Sie ein existierendes LDAP Verzeichnis mit Ihren Kundenbenutzern
haben, knnen Sie dieses auch mit OTRS nutzen.
</para>
<example id='ldap-customer-backend'>
<title>Konfiguration eines LDAP Kunden Back-ends</title>
<para>
Dies ist ein Beispiel fr ein Kunden Back-end, welches seine Daten aus
einem LDAP Verzeichnis bezieht.
</para>
<para>
<programlisting>
# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser} = {
Name => 'LDAP Datenquelle',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'bay.csuhayward.edu',
# ldap base dn
BaseDN => 'ou=seas,o=csuh',
# 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 => '',
UserPw => '',
# 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 your frontend is e. g. iso-8859-1 and the charset of your
# ldap server is utf-8, use this options (if not, ignore it)
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
# customer uniq id
CustomerKey => 'uid',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['uid', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
# show now own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',
# admin can't change customer preferences
AdminSetPreferences => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserSalutation', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 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 ],
],
};
</programlisting>
</para>
</example>
<para>
Falls Sie in Ihrem LDAP Verzeichnis weitere Informationen zu Ihren Kunden
gespeichert haben und mit OTRS darauf zugreifen mchten, erweitern Sie das
MAP Array in <filename>Kernel/Config.pm</filename> bzw. entfernen nicht
gewnschte Eintrge:
</para>
<para>
<programlisting>
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[...]
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
</programlisting>
</para>
<sect3 id='multi-customer-ids-ldap'>
<title>Kunden mit multiblen IDs (Firmen Tickets)</title>
<para>
Es ist mglich, einem Kunden mehr als nur eine Kundennummer zuzuweisen.
Dies kann z.B. dann sinnvoll sein, wenn ein Kunde auf Tickets anderer
Kunden zugreifen muss, z.B. der Abteilungsleiter auf die Tickets der
Mitarbeiter seiner Abteilung. Hat ein Kunde Zugriff auf Tickets anderer
Kunden, verwendet man in OTRS das sog. Firmen Ticket Feature. Im
Kunden-Interface knnen diese Tickets ber den "Firmen Ticket" Link
eingesehen werden.
</para>
<para>
Um Firmen Tickets zu verwenden, muss das LDAP Verzeichnis um ein Feld
erweitert werden, in das die Kundennummern eingetragen werden knnen, auf
die spter ein Kunde zustzlich zu den eigenen Tickets Zugriff haben soll,
z.B. um das Feld CustomerIDs.
</para>
<para>
Danach fgen Sie die neue Spalte dem MAP Array in
der Datei <filename>Kernel/Config.pm</filename> hinzu:
</para>
<para>
<programlisting>
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[...]
[ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
</programlisting>
</para>
<para>
Das Feld fr die Multi-Kundennummern muss direkt im LDAP Verzeichnis gepflegt
und kann von OTRS aus nicht direkt verwaltet werden.
</para>
<para>
Um nun den Zugriff fr einen Kunden auf die Tickets anderer Kunden zu
ermglichen, tragen Sie innerhalb des LDAP Verzeichnisses in das neue Feld
die IDs der Kunden ein, auf deren Tickets der Zugriff ermglicht werden soll.
Die einzelnen IDs trennen Sie durch ein Semikolon.
</para>
<example id='company-tickets-ldap'>
<title>Firmen Tickets mit einem LDAP Back-end</title>
<para>
Angenommen es sind die Kunden A, B und C im System angelegt. A soll mit
Hilfe von Firmen Tickets ber das Kunden-Interface Zugriff auf die Tickets
von B und C haben, B und C sollen jedoch jeweils nur ihre eigenen Tickets
einsehen und bearbeiten knnen.
</para>
<para>
Um dieses Setup zu realisieren, ndern Sie wie oben beschrieben das
LDAP Verzeichnis und das Mapping in <filename>Kernel/Config.pm</filename>.
Anschlieend tragen Sie im LDAP Verzeichnis innerhalb der Einstellungen fr
den Kunden A fr CustomerIDs die Werte "B;C;" ein.
</para>
</example>
</sect3>
</sect2>
<sect2 id='multible-customer-backends'>
<title>Verwenden mehrerer Kunden Back-ends</title>
<para>
Soll mehr als nur ein Back-end mit verschiedenen Kundendaten verwendet werden
(z.B. gleichzeitig DB und LDAP), so ist dies ebenfalls mit OTRS mglich.
In einem solchen Fall muss der CustomerUser Parameter fr jedes Back-end um
eine Nummer erweitert werden, z.B. "CustomerUser1", "CustomerUser2", usw.
</para>
<example id='multible-customer-backend-example'>
<title>Gleichzeitige Einbindung mehrerer verschiedener Kunden Back-ends</title>
<para>
In der folgenden KOnfiguration verwendet OTRS gleichzeitig ein DB und ein
LDAP Kunden Back-end.
</para>
<para>
<programlisting>
# 1. Customer user backend: DB
# (customer user database backend and settings)
$Self->{CustomerUser1} = {
Name => 'Datenbank Quelle',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
# if you want to use an external database, add the
# required settings
# DSN => 'DBI:odbc:yourdsn',
# DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
# User => '',
# Password => '',
Table => 'customer_user',
},
# customer uniq id
CustomerKey = 'login',
# customer #
CustomerID = 'customer_id',
CustomerValid = 'valid_id',
CustomerUserListFields => ['first_name', 'last_name', 'email'],
CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => ['salutation','first_name','last_name'],
CustomerUserEmailUniqCheck => 1,
# # show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # just a read only source
# ReadOnly => 1,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserSalutation', 'Salutation', 'salutation', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'pw', 0, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 0, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'email', 1, 1,
# 'var','$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
[ '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 => {
UserSalutation => {
'Mr.' => 'Mr.',
'Mrs.' => 'Mrs.',
},
},
};
# 2. Customer user backend: LDAP
# (customer user ldap backend and settings)
$Self->{CustomerUser2} = {
Name => 'LDAP Datenquelle',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'bay.csuhayward.edu',
# ldap base dn
BaseDN => 'ou=seas,o=csuh',
# 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 => '',
UserPw => '',
# 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 your frontend is e. g. iso-8859-1 and the charset of your
# ldap server is utf-8, use this options (if not, ignore it)
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
# customer uniq id
CustomerKey => 'uid',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['uid', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
# show now own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',
# admin can't change customer preferences
AdminSetPreferences => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserSalutation', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 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 ],
],
};
</programlisting>
</para>
</example>
<para>
Es knnen bis zu 10 Kunden Back-ends gleichzeitig eingebunden werden. ber
die Kundenverwaltung in OTRS ist der Zugriff auf die verschiedenen
Back-ends mglich.
</para>
</sect2>
</sect1>
<sect1 id="auth-backends">
<title>Back-ends fr die Authentifizierung von Agenten und Kunden</title>
<para>
OTRS bietet die Mglichkeit Agenten und Kunden ber verschiedene Back-ends
zu authentifizieren. Die verschiedenen Konfigurationsmglichkeiten werden
in den folgenden Abschnitten nher beschrieben.
</para>
<sect2 id='agent-auth-backends'>
<title>Authentifizierungs Back-ends fr Agenten</title>
<sect3 id='agent-auth-backend-db'>
<title>Datenbank (Standard)</title>
<para>
Das Back-end fr die Authentifizierung von Agenten, welches OTRS
standardmig verwendet, ist die OTRS-Datenbank. Die Agenten knnen
innerhalb des
<link linkend="adminarea">
Admin-Bereiches
</link>
in der
<link linkend="adminarea-user">
Benutzerverwaltung
</link>
angelegt und bearbeitet werden.
</para>
<example id='configuration-agent-auth-backend-db'>
<title>Agentenauthentifizierung gegen ein DB Back-end</title>
<para>
<programlisting>
$Self->{'AuthModule'} = 'Kernel::System::Auth::DB';
</programlisting>
</para>
</example>
</sect3>
<sect3 id='agent-auth-backend-ldap'>
<title>LDAP</title>
<para>
Falls ein LDAP Verzeichnis mit Ihren Agenten-Benutzerdaten verfgbar
ist, knnen Sie das LDAP Modul fr die Authentifizierung Ihrer Agenten
nutzen. Dieses Modul greift nur lesend auf die Daten im LDAP Verzeichnis
zu, d.h. die Daten knnen nicht mit OTRS bearbeitet
werden, es knnen also keine Agenten mit Hilfe der
<link linkend='adminarea-user'>
Benutzerverwaltung
</link>
von OTRS angelegt oder bearbeitet werden.
</para>
<example id='configuration-agent-auth-backend-ldap'>
<title>Agentenauthentifizierung gegen ein LDAP Back-end</title>
<para>
<programlisting>
# This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'ldap.example.com';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=example,dc=com';
$Self->{'AuthModule::LDAP::UID'} = 'uid';
# 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::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
# for ldap posixGroups objectclass (just uid)
# $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
# for non ldap posixGroups objectclass (with full user dn)
# $Self->{'AuthModule::LDAP::UserAttr'} = '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::SearchUserDN'} = '';
$Self->{'AuthModule::LDAP::SearchUserPw'} = '';
# 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::AlwaysFilter'} = '';
# 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::UserSuffix'} = '@domain.com';
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
</programlisting>
</para>
</example>
<para>
Mit den folgenden Konfigurationsparametern knnen die Benutzerdaten der
Agenten aus dem LDAP in die lokale OTRS Datenbank synchronisiert werden.
Dies reduziert die Zugriffe auf ihr LDAP Verzeichnis, entlastet den
Server mit den LDAP Daten und beschleunigt die Anmeldung an OTRS. Die
Synchronisierung der Daten findet bei der ersten Anmeldung des Agenten
statt, trotz der synchronisierten Daten bleibt ihr LDAP Verzeichnis die
letzte Instanz bei der Anmeldung. D.h. wird ein User im LDAP Verzeichnis
gelscht oder deaktiviert, klappt die Anmeldung an OTRS nicht. Ebenfalls
mssen die Daten fr einen Agenten weiterhin direkt im LDAP Verzeichnis
gepflegt werden.
</para>
<para>
<programlisting>
# UserSyncLDAPMap
# (map if agent should create/synced from LDAP to DB after login)
$Self->{UserSyncLDAPMap} = {
# DB -> LDAP
Firstname => 'givenName',
Lastname => 'sn',
Email => 'mail',
};
# UserSyncLDAPGroups
# (If "LDAP" was selected for AuthModule, you can specify
# initial user groups for first login.)
$Self->{UserSyncLDAPGroups} = [
'users',
];
# UserTable
$Self->{DatabaseUserTable} = 'system_user';
$Self->{DatabaseUserTableUserID} = 'id';
$Self->{DatabaseUserTableUserPW} = 'pw';
$Self->{DatabaseUserTableUser} = 'login';
</programlisting>
</para>
</sect3>
<sect3 id='agent-auth-backend-httpbasic'>
<title>HTTPBasicAuth fr Agenten</title>
<para>
Falls Sie eine "single sign on"-Lsung fr Ihre Agenten implementieren
mchten, benutzen Sie http basic authentication (fr alle Ihre
Systeme) und aktivieren Sie das HTTPBasicAuth Modul (kein OTRS-Login
mehr fr Kunden bentigt!).
</para>
<example id='configuration-agent-auth-backend-htbasic'>
<title>Agentenauthentifizierung ber HTTPBasic</title>
<para>
<programlisting>
# This is an example configuration for an apache ($ENV{REMOTE_USER})
# auth. backend. Use it if you want to have a singe login through
# apache http-basic-auth
$Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';
# Note:
#
# If you use this module, you should use as fallback
# the following config settings if user isn't login through
# apache ($ENV{REMOTE_USER})
$Self->{LoginURL} = 'http://host.example.com/not-authorised-for-otrs.html';
$Self->{LogoutURL} = 'http://host.example.com/thanks-for-using-otrs.html';
</programlisting>
</para>
</example>
</sect3>
<sect3 id='agent-auth-backend-radius'>
<title>Radius</title>
<para>
Mit den folgenden Einstellungen kann die Authentifizierung von Agenten gegen
einen Radius-Server realisiert werden.
</para>
<example id='configuration-agent-auth-backend-radius'>
<title>Agentenauthentifizierung gegen ein Radius Back-end</title>
<para>
<programlisting>
# This is example configuration to auth. agents against a radius server
$Self->{'AuthModule'} = 'Kernel::System::Auth::Radius';
$Self->{'AuthModule::Radius::Host'} = 'radiushost';
$Self->{'AuthModule::Radius::Password'} = 'radiussecret';
</programlisting>
</para>
</example>
</sect3>
</sect2>
<sect2 id="customer-auth-backends">
<title>Authentifizierungs Back-ends fr Kunden</title>
<sect3 id='customer-auth-backend-db'>
<title>Datenbank (Standard)</title>
<para>
Das Back-end fr die Authentifizierung von Kunden, welches OTRS standardmig
verwendet, ist die OTRS-Datenbank. Die Kundendaten knnen ber das Interface
zur Verwaltung von Kunden angelegt und bearbeitet werden.
</para>
<example id='configuration-customer-auth-backend-db'>
<title>Kundenauthentifizierung gegen ein DB Back-end</title>
<para>
<programlisting>
# This is the auth. module againt the otrs db
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
$Self->{'Customer::AuthModule::DB::Table'} = 'customer_user';
$Self->{'Customer::AuthModule::DB::CustomerKey'} = 'login';
$Self->{'Customer::AuthModule::DB::CustomerPassword'} = 'pw';
# $Self->{'Customer::AuthModule::DB::DSN'} = "DBI:mysql:database=customerdb;host=customerdbhost";
# $Self->{'Customer::AuthModule::DB::User'} = "some_user";
# $Self->{'Customer::AuthModule::DB::Password'} = "some_password";
</programlisting>
</para>
</example>
</sect3>
<sect3 id='customer-auth-backend-ldap'>
<title>LDAP</title>
<para>
Falls ein LDAP Verzeichnis mit Ihren Kundenbenutzern verfgbar
ist, knnen Sie das LDAP Modul fr die Authentifizierung Ihrer Kunden
nutzen. Dieses Modul greift nur lesend auf die Daten im LDAP Verzeichnis
zu, d.h. die Daten knnen nicht mit OTRS bearbeitet
werden, es knnen also keine Kunden mit Hilfe der Kundenverwaltung von OTRS
angelegt oder bearbeitet werden.
</para>
<example id='configuration-customer-auth-backend-ldap'>
<title>Kundenauthentifizierung gegen ein LDAP Back-end</title>
<para>
<programlisting>
# This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'ldap.example.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=example,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'uid';
# 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 do NOT have permission to read from the LDAP tree
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = '';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '';
# 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,
};
</programlisting>
</para>
</example>
</sect3>
<sect3 id='customer-auth-backend-httpbasic'>
<title>HTTPBasicAuth fr Kunden</title>
<para>
Falls Sie eine "single sign on"-Lsung fr Ihre Kunden
implementieren mchten, benutzen Sie HTTPBasic Authentication (fr alle Ihre
Systeme) und aktivieren Sie das HTTPBasicAuth Modul (kein OTRS-Login
mehr bentigt!).
</para>
<example id='configuration-customer-auth-backend-htbasic'>
<title>Kundenauthentifizierung ber HTTPBasic</title>
<para>
<programlisting>
# This is an example configuration for an apache ($ENV{REMOTE_USER})
# auth. backend. Use it if you want to have a singe login through
# apache http-basic-auth
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
# Note:
# If you use this module, you should use the following
# config settings as fallback, if user isn't login through
# apache ($ENV{REMOTE_USER})
$Self->{CustomerPanelLoginURL} = 'http://host.example.com/not-authorised-for-otrs.html';
$Self->{CustomerPanelLogoutURL} = 'http://host.example.com/thanks-for-using-otrs.html';
</programlisting>
</para>
</example>
</sect3>
<sect3 id='customer-auth-backend-radius'>
<title>Radius</title>
<para>
Mit den folgenden Einstellungen kann die Authentifizierung von Kunden gegen
einen Radius-Server realisiert werden.
</para>
<example id='configuration-customer-auth-backend-radius'>
<title>Kundenauthentifizierung gegen ein Radius Back-end</title>
<para>
<programlisting>
# This is a example configuration to auth. customer against a radius server
$Self->{'Customer::AuthModule'} = 'Kernel::System::Auth::Radius';
$Self->{'Customer::AuthModule::Radius::Host'} = 'radiushost';
$Self->{'Customer::AuthModule::Radius::Password'} = 'radiussecret';
</programlisting>
</para>
</example>
</sect3>
</sect2>
</sect1>
<sect1 id="customer-self-registration">
<title>Kunden-Selbstanmeldung anpassen</title>
<para>
Es ist mglich, die Kunden-Selbstanmeldung fr neue Kunden ber
"customer.pl" anzupassen. Somit knnen Sie mehr optionale oder
bentigte Felder (z.B. Adresse, Ort, Telefonnummer) hinzufgen.
</para>
<para>
In folgenden Beispiel wird ein bentigtes Feld fr die Telefonnummer
hinzugefgt.
</para>
<sect2 id='customer-self-registration-dtl'>
<title>Anpassen der Weboberflche</title>
<para>
Damit im Webinterface das zustzliche Feld fr die Telefonnummer
angezeigt wird, muss die zustndige dtl-Datei angepasst werden. Editieren Sie
<filename>Kernel/Output/HTML/Standard/CustomerLogin.dtl</filename>
und fgen Sie in Zeile 128 das gewnschte Feld hinzu.
</para>
<para>
<programlisting>
[...]
<tr>
<td>$Text{"Phonenumber"}: </td>
<td><input type="text" name="Phone" value="$QData{"UserPhone"}" size="20" maxlength="50"></td>
</tr>
[...]
</programlisting>
</para>
</sect2>
<sect2 id="customer-self-registration-mapping">
<title>Kunden-Mapping</title>
<para>
Zustzlich muss das Kunden-Mapping um den Eintrag fr die Telefonnummer
erweitert werden. Dazu werden zuerst die Einstellungen fr "CustomerUser"
aus der Datei <filename>Kernel/Config/Defaults.pm</filename> in die Datei
<filename>Kernel/Config.pm</filename> bertragen. Anschlieend wird das
Kunden-Mapping umdas Phone-Feld erweitert.
</para>
<para>
<programlisting>
# CustomerUser
# (customer user database backend and settings)
$Self->{CustomerUser} = {
Name => 'Database Backend',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
# if you want to use an external database, add the
# required settings
# DSN => 'DBI:odbc:yourdsn',
# DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
# User => '',
# Password => '',
Table => 'customer_user',
},
# customer uniq id
CustomerKey => 'login',
# customer #
CustomerID => 'customer_id',
CustomerValid => 'valid_id',
CustomerUserListFields => ['first_name', 'last_name', 'email'],
# CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => ['salutation', 'first_name', 'last_name'],
CustomerUserEmailUniqCheck => 1,
# # show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # just a read only source
# ReadOnly => 1,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserSalutation', 'Salutation', 'salutation', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'pw', 0, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 0, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'email', 1, 1, 'var','$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
# default selections
Selections => {
UserSalutation => {
'Mr.' => 'Mr.',
'Mrs.' => 'Mrs.',
},
},
};
</programlisting>
</para>
</sect2>
<sect2 id="customer-self-registration-customer-table">
<title>Anpassen der Kunden-Tabelle</title>
<para>
Abschlieend muss eine neue Spalte zur "customer_user" Tabelle in der OTRS
Datenbank hinzugefgt werden, in der die Telefonnummer gespeichert werden
kann.
</para>
<para>
<screen>
linux:~# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6 to server version: 5.0.18-Debian_7-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use otrs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> ALTER TABLE customer_user ADD phone VARCHAR (200);
Query OK, 3 rows affected (0.01 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> quit
Bye
linux:~#
</screen>
</para>
<para>
Alle bentigten Anpassungen sind durchgefhrt und das Feld fr die
Telefonnummer sollte nun im Kunden-Interface (customer.pl) angezeigt und
verwendet werden knnen. Wird mod_perl eingesetzt, muss der Webserver neu
gestartet werden um die nderungen zu bernehmen.
</para>
</sect2>
</sect1>
</chapter>
|