svn - Subversion Apache2.2 LDAPS authentication failed -


os: redhat linux subversion: 1.5.0 apache: 2.2.17

httpd.conf:

ldapsharedcachesize 200000 ldapcacheentries 1024 ldapcachettl 600 ldapopcacheentries 1024 ldapopcachettl 600  <location /svn> dav svn svnparentpath /home/svnroot/repository authzsvnaccessfile /home/svnroot/repository/svn_access_file authtype basic authbasicprovider ldap authzldapauthoritative off authldapurl "ldaps://master.ldap.ebupt.com:636/ou=staff,dc=ebupt,dc=com?uid?sub?(objectclass=*)" ss l authname "subversion.resository" require valid-user </location> 

apache error_log:

[thu feb 24 16:48:00 2011] [debug] mod_authnz_ldap.c(403): [client 10.1.85.181] [25242] auth_ldap uthenticate: using url ldaps://master.ldap.ebupt.com:636/ou=staff,dc=ebupt,dc=com?uid?sub?(objectcl ass=*) [thu feb 24 16:48:00 2011] [info] [client 10.1.85.181] [25242] auth_ldap authenticate: user jinjian kang authentication failed; uri /svn [ldap: ldap_simple_bind_s() failed][can't contact ldap server] 

ping master.ldap.ebupt.com ok.

my ftp ldaps authentication ok below:

server:master.ldap.ebupt.com port:636 enable ssl:checked base dn:ou=staff,dc=ebupt,dc=com anonymous:checked search filter:(objectclass=*) user dn attribute:uid search scope:subtree

thanks.

"can't contact ldap server" can mean bunch of things, if ldap server reachable , you're using simple bind on ssl here, means apache doesn't trust certificate ldap server presenting.

you need tell apache certificate can create ssl connection.

this section of apache docs need: http://httpd.apache.org/docs/2.2/mod/mod_ldap.html#usingssltls

the best way obtain ca certificate ca signed certificate on ldap servers, , use ldaptrustedglobalcert directive. example, 1 of boxes:

ldaptrustedglobalcert cert_base64 /etc/openldap/cacerts/cacert.pem 

how go obtaining ca cert varies; ldap servers running certs signed our own ca, can ca cert. setup may different; consult whoever looks after ldap server.

you can obtain certificate ldap server presents using openssl tools:

openssl s_client -connect your.ldap.host:636 2>&1 | sed -ne '/-begin certificate-/,/-end certificate-/p' 

that'll display certificate. copy (including begin certificate , end certificate) file.

now add directive:

ldaptrustedglobalcert cert_base64 /path/to/your/cert/file 

to top of apache configuration. restart apache, , you're done.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -