SingleSignOn

Hilfe zu Znuny Problemen aller Art
Locked
mrm
Znuny newbie
Posts: 62
Joined: 11 Jan 2011, 19:09
Znuny Version: 3.0

SingleSignOn

Post by mrm »

Hallo,
eventuell kann mir ja jemand bei meinem Problem helfen.

Ich moechte eine SingleSignOn Loesung fuer Agenten als auch Customer vom AD realisieren. Hierzu bin ich nach etlichen Howtos, die so im Internet kursieren vorgegangen. Genuetzt hat es mir jedoch nicht.
Ich schaetze, dass nur _die_ eine Zeile fehlt, aber welche? ;-)

Anbei meine Config.pm

Code: Select all

    $Self->{'AuthModule1'} = 'Kernel::System::Auth::HTTPBasicAuth';
$Self->{'Customer::AuthModule4'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
In der apache2.conf steht folgendes:

Code: Select all

KeepAlive On
und in /etc/apache2/sites-available/otrs.conf steht folgendes:

Code: Select all

<IfModule mod_perl.c>

    # load all otrs modules
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

    # Apache::Reload - Reload Perl Modules when Changed on Disk
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
    PerlModule Apache2::RequestRec

    # set mod_perl2 options
        <Location /otrs/>
        #       ErrorDocument 403 /otrs/customer.pl
                ErrorDocument 403 /otrs/index.pl
                SetHandler perl-script
                PerlResponseHandler ModPerl::Registry
                PerlHandler Apache::PerlRun
                PerlSetVar ntdomain "DOMAIN.LOCAL DC BDC" #DOMAIN.LOCAL DC und BDC sind natuerlich auf meine Beduerfnisse angepasst
                PerlSetVar defaultdomain DOMAIN.LOCAL
                PerlSetVar splitdomainprefix 1
                PerlSetVar ntlmdebug 3
                PerlSetVar ntlmsemtimeout 20
                PerlAuthenHandler Apache2::AuthenNTLM
                PerlOptions +ParseHeaders
                PerlOptions +SetupEnv
                AuthType ntlm
                AuthName OTRS
                require valid-user
                Options Indexes -FollowSymLinks +Includes MultiViews ExecCGI
                Order allow,deny
                Allow from all
        </Location>

# directory settings
        <Directory "/opt/otrs/bin/cgi-bin/">
                AllowOverride None
                Options +ExecCGI -Includes
                Order allow,deny
                Allow from all
        </Directory>
        <Directory "/opt/otrs/var/httpd/htdocs/">
                AllowOverride None
                Options +ExecCGI -Includes
                Order allow,deny
                Allow from all
                AllowOverride None
        </Directory>
</IfModule>
<IfModule mod_headers.c>
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    <Directory "/opt/otrs/var/httpd/htdocs/js_new/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>

Mein Problem ist nun, dass ich auf meinem Windows-Desktop mein Otrs aufrufe und ich eine Login Seite praesentiert bekomm.
Folgendes steht im apache.error Log:

Code: Select all

[16652] AuthenNTLM: Config Domain = DOMAIN.LOCAL  pdc = DC  bdc = BDC
[16652] AuthenNTLM: Config Default Domain = DOMAIN.LOCAL
[16652] AuthenNTLM: Config Fallback Domain = 
[16652] AuthenNTLM: Config AuthType = ntlm AuthName = OTRS
[16652] AuthenNTLM: Config Auth NTLM = 1 Auth Basic = 0
[16652] AuthenNTLM: Config NTLMAuthoritative = on  BasicAuthoritative = on
[16652] AuthenNTLM: Config Semaphore key = 23754 timeout = 20
[16652] AuthenNTLM: Config SplitDomainPrefix = 1
[16652] AuthenNTLM: Authorization Header <not given>
[Mon Feb 14 18:33:11 2011] [error] Bad/Missing NTLM/Basic Authorization Header for /otrs/customer.pl
[16652] AuthenNTLM: Start NTLM Authen handler pid = 16652, connection = 140426667682056 conn_http_hdr = Keep-Alive  main =  cuser =  remote_ip = <IP> remote_port = 12596 remote_host = <> version = 0.02 smbhandle = 
[16652] AuthenNTLM: Object exists user = \
[16652] AuthenNTLM: Authorization Header NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw==
[16652] AuthenNTLM: Got: 78 84 76 77 83 83 80 0 1 0 0 0 7 130 8 162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 1 40 10 0 0 0 15
[16652] AuthenNTLM: protocol=NTLMSSP, type=1, flags1=7(NEGOTIATE_UNICODE,NEGOTIATE_OEM,REQUEST_TARGET), flags2=130(NEGOTIATE_ALWAYS_SIGN,NEGOTIATE_NTLM), domain length=0, domain offset=0, host length=0, host offset=0, host=, domain=
[16652] handler type == 1 
[16652] AuthenNTLM: Connect to pdc = DC bdc = BDC domain = DOMAIN.LOCAL
[16652] AuthenNTLM: enter lock
[16652] AuthenNTLM: verify handle  smbhandle == 140426668532416 
[16652] AuthenNTLM: Send: 78 84 76 77 83 83 80 0 2 0 0 0 0 0 0 0 40 0 0 0 1 130 0 0 44 205 170 222 249 64 162 142 0 0 0 0 0 0 0 0
[16652] AuthenNTLM: charencoding = 1
[16652] AuthenNTLM: flags2 = 130
[16652] AuthenNTLM: nonce=,ͪ�@�
[16652] AuthenNTLM: Send header: NTLM TlRMTVNTUAACAAAAAAAAACgAAAABggAALM2q3vlAoo4AAAAAAAAAAA==
[16652] AuthenNTLM: verify handle = 1 smbhandle == 140426668532416 
[16652] AuthenNTLM: Start NTLM Authen handler pid = 16652, connection = 140426667682056 conn_http_hdr = Keep-Alive  main =  cuser =  remote_ip = <IP> remote_port = 12596 remote_host = <> version = 0.02 smbhandle = 
[16652] AuthenNTLM: Object exists user = \
[16652] AuthenNTLM: Authorization Header NTLM TlRMTVNTUAADAAAAGAAYAHIAAAAYABgAigAAAAgACABIAAAADgAOAFAAAAAUABQAXgAAAAAAAACiAAAABYIAAgUBKAoAAAAPQwBUAEwATQByAGQAYQBuAHoAZQByAE0AWgBFAE4ATwBSAEcAMgAwADkAF7YsjSU66886HZ8FdUMMpBrV4sb+QwwD/SvM/lQyrwioKDIHYrqT3JPVeQ4mZbqZ
[16652] AuthenNTLM: Got: 78 84 76 77 83 83 80 0 3 0 0 0 24 0 24 0 114 0 0 0 24 0 24 0 138 0 0 0 8 0 8 0 72 0 0 0 14 0 14 0 80 0 0 0 20 0 20 0 94 0 0 0 0 0 0 0 162 0 0 0 5 130 0 2 5 1 40 10 0 0 0 15 67 0 84 0 76 0 77 0 114 0 100 0 97 0 110 0 122 0 101 0 114 0 77 0 90 0 69 0 78 0 79 0 82 0 71 0 50 0 48 0 57 0 23 182 44 141 37 58 235 207 58 29 159 5 117 67 12 164 26 213 226 198 254 67 12 3 253 43 204 254 84 50 175 8 168 40 50 7 98 186 147 220 147 213 121 14 38 101 186 153
[16652] AuthenNTLM: protocol=NTLMSSP, type=3, user=<NAME>, host=<HOST>, domain=<DOMAIN.LOCAL>, msg_len=0
[16652] handler type == 3 
[16652] AuthenNTLM: verify handle = 3 smbhandle == 140426668532416 
[16652] AuthenNTLM: Verify user <NAME> via smb server
[16652] AuthenNTLM: leave lock
[16652] AuthenNTLM: OK pid = 16652, connection = 140426667682056 cuser = <NAME> ip = <IP>
Eigentlich, moechte ich behaupten, sieht das ganze ja okay aus. Was mich (und sicher auch nun den Apache) stoert ist:

Code: Select all

[16652] AuthenNTLM: Authorization Header <not given>
[Mon Feb 14 18:33:11 2011] [error] Bad/Missing NTLM/Basic Authorization Header for /otrs/customer.pl
Otrs loggt gen syslog, wo ich zu dem Zeitpunkt nichts finden kann ueber meinen Login.
Der Benutzer, mit dem ich teste, ist sowohl Agent, als auch Customer, ist auch in beiden Tabellen vorhanden, da ich Agenten und Customer in die DB sync.

Wie komme ich nun mit dem Auth weiter?

Vielen Dank fuer Eure Antworten und einen schoenen Abend noch.

MfG
M.
VG,
M.
----
Mehrere OTRS Instanzen, alle > 3.x, eins davon mit Kix4OTRS, 2 davon mit ITSM-Modul
mrm
Znuny newbie
Posts: 62
Joined: 11 Jan 2011, 19:09
Znuny Version: 3.0

Re: SingleSignOn

Post by mrm »

NTLM Auth nun auf Type Basic umgestellt, was den gleichen Effekt hat:

Code: Select all

[23925] AuthenNTLM: Authorization Header <not given>
[Tue Feb 15 12:25:54 2011] [error] Bad/Missing NTLM/Basic Authorization Header for /otrs/index.pl

Anbei meine Config.pm

Code: Select all

$Self->{'AuthModule1'} = 'Kernel::System::Auth::HTTPBasicAuth';
    $Self->{'Customer::AuthModule4'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
[/quote][/quote]

Hinzugefuegt habe ich nun noch

Code: Select all

$Self->{'LoginURL1'} = '<URL>';
$Self->{'LogoutURL1'} = '<URL>';
$Self->{'CustomerPanelLoginURL4'} = '<URL>';
$Self->{'CustomerPanelLogoutURL4'} = '<URL>';
was mich zum Schluss bringt, dass OTRS mit meinen Login Daten nichts anzufangen weiss, da ich immer auf diese angegebenen URLs weitergeleitet werde.
VG,
M.
----
Mehrere OTRS Instanzen, alle > 3.x, eins davon mit Kix4OTRS, 2 davon mit ITSM-Modul
peddy
Znuny newbie
Posts: 14
Joined: 05 Feb 2010, 12:33
Znuny Version: 3.0.7

Re: SingleSignOn

Post by peddy »

So habe ich es gelöst:
Single Sign On einrichten

Unter Debian ist die Einrichtung recht einfach und schnell erledigt. Als erstes muss ein Perl-Modul über die Paketverwaltung installiert werden.

apt-get install libapache2-authenntlm-perl

Nun öffnen wir die Datei /etc/apache2/conf.d/otrs.conf und tauschen den Bereich Location komplett gegen die untere Location aus.

<Location /otrs>
PerlAuthenHandler Apache2::AuthenNTLM
AuthType ntlm,basic
AuthName Basic
require valid-user
PerlAddVar ntdomain "DOMAIN dc bdc"
PerlSetVar defaultdomain DOMAIN
PerlSetVar splitdomainprefix 1
</Location>

Als nächstes ist die Datei Config.pm dran, die unter /opt/otrs/kernel zu finden ist. Um dem Customer SSO zu ermöglichen ist folgende Zeile notwendig:

$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';

Für die Agenten sieht der Eintrag so aus.

$Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';

Nach dem Neustart von Apache sollte die Anmeldung automatisch erfolgen.
loewi1979
Znuny newbie
Posts: 1
Joined: 07 Jun 2011, 16:03
Znuny Version: 3.0.8
Real Name: Juergen Loew
Company: Benda-Lutz Werke GmbH

Re: SingleSignOn

Post by loewi1979 »

Hallo!

Hat unter OpenSuse schon jemand das Single Sign on zum Laufen gebracht? Bring den Apache2::AuthenNTLM nicht zum laufen.

Bräuchte eine Schritt für Schritt anleitung.

Danke

mfg Löw
Locked