Sponsored Content
Special Forums UNIX and Linux Applications Apache 2, mod_ldap, mod_auth_ldap, SSL Post 302446668 by zaxxon on Thursday 19th of August 2010 10:01:19 AM
Old 08-19-2010
Apache 2, mod_ldap, mod_auth_ldap, SSL

Hi,
I have following problem. I have an Apache httpd v2 running. One of it's URLs is secured by an LDAP authentication encrypted via SSL. This works fine with the given directives. Currently there is following directive to tell with which LDAP server to authenticate:

Code:
AuthLDAPURL "ldaps://10.1.2.3/ou=users,o=company,c=com"

All is fine as long as I use IP-addresses. When changing this to a hostname in short form or as FQDN or even an alias from DNS (that can be all reached without problems, then I get the following in the log the modules produce for SSL:
Code:
[Thu Aug 19 15:38:29 2010] [warn] [client 10.8.4.24] [323614] auth_ldap authenticate: user someuser authentication failed;
 URI /somedir [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server]

When I change ldaps to ldap so that SSL is not used, I can use IPs and names in any way I want. Adding port 636 explicitly when trying names with ldaps does not make a difference.
I checked all directives from mod_ldap and mod_auth_ldap but couldn't find any that might relate to this.
Also I am not sure if the certificate I got from our CA has some information in it like, that might relate to this problem (I doubt that).

I googled also a lot and found similar things but often without usage of SSL and only 1 thread in some mailing list where the guy solved it but didn't describe it in detail.

So any hint is very welcome, thanks.

Cheers
zaxxon
 

10 More Discussions You Might Find Interesting

1. Solaris

Apache with SSL problem

Hi All, I'm attempting to build Apache 1.3.27 on a new Solaris 9 system. I am using following "Option 2" in the INSTALL of the mod_ssl-2.8.12-1.3.27, and I'm stumped. After I configure and make all the required components the make of the Apache server itself stops at: flex... (2 Replies)
Discussion started by: b_manu78
2 Replies

2. HP-UX

Apache and SSL

When everytime I start apache, it asks me to enter pass phrase, and I have to enter the pass phrase manually. I would like to write a script to monitor the apache, such that it will check the apache status, if it is stopped, then start it automatically. However, the script fails since the pass... (1 Reply)
Discussion started by: alfredo
1 Replies

3. UNIX for Advanced & Expert Users

Apache ssl questions for experts

Hi, I have configured apache 2.0.59 with mod_ssl to set up a proxy to my app server. Incomming traffic https outgoing http. The listen port for the ssl port is 8050 not 443. When I start the server and I test it i get an error message. I googled for it and found the following expaination. ... (3 Replies)
Discussion started by: elvis00
3 Replies

4. Solaris

SSL key Apache

We are running Apache 1.3 on solaris 8 we have renewed our ssl key with verisign. They have confirmed renewel and new ssl certifcate is appended to the end of the email. out apache config file has two directives SSLCertificateFile /export/home/apache/conf/ssl.crt/xxxx.crt SSLCertificationKeyFile... (2 Replies)
Discussion started by: Tirmazi
2 Replies

5. Web Development

Apache SSL Help

I had to update the CA Trusted Chains on two different UNIX servers running Apache. After looking through some documentation, it said that after the new CA's were installed, I had to run the /usr/ccs/bin/make command in order to create the symbolic links for apache to recognize the certs. On the... (1 Reply)
Discussion started by: camerodity
1 Replies

6. Web Development

apache ssl routing 2 dns

Hi i'm looking for some advice on apache ssl routing for 2 url.Fyi one url is certificate is verified by GeoTrust and another url on the other site certificate is verified by Verisgn.Is that possible to routing between this two url. Here is my scenario I have an https:// site running on an... (0 Replies)
Discussion started by: netxus
0 Replies

7. Web Development

Apache, cgi script run twice when ssl, once when not ssl

I have interesting problem. https:/host/some/x.cgi - this script has run twice when I call this url But http:/host/some/x.cgi work fine, only once. Output is text/plain. If I change output format to the Content-type text/html, then both urls works fine - executed only once. (2 Replies)
Discussion started by: kshji
2 Replies

8. Web Development

Apache - ModSSL (SSL Version?)

Does anyone know where Apache's use of SSL_VERSION_LIBRARY is defined and pulled from, in regard to headers? So far, I've tracked it down to mod_ssl. Which is fine, however, when I recompile mod_ssl with a new version of OpenSSL, and install the module, the request headers still report the old... (0 Replies)
Discussion started by: sun2ecliptic
0 Replies

9. IP Networking

configure apache to work with ssl

Hi, I need help to configure the apache to work with ssl. I have managed to create self-signed certificate according to the instruction in the following link. So I have the crt file and the key file. however when I add: <Virtualhost *:443> SSLEngine on ... (1 Reply)
Discussion started by: programAngel
1 Replies

10. Linux

Apache wildcard ssl on subdomain serves same page for non ssl virtualhosts

Issue observed: I have configured ng.my-site.com using widlcard ssl cert. When I hit https://www.my-site.com it loads ng.my-site.com website! please advise if I missed any concept / configs... Thank you! httpd.conf <VirtualHost *:80> ServerName www.my-site.com ServerAdmin... (0 Replies)
Discussion started by: ashokvpp
0 Replies
Net::LDAP::Security(3)					User Contributed Perl Documentation				    Net::LDAP::Security(3)

NAME
Net::LDAP::Security - Security issues with LDAP connections SYNOPSIS
none DESCRIPTION
This document discusses various security issues relating to using LDAP and connecting to LDAP servers, notably how to manage these potential vulnerabilities: o do you know that you are connected to the right server o can someone sniff your passwords/userids from the directory connection o can someone sniff other confidential information from the directory connection Net::LDAP provides ways to address these vulnerabilities: through the use of LDAPS, or LDAPv3 and TLS, and/or the use of SASL. Each of these will be explained below. How does an LDAP connection work A normal LDAPv2 or LDAPv3 connection works by the client connecting directly to port 389 (by default), and then issuing various LDAP requests like search, add, etc. There is no way to guarantee that an LDAP client is connected to the right LDAP server. Hackers could have poisoned your DNS, so 'ldap.example.com' could be made to point to 'ldap.hacker.com'. Or they could have installed their own server on the correct machine. It is in the nature of the LDAP protocol that all information goes between the client and the server in 'plain text'. This is a term used by cryptographers to describe unencrypted and recoverable data, so even though LDAP can transfer binary values like JPEG photographs, audio clips and X.509 certificates, everything is still considered 'plain text'. If these vulnerabilities are an issue to, then you should consider the other possibilities described below, namely LDAPS, LDAPv3 and TLS, and SASL. How does an LDAPS connection work LDAPS is an unofficial protocol. It is to LDAP what HTTPS is to HTTP, namely the exact same protocol (but in this case LDAPv2 or LDAPv3) running over a secured SSL ("Secure Socket Layer") connection to port 636 (by default). Not all servers will be configured to listen for LDAPS connections, but if they do, it will commonly be on a different port from the normal plain text LDAP port. Using LDAPS can potentially solve the vulnerabilities described above, but you should be aware that simply "using" SSL is not a magic bullet that automatically makes your system "secure". First of all, LDAPS can solve the problem of verifying that you are connected to the correct server. When the client and server connect, they perform a special SSL 'handshake', part of which involves the server and client exchanging cryptographic keys, which are described using X.509 certificates. If the client wishes to confirm that it is connected to the correct server, all it needs to do is verify the server's certificate which is sent in the handshake. This is done in two ways: 1. check that the certificate is signed (trusted) by someone that you trust, and that the certificate hasn't been revoked. For instance, the server's certificate may have been signed by Verisign (www.verisign.com), and you decide that you want to trust Verisign to sign legitimate certificates. 2. check that the least-significant cn RDN in the server's certificate's DN is the fully-qualified hostname of the hostname that you connected to when creating the LDAPS object. For example if the server is <cn=ldap.example.com,ou=My department,o=My company>, then the RDN to check is cn=ldap.example.com. You can do this by using the cafile and capath options when creating a Net::LDAPS object, and by setting the verify option to 'require'. To prevent hackers 'sniffing' passwords and other information on your connection, you also have to make sure the encryption algorithm used by the SSL connection is good enough. This is also something that gets decided by the SSL handshake - if the client and server cannot agree on an acceptable algorithm the connection is not made. Net::LDAPS will by default use all the algorithms built into your copy of OpenSSL, except for ones considered to use "low" strength encryption, and those using export strength encryption. You can override this when you create the Net::LDAPS object using the 'ciphers' option. Once you've made the secure connection, you should also check that the encryption algorithm that is actually being used is one that you find acceptable. Broken servers have been observed in the field which 'fail over' and give you an unencrypted connection, so you ought to check for that. How does LDAP and TLS work SSL is a good solution to many network security problems, but it is not a standard. The IETF corrected some defects in the SSL mechanism and published a standard called RFC 2246 which describes TLS ("Transport Layer Security"), which is simply a cleaned up and standardized version of SSL. You can only use TLS with an LDAPv3 server. That is because the standard (RFC 4511) for LDAP and TLS requires that the normal LDAP connection (ie., on port 389) can be switched on demand from plain text into a TLS connection. The switching mechanism uses a special extended LDAP operation, and since these are not legal in LDAPv2, you can only switch to TLS on an LDAPv3 connection. So the way you use TLS with LDAPv3 is that you create your normal LDAPv3 connection using "Net::LDAP::new()", and then you perform the switch using "Net::LDAP::start_tls()". The "start_tls()" method takes pretty much the same arguments as "Net::LDAPS::new()", so check above for details. How does SASL work SASL is an authentication framework that can be used by a number of different Internet services, including LDAPv3. Because it is only a framework, it doesn't provide any way to authenticate by itself; to actually authenticate to a service you need to use a specific SASL mechanism. A number of mechanisms are defined, such as CRAM-MD5. The use of a mechanism like CRAM-MD5 provides a solution to the password sniffing vulnerability, because these mechanisms typically do not require the user to send across a secret (eg., a password) in the clear across the network. Instead, authentication is carried out in a clever way which avoids this, and so prevents passwords from being sniffed. Net::LDAP supports SASL using the Authen::SASL class. Currently the only Authen::SASL subclasses (ie., SASL mechanism) available are CRAM-MD5 and EXTERNAL. Some SASL mechanisms provide a general solution to the sniffing of all data on the network vulnerability, as they can negotiate confidential (ie., encrypted) network connections. Note that this is over and above any SSL or TLS encryption! Unfortunately, perl's Authen::SASL code cannot negotiate this. SEE ALSO
Net::LDAP, Net::LDAPS, Authen::SASL ACKNOWLEDGEMENTS
Jim Dutton <jimd@dutton3.it.siu.edu> provided lots of useful feedback on the early drafts. AUTHOR
Chris Ridd <chris.ridd@isode.com> Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>. COPYRIGHT
Copyright (c) 2001-2004 Chris Ridd. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-07-21 Net::LDAP::Security(3)
All times are GMT -4. The time now is 12:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy