Authentifizirung via LDAP und HTTP

Hilfe zu Znuny Problemen aller Art
Locked
TheDude
Znuny expert
Posts: 208
Joined: 24 Jan 2012, 15:01
Znuny Version: 4.0.13
Real Name: Jörg Brümmer
Company: Kreis Minden-Lübbecke

Authentifizirung via LDAP und HTTP

Post by TheDude »

Folgendes Szenario möchte ich umsetzen:

- Ein Kunde wird per Gruppenzugehörigkeit der Zugriff auf OTRS gewährt.
- Seine Benutzerdaten sollen per Http-Auth. weitergegeben werden, damit er sich nicht extra anmelden muss

Einzeln habe ich die Konfiguration getestet.
- Anmeldung mit Auth. via LDAP funktioniert
- Anmeldung via Http-Auth. funmtioniert

Wenn ich beide Auth. Module in der Konfiguration stehen lasse, wird der Kunde automatisch am System angemeldet. Leider auch, wenn er nicht in der Berechtigungsgruppe ist.

Muss ich etwas Besonderes beachten, wenn ich beide auth.-Methoden in Kombination nutzen möchte?

Code: Select all

# ---------------------------------------------------- #
# Kunden Authentifizirung via LDAP                     #
# ---------------------------------------------------- #
   
  $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
       $Self->{'Customer::AuthModule::LDAP::Host'} = 'IP-ADRESSE';
       $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=domain, dc=de';
       $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';

	$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=Berechtigungsgruppe,ou=Anwendungen,ou=Groups,dc=domain,dc=de';
	$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
	$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN';

       $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=S_OTRS,ou=Users,dc=domain,dc=de';
       $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'PASSWORT';
	


       $Self->{'Customer::AuthModule::LDAP::Params'} = {
            port => 389,
            timeout => 120,
            async => 0,
            version => 3,
        };

# ---------------------------------------------------- #
# Kunden Authentifizirung via HTTP                     #
# ---------------------------------------------------- #		
# 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';


OTRS 5.0.18 auf Debian Linux | Apache2 | MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Authentifizirung via LDAP und HTTP

Post by jojo »

in dem Fall greift die HTTP Authentifizierung, d.h die LDAP Authentifizierung wird in dem Fall nicht genutzt. D.h. die HTTP Authentifizerungsmethode muss die Berechtigung prüfen, die LDAP Authentifzierung benötigst Du dann nicht im OTRS
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
TheDude
Znuny expert
Posts: 208
Joined: 24 Jan 2012, 15:01
Znuny Version: 4.0.13
Real Name: Jörg Brümmer
Company: Kreis Minden-Lübbecke

Re: Authentifizirung via LDAP und HTTP

Post by TheDude »

Ok. Wie kann der Http-Auth. sagen, dass sie prüfen soll, ob der Kunde in der Berechtigungsgruppe ist und ggf nicht angemeldet wird?
OTRS 5.0.18 auf Debian Linux | Apache2 | MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Authentifizirung via LDAP und HTTP

Post by jojo »

das musst Du in der Apache Config machen, dort hast Du ja ein entsprechendes HTTP Modul eingeschaltet.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
TheDude
Znuny expert
Posts: 208
Joined: 24 Jan 2012, 15:01
Znuny Version: 4.0.13
Real Name: Jörg Brümmer
Company: Kreis Minden-Lübbecke

Re: Authentifizirung via LDAP und HTTP

Post by TheDude »

An welcher Stelle gebe ich das denn an?

Code: Select all

# set mod_perl2 options
    <Location /otrs>
		PerlAuthenHandler Apache2::AuthenNTLM
		AuthType ntlm,basic
		AuthName Basic
		require valid-user
		PerlAddVar ntdomain "domain.de dc"
		PerlSetVar defaultdomain DOMAIN.DE
		PerlSetVar splitdomainprefix 1	
        PerlSetVar ntlmdebug 1
		PerlSetVar ntlmsemkey 23754
#        ErrorDocument 403 /otrs/customer.pl
        ErrorDocument 403 /otrs/index.pl
        SetHandler  perl-script
        PerlResponseHandler ModPerl::Registry
        Options +ExecCGI
        PerlOptions +ParseHeaders
        PerlOptions +SetupEnv
        Order allow,deny
        Allow from all
    </Location>
OTRS 5.0.18 auf Debian Linux | Apache2 | MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Authentifizirung via LDAP und HTTP

Post by jojo »

mit NTLM wirst Du da wahrscheinlich nicht weit kommen. Zu mal die Dokumentation vom mod_auth_ntlm zu Rate...
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
TheDude
Znuny expert
Posts: 208
Joined: 24 Jan 2012, 15:01
Znuny Version: 4.0.13
Real Name: Jörg Brümmer
Company: Kreis Minden-Lübbecke

Re: Authentifizirung via LDAP und HTTP

Post by TheDude »

Ich finde nichts passendes. Ist ein anderes Modul besser geeignet?
OTRS 5.0.18 auf Debian Linux | Apache2 | MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Authentifizirung via LDAP und HTTP

Post by jojo »

mod_auth_kerb
mod_auth_ssl
mod_authnz_ldap (kein SSO)
mod_auth_ldap (kein SSO)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
TheDude
Znuny expert
Posts: 208
Joined: 24 Jan 2012, 15:01
Znuny Version: 4.0.13
Real Name: Jörg Brümmer
Company: Kreis Minden-Lübbecke

Re: Authentifizirung via LDAP und HTTP

Post by TheDude »

Ok. Sagen wir mal, ich nehme das Modul mod_auth.kerb. Wie trage ich das da ein?
OTRS 5.0.18 auf Debian Linux | Apache2 | MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Authentifizirung via LDAP und HTTP

Post by jojo »

lies die Modul Doku des entsprechenden Authentifizierungsmoduls
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
TheDude
Znuny expert
Posts: 208
Joined: 24 Jan 2012, 15:01
Znuny Version: 4.0.13
Real Name: Jörg Brümmer
Company: Kreis Minden-Lübbecke

Re: Authentifizirung via LDAP und HTTP

Post by TheDude »

Irgendwie scheint das schwieriger zu sein. Kannst jemand einen weiteren Hinweis geben?
OTRS 5.0.18 auf Debian Linux | Apache2 | MySQL
Locked