Single Sign-On für OTRS 6

Hilfe zu OTRS Problemen aller Art
Post Reply
AdrianSchulz
Znuny newbie
Posts: 1
Joined: 27 Apr 2018, 13:13
Znuny Version: OTRS Community
Real Name: Adrian Schulz
Company: App Box
Contact:

Single Sign-On für OTRS 6

Post by AdrianSchulz »

Guten Tag,

ich habe vor einigen Tagen zu testzwecken OTRS 6 Community unter Ubuntu aufgesetzt. Nun stellte sich mir die Frage ob man für die Anmeldung der Customers(und/oder für alle Login-Bereiche) nicht ein Single Sign-On umsetzten kann. Ich weiß inzwischen dass es dort die eine oder andere Anleitung/Dokumentation gibt, allerdings sind diese nicht sehr umfangreich. Deshalb wollte ich mir hier im Forum erstmal ein paar weitere Informationen holen, bzw die richtigen Ansätze.


Wenn Ihr noch irgendwelche Informationen benötigt, um mir helfen zu können, stelle ich diese Selbstverständlich zur Verfügung.

Ich bedanke mich im vorraus für jegliche Hilfe und Unterstützung!

Mit freundlichen Grüßen
Adrian
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Single Sign-On für OTRS 6

Post by root »

Hi,

Suche einfach im Forum, sind ausreichend Anleitungen da. AFAIK ist es egal ob OTRS 5 oder OTRS 6, die eigentliche Arbeit macht der Apache.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
rbroda
Znuny expert
Posts: 152
Joined: 03 Jun 2013, 14:40
Znuny Version: 6.0.33
Real Name: Robert
Company: Gebr. Steimel GmbH

Single Sign-On für OTRS 6

Post by rbroda »

Jetzt unabhängig von SSO.

Auf meinem System habe ich die LDAP Authentifierung eingestellt, was auch 3 Jahre funktioniert hat.
Meine Agents konnten sich gegen unseren AD authentifizieren.
Wenn ich jetzt in der Config.pm die ganze Geschichte auf "HTTPBasicAuth" umstelle, können sich die Agent gar nicht mehr anmelden.

$Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';
$Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} ='@xyz.net';

Im error.log wird nichts geloggt, wenn der Benutzer sich mit Benutzername und Password anmeldet.
Erst wenn man einen Benutzernamen eingibt, den es in der DB nicht gibt, loggt er mir eine Fehlermeldung...

Als ob das Passwort nicht mehr stimmen würde....
Wie muss die Config.pm denn jetzt aussehen?

Irgendwo happerts noch an diesem Schritt bis zur meiner SSO Konfiguration...
eXe2001
Znuny newbie
Posts: 47
Joined: 15 Aug 2014, 08:22
Znuny Version: 5.0.26

Re: Single Sign-On für OTRS 6

Post by eXe2001 »

wenn auf HTTPBasicAuth gestellt ist möchte das OTRS die Anmeldeinformationen des Webservers verwenden. Ist dieser denn auch so konfiguriert das er vor OTRS nach den Anmeldedaten fragt?

Auf meinem Produktivsystem habe ich SSO über kerberos->apache2->otrs umgesetzt.
rbroda
Znuny expert
Posts: 152
Joined: 03 Jun 2013, 14:40
Znuny Version: 6.0.33
Real Name: Robert
Company: Gebr. Steimel GmbH

Re: Single Sign-On für OTRS 6

Post by rbroda »

Hier eine Anleitung, die auch bei mir funktioniert - nur die Anmeldung dauert fast 1min...und alles andere lädt auch so lange...vielleicht können die Experten sagen, was flasch sein könnte.

Beispiel Domain: xyz.local
Web Server: otrs.xyz.local
Active Directory Server: dc1.xyz.local
DNS Server: dc1.xyz.local

1. Auf dem OTRS-/Webserver Uhr synchronisieren:

Code: Select all

> sudo apt-get install ntpdate
> sudo ntpdate dc1
2. Auf dem Windows-Domaincontroller:

2.1 AD-Benutzer erstellen:
z.B. "FB-IT_kerberos_otrs" mit Password "Test1234"

2.2 Keytab Datei erstellen (CMD):

Code: Select all

ktpass -princ HTTP/otrs.xyz.local@XYZ.LOCAL -mapuser FB-IT_kerberos_otrs@XYZ.LOCAL -pass Test1234 -crypto RC4-HMAC-NT -ptype KRB5_NT_PRINCIPAL -out C:\Temp\kerberos.keytab

3. Auf dem OTRS-/Webserver keytab Datei kopieren:

3.1 Keytabfile auf OTRS-/Webserver kopieren:
Die kerberos.keytab Datei kopiert man auf den OTRS-/Webserver nach /etc/

3.2 Berechtigung vergeben:

Code: Select all

		> chown root:www-data /etc/kerberos*.keytab
		> chmod 0640 /etc/kerberos*.keytab

4. Apache Modul installieren / konfigurieren

Code: Select all

> sudo apt-get install libapache2-mod-auth-kerb krb5-user
(default_realm XYZ.LOCAL eintragen)

4.1 /etc/krb5.conf anpassen:

Code: Select all

[libdefaults]
			default_realm = XYZ.LOCAL
			# ...
			 
		[realms]
			XYZ.LOCAL = {
				# kdc and admin_server are DNS entries pointing to your primary domain controller
				kdc = dc1 
				admin_server = dc1
		}
		
		[domain_realm]
			# Please note the leading dot and the upper-case
			.xyz.local = XYZ.LOCAL
			xyz.local = XYZ.LOCAL

5. Apache Konfigurationsdatei anpassen (apache2-httpd.include.conf):

Code: Select all

			<Location /otrs>
			#        ErrorDocument 403 /opt/otrs/customer.pl
					ErrorDocument 403 /opt/otrs/index.pl
					AuthType Kerberos
					Krb5KeyTab /etc/kerberos.keytab
					KrbAuthRealms STEIMEL.LOCAL
					KrbLocalUserMapping On
					KrbMethodK5Passwd On
					KrbMethodNegotiate On
					KrbSaveCredentials Off
					KrbVerifyKDC Off
					require valid-user
					SetHandler  perl-script
					PerlResponseHandler ModPerl::Registry
					Options +ExecCGI
					PerlOptions +ParseHeaders
					PerlOptions +SetupEnv

			#        <IfModule mod_version.c>
			#            <IfVersion < 2.4>
			#                Order allow,deny
			#                Allow from all
			#            </IfVersion>
			#            <IfVersion >= 2.4>
			#                Require all granted
			#            </IfVersion>
			#        </IfModule>
			#        <IfModule !mod_version.c>
			#            Order allow,deny
			#            Allow from all
			#        </IfModule>
				</Location>


6. Config.pm anpassen

Code: Select all

	$Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';
	$Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} ='@xyz.local';
7. Browser für SSO konfigurieren:

7.1 IE11:
https://docs.aws.amazon.com/directoryse ... tml#ie_sso

7.2 Firefox:
about:config
network.negotiate-auth.delegation-uris = .xyz.local
network.negotiate-auth.trusted-uris = .xyz.local
Last edited by rbroda on 07 May 2018, 10:22, edited 1 time in total.
rbroda
Znuny expert
Posts: 152
Joined: 03 Jun 2013, 14:40
Znuny Version: 6.0.33
Real Name: Robert
Company: Gebr. Steimel GmbH

Re: Single Sign-On für OTRS 6

Post by rbroda »

LogLevel trace auf 8 gesetzt.
Folgendes steht im Error.log (apache).
Wie gesagt...mit meinem eingestellten SSO ist das System totalll lahm. Jede Aktion dauert 45-60sec...
error.zip
You do not have the required permissions to view the files attached to this post.
rbroda
Znuny expert
Posts: 152
Joined: 03 Jun 2013, 14:40
Znuny Version: 6.0.33
Real Name: Robert
Company: Gebr. Steimel GmbH

Re: Single Sign-On für OTRS 6

Post by rbroda »

So, Problem gelöst...
DNS Eintrag fehlte bei mir in der /etc/hosts.conf
(172.28.1.232 otrs.xyz.local otrs)

Hoffe, die Anleitung für SSO kann dem einem oder anderem helfen.
rbroda
Znuny expert
Posts: 152
Joined: 03 Jun 2013, 14:40
Znuny Version: 6.0.33
Real Name: Robert
Company: Gebr. Steimel GmbH

Re: Single Sign-On für OTRS 6

Post by rbroda »

Eine Frage habe ich noch.
An welchen Rädchen muss ich drehen um mich wie folgt über SSO anzumelden:

SSO geht über:
https://otrs.xyz.local/otrs/index.pl

würde gerne mich so anmelden, wie wir es ohne SSO gemacht haben (ohne "Domainname" dahinter, da das Sicherheitszertifikat auch ohne erstellt wurde):
https://otrs/otrs/index.pl

mfg
Robert Broda
tcpdumb
Znuny newbie
Posts: 2
Joined: 04 Dec 2018, 15:54
Znuny Version: 6.0.x
Real Name: Lukas Th. Hey
Company: AöR mit drei Buchstaben

Re: Single Sign-On für OTRS 6

Post by tcpdumb »

Moin,

auch wenn das Thema seit geraumer Zeit zu ist, ich hab hier ein interessantes Anforderungsprofil.

IST: OTRS authentisiert zuerst gegen die eigene Datenbank {'AuthModule'}, dann gegen Domaene "A" {'AuthModule4'} und danach gegen Domaene "B" {'AuthModule5'}. Das Klappt ganz gut, auch wenn halt immer ein Benutzer gegen alles gecheckt wird, mit entsprechenden Fehlermeldungen.

SOLL: "IST + Single Sign On"

Kerberos habe ich mit multi realms soweit konfiguriert, dass je nachdem, ob ich gegen @DOMAENE.A oder @DOMAENE.B authentisieren muss, die entsprechenden DCs befragt werden. Warum ich damals (2013) zwischen AuthModule und AuthModule4 soviel "Platz" gelassen habe, kann ich mir heute nichtmal mehr selbst beantworten :-)

Frage: Ist das bei OTRS ueberhaupt machbar, dass ein Benutzer z.B. erst per SSO nacheinander gegen eines der ADs authentisiert werden soll und wenn das nicht geht, dann gegen die Lokale Datenbank bzw. manuell gegen die ADs?
MaAr
Znuny newbie
Posts: 12
Joined: 27 Apr 2017, 11:00
Znuny Version: 5s Free
Real Name: Martin

Re: Single Sign-On für OTRS 6

Post by MaAr »

