1/ |A vérifier si les modules mod_ldap et mod_authnz_ldap sont chargés dans apache.

|2/ Petite question : ton serveur Ldap accepte-t-il les connexions TLS ?

3/ A essayer :
D'après la doc d'Apache : http://httpd.apache.org/docs/2.2/mod/mod_ldap.html#usingssltls

**********
The ability to create an SSL and TLS connections to an LDAP server is defined by the directives | LDAPTrustedGlobalCert <http://httpd.apache.org/docs/2.2/mod/mod_ldap.html#%20%20%20%20ldaptrustedglobalcert>|, | LDAPTrustedClientCert <http://httpd.apache.org/docs/2.2/mod/mod_ldap.html#%20%20%20%20ldaptrustedclientcert>| and | LDAPTrustedMode <http://httpd.apache.org/docs/2.2/mod/mod_ldap.html#%20%20%20%20ldaptrustedmode>|. These directives specify the CA and optional client certificates to be used, as well as the type of encryption to be used on the connection (none, SSL or TLS/STARTTLS).

| # Establish an SSL LDAP connection on port 636. Requires that
# mod_ldap and mod_authnz_ldap be loaded. Change the
# "yourdomain.example.com" to match your domain.

LDAPTrustedGlobalCert CA_DER /certs/certfile.der

<Location /ldap-status>
SetHandler ldap-status
Order deny,allow
Deny from all
Allow from yourdomain.example.com
AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
AuthzLDAPAuthoritative off
Require valid-user
</Location> |

| # Establish a TLS LDAP connection on port 389. Requires that
# mod_ldap and mod_authnz_ldap be loaded. Change the
# "yourdomain.example.com" to match your domain.

LDAPTrustedGlobalCert CA_DER /certs/certfile.der

<Location /ldap-status>
SetHandler ldap-status
Order deny,allow
Deny from all
Allow from yourdomain.example.com
AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one *TLS*
AuthzLDAPAuthoritative off
Require valid-user
</Location> |

***********

Jean-Max Redonnet a écrit :
Bonjour,

Malgré tous mes efforts, multiples et répétés, je ne parviens définitivement pas à configurer l'authentification LDAP en TLS sur mon serveur Apache2.2.

Voilà ce que j'ai mis dans le /etc/apache2/ports.conf inclus dans /etc/apache2/apache2.conf

LDAPTrustedGlobalCert CA_BASE64 /etc/ssl/cacert.pem

<VirtualHost 130.120.xxx.xxx:80>

    LDAPTrustedClientCert CERT_BASE64 /etc/ssl/certs/xxx.ups-tlse.fr.crt
    LDAPTrustedClientCert KEY_BASE64 /etc/ssl/private/xxx.ups-tlse.fr.key
    LDAPTrustedMode TLS

    <Location /ldap-status>
        SetHandler ldap-status
        order deny,allow
        allow from xxx.ups-tlse.fr <http://xxx.ups-tlse.fr>
        allow from xxx.ups-tlse.fr <http://xxx.ups-tlse.fr>
        AuthType basic
        AuthName "Auth LDAP"
        AuthBasicProvider ldap
AuthLDAPURL ldap://xxx.ups-tlse.fr/ou=Users,ou=People,dc=xxx,dc=ups-tlse,dc=fr?uid <http://xxx.ups-tlse.fr/ou=Users,ou=People,dc=xxx,dc=ups-tlse,dc=fr?uid>
        AuthzLDAPAuthoritative off
        require valid-user
    </Location>

</VirtualHost>

OpenLDAP est installé et marche bien. Apache idem.
Mes certificats sont bons (je les utilise par ailleurs avec succès).

Je ne vois pas d'où peut venir le problème. Alors avant de switcher vers le module d'authentification via PAM (qui comble de l'ironie utilise LDAP avec bonheur), je m'en remet aux gens qui savent...

Dans la doc d'Apache, j'ai trouvé ça :
"The documentation for the SDK claims to support both SSL and STARTTLS, however STARTTLS does not seem to work on all versions of the SDK. The SSL/TLS mode can be set using the LDAPTrustedMode parameter. If an ldaps:// URL is specified, SSL mode is forced. The OpenLDAP documentation notes that SSL (ldaps://) support has been deprecated to be replaced with TLS, although the SSL functionality still works." Alors, je me dis que je suis peut-être pas le seul à rencontrer des problèmes...

Si vous avez des retours d'expérience ou des suggestions, je suis tout ouï

Merci d'avance.

jMax


Reply via email to