[gelöst]LDAP-Authentifizierung funktioniert nicht mehr

Alles, was den Apache betrifft, kann hier besprochen werden.

[gelöst]LDAP-Authentifizierung funktioniert nicht mehr

Postby Ovim-Obscurum » 06. December 2011 07:45

Hallo liebe Community,

ich habe derzeit das Problem, dass für eine Applikation (Nagios) nach einer Migration von Apache 2.0.46 auf 2.2.15 die LDAP-Authentifizierung nicht mehr wie geplant funktioniert. Durch einen Versionssprung wurde das LDAP-Modul mod_auth_ldap durch mod_authnz_ldap ersetzt. Für meine Distribution (RHEL 6.1) gibt es leider keine Möglichkeit das "alte" mod_auth_ldap zu verwenden, es steht nicht mehr als Paket zur Verfügung.

Mein Problem ist, dass die alte Konfiguration der Webapplikation nun natürlich nicht mehr auf das neue Modul passt. Ich habe Anhand der Modulhilfe die Konfiguration auf das neue Modul portiert, aber irgendwo habe ich wohl einen Fehler drin - es sind keine Zugriffe möglich, was sich im Log wie folgt zeigt:

Code: Select all
[debug] mod_authnz_ldap.c(393): [client 192.168.1.23] [26312] auth_ldap authenticate: using URL ldap://192.168.1.22:3268/DC=bla,DC=blaroot,DC=loc
[Mon Dec 05 09:33:16 2011] [info] [client 192.168.1.23] [26312] auth_ldap authenticate: user max.mustermann authentication failed; URI /nagios/ [User not found][No such object]
[Mon Dec 05 09:33:16 2011] [error] [client 192.168.1.23] user max.mustermann not found: /nagios/


Hat einer von euch einen Tipp für mich? Ich habe mich die letzten drei Tage mit diversen Wikis und Blogs beschäftigt und glaube ich sehe mittlerweile den Wald vor lauter Bäumen nicht mehr. :?

Die alte Anwendung wurde wie folgt unter Apache konfiguriert:

Code: Select all
# grep "ldap" /etc/httpd/conf/httpd.conf
LoadModule auth_ldap_module   /usr/lib/httpd/modules/mod_auth_ldap.so

# cat /etc/httpd/conf.d/nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"

<Directory "/usr/lib/nagios/cgi">
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Access - ldap"
   AuthType Basic
   LDAP_Debug On
   LDAP_Protocol_Version 3
   LDAP_Server 192.168.1.22
   LDAP_Port 3268

        Base_DN "DC=bla,DC=blaroot,DC=loc"
        Bind_DN "CN=SU-Nagiosldap,OU=Service Accounts,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc"
        Bind_Pass "..."
        UID_Attr sAMAccountName
        Group_Attr member
        SupportNestedGroups Off
        require group "CN=BLA-SG-Nagios,OU=Admins Groups,OU=Administration,OU=BLA-Services"

</Directory>

Alias /nagios "/usr/share/nagios"
<Directory "/usr/share/nagios">
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Access - ldap"
   AuthType Basic

   LDAP_Debug On
   LDAP_Protocol_Version 3
   LDAP_Server 192.168.1.22
   LDAP_Port 3268

        Base_DN "DC=bla,DC=blaroot,DC=loc"
        Bind_DN "CN=SU-Nagiosldap,OU=Service Accounts,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc"
        Bind_Pass "..."
        UID_Attr sAMAccountName
        Group_Attr member
        SupportNestedGroups Off
        require group "CN=BLA-SG-Nagios,OU=Admins Groups,OU=Administration,OU=BLA-Services"

</Directory>


Im neuen Apache sieht das Ganze derzeit wie folgt aus:

Code: Select all
# grep "ldap" /etc/httpd/conf/httpd.conf
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so

# cat /etc/httpd/conf.d/nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">

    Options ExecCGI
    AllowOverride None
    AuthName "Nagios Access"
    AuthType Basic
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative Off
    AuthLDAPBindDN "CN=SU-Nagiosldap,OU=Service Accounts,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc"
    AuthLDAPBindPassword "..."
    AuthLDAPURL "ldap://192.168.1.22:3268/DC=bla,DC=blaroot,DC=loc"
    require ldap-group "CN=BLA-SG-NagiosAccess,OU=Admins Groups,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc?sAMAccountName?sub?(objectClass=*)"

</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">

    Options ExecCGI
    AllowOverride None
    AuthName "Nagios Access"
    AuthType Basic
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative Off
    AuthLDAPBindDN "CN=SU-Nagiosldap,OU=Service Accounts,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc"
    AuthLDAPBindPassword "..."
    AuthLDAPURL "ldap://192.168.1.22:3268/DC=bla,DC=blaroot,DC=loc"
    require ldap-group "CN=BLA-SG-NagiosAccess,OU=Admins Groups,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc?sAMAccountName?sub?(objectClass=*)"

</Directory>


Vielleicht hat ja einer von Euch einen Tipp für mich, vielen Dank euch im Voraus! :)
Last edited by Ovim-Obscurum on 15. December 2011 10:35, edited 1 time in total.
Ovim-Obscurum
 
Posts: 2
Joined: 06. December 2011 07:27
Location: IT-Administrator
Operating System: RedHat 6.1

Re: LDAP-Authentifizierung funktioniert nach Umzug nicht meh

Postby Ovim-Obscurum » 15. December 2011 10:35

Habe die Lösung selbst herausgefunden, die LDAPUrl war fehlerhaft und das require ldap-group-Argument darf nicht in Anführungsstriche gesetzt werden.

Die funktionierende Konfiguration sieht wie folgt aus:

Code: Select all
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">

    Options ExecCGI
    AllowOverride None
    AuthName "Nagios Access"
    AuthType Basic
    AuthBasicProvider ldap
    AuthzLDAPProtocolVersion 3
    AuthzLDAPAuthoritative On
    AuthLDAPBindDN "CN=SU-Nagiosldap,OU=Service Accounts,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc"
    AuthLDAPBindPassword "..."
    AuthLDAPURL "ldap://192.168.1.22:3268/?userPrincipalName?sub"
    require ldap-group CN=BLA-SG-NagiosAccess,OU=Admins Groups,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc

</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">

    Options ExecCGI
    AllowOverride None
    AuthName "Nagios Access"
    AuthType Basic
    AuthBasicProvider ldap
    AuthzLDAPProtocolVersion 3
    AuthzLDAPAuthoritative On
    AuthLDAPBindDN "CN=SU-Nagiosldap,OU=Service Accounts,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc"
    AuthLDAPBindPassword "..."
    AuthLDAPURL "ldap://192.168.1.22:3268/?userPrincipalName?sub"
    require ldap-group CN=BLA-SG-NagiosAccess,OU=Admins Groups,OU=Administration,OU=BLA-Services,DC=bla,DC=blaroot,DC=loc

</Directory>


Beste Grüße.
Ovim-Obscurum
 
Posts: 2
Joined: 06. December 2011 07:27
Location: IT-Administrator
Operating System: RedHat 6.1


Return to Apache

Who is online

Users browsing this forum: No registered users and 11 guests