Moin,
jetzt muss ich mich auch einmal zu Wort melden. Ich habe alles entsprechend nachgebaut, ohne Erfolg.
Beim Apache habe ich die File /etc/apache2/conf-enabled/otrs.conf bearbeitet, ich hoffe, dass ist korrekt?
Trace Level 8, einmal der Auszug.
[Tue Oct 06 13:13:08.443677 2020] [core:trace6] [pid 21544] core_filters.c(525): [client 10.3.90.13:50151] will flush because of FLUSH bucket
[Tue Oct 06 13:13:08.443725 2020] [core:trace8] [pid 21544] core_filters.c(535): [client 10.3.90.13:50151] seen in brigade so far: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.443736 2020] [core:trace8] [pid 21544] core_filters.c(554): [client 10.3.90.13:50151] flushing now
[Tue Oct 06 13:13:08.443744 2020] [core:trace8] [pid 21544] core_filters.c(569): [client 10.3.90.13:50151] total bytes written: 4534
[Tue Oct 06 13:13:08.443751 2020] [core:trace8] [pid 21544] core_filters.c(580): [client 10.3.90.13:50151] brigade contains: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.448399 2020] [core:trace6] [pid 21542] core_filters.c(525): [client 10.3.90.13:50152] will flush because of FLUSH bucket
[Tue Oct 06 13:13:08.448446 2020] [core:trace8] [pid 21542] core_filters.c(535): [client 10.3.90.13:50152] seen in brigade so far: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.448457 2020] [core:trace8] [pid 21542] core_filters.c(554): [client 10.3.90.13:50152] flushing now
[Tue Oct 06 13:13:08.448465 2020] [core:trace8] [pid 21542] core_filters.c(569): [client 10.3.90.13:50152] total bytes written: 1497
[Tue Oct 06 13:13:08.448472 2020] [core:trace8] [pid 21542] core_filters.c(580): [client 10.3.90.13:50152] brigade contains: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.451643 2020] [core:trace6] [pid 21545] core_filters.c(525): [client 10.3.90.13:50155] will flush because of FLUSH bucket
[Tue Oct 06 13:13:08.451672 2020] [core:trace8] [pid 21545] core_filters.c(535): [client 10.3.90.13:50155] seen in brigade so far: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.451681 2020] [core:trace8] [pid 21545] core_filters.c(554): [client 10.3.90.13:50155] flushing now
[Tue Oct 06 13:13:08.451688 2020] [core:trace8] [pid 21545] core_filters.c(569): [client 10.3.90.13:50155] total bytes written: 817
[Tue Oct 06 13:13:08.451694 2020] [core:trace8] [pid 21545] core_filters.c(580): [client 10.3.90.13:50155] brigade contains: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.451677 2020] [core:trace6] [pid 21564] core_filters.c(525): [client 10.3.90.13:50150] will flush because of FLUSH bucket
[Tue Oct 06 13:13:08.451713 2020] [core:trace8] [pid 21564] core_filters.c(535): [client 10.3.90.13:50150] seen in brigade so far: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.451722 2020] [core:trace8] [pid 21564] core_filters.c(554): [client 10.3.90.13:50150] flushing now
[Tue Oct 06 13:13:08.451730 2020] [core:trace8] [pid 21564] core_filters.c(569): [client 10.3.90.13:50150] total bytes written: 21405
[Tue Oct 06 13:13:08.451737 2020] [core:trace8] [pid 21564] core_filters.c(580): [client 10.3.90.13:50150] brigade contains: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.615658 2020] [core:trace6] [pid 21543] core_filters.c(525): [client 10.3.90.13:50153] will flush because of FLUSH bucket
[Tue Oct 06 13:13:08.615702 2020] [core:trace8] [pid 21543] core_filters.c(535): [client 10.3.90.13:50153] seen in brigade so far: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.615713 2020] [core:trace8] [pid 21543] core_filters.c(554): [client 10.3.90.13:50153] flushing now
[Tue Oct 06 13:13:08.615721 2020] [core:trace8] [pid 21543] core_filters.c(569): [client 10.3.90.13:50153] total bytes written: 22556
[Tue Oct 06 13:13:08.615749 2020] [core:trace8] [pid 21543] core_filters.c(580): [client 10.3.90.13:50153] brigade contains: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.619711 2020] [core:trace6] [pid 21547] core_filters.c(525): [client 10.3.90.13:50154] will flush because of FLUSH bucket
[Tue Oct 06 13:13:08.619756 2020] [core:trace8] [pid 21547] core_filters.c(535): [client 10.3.90.13:50154] seen in brigade so far: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
[Tue Oct 06 13:13:08.619765 2020] [core:trace8] [pid 21547] core_filters.c(554): [client 10.3.90.13:50154] flushing now
[Tue Oct 06 13:13:08.619773 2020] [core:trace8] [pid 21547] core_filters.c(569): [client 10.3.90.13:50154] total bytes written: 368810
[Tue Oct 06 13:13:08.619780 2020] [core:trace8] [pid 21547] core_filters.c(580): [client 10.3.90.13:50154] brigade contains: bytes: 0, non-file bytes: 0, eor buckets: 0, morphing buckets: 0
::1 - - [06/Oct/2020:13:13:22 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.38 (Debian) mod_auth_kerb/5.4 mod_perl/2.0.9dev Perl/v5.20.2 (internal dummy connection)"
Post Reply