httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Tischler <>
Subject [users@httpd] LDAP authentication with password encryption from browser to web server
Date Fri, 24 Sep 2010 21:28:17 GMT
  I have been looking through a lot of documentation on this 
subject, both on and elsewhere, and I can't seem to 
find an answer to the following question:

Our Apache web server (version 2.2.11 running on Solaris 10) is 
currently authenticating users via LDAP successfully.  But, we 
would like to have an *encrypted* password sent from *the 
browser to the Apache web server* when authenticating via LDAP.  
I understand that encryption is performed from the web server to 
the LDAP server by using ldaps, which we are using, but we are 
getting complaints that the password is traveling from the 
users' web browsers to our Apache web server in the clear (not 
encrypted).  The problem really requires that the web browsers 
and Apache support an encrypted authentication over http instead 
of counting on wrapping everything via https.  It would be nice 
if the public key encryption worked between the browser and 
Apache for the password part.

I understand that I could force the users to use an https URL 
instead of an http URL, but that seems like it would be 
overkill.  If that is the only solution to this issue, then we 
would really want the user to authenticate over https, but then 
fall back to http for all of the rest of the communications to 
the web server so as not to incur the inherent performance 
penalty of https.  Any hints on how to do that 
effectively/efficiently would be welcome in that case.

I also understand that using the Digest method of authentication 
(vs. Basic) does not work with LDAP, because, if I understand it 
correctly, this method doesn't even send the password, which, of 
course, LDAP would need.

Any help in understanding what the best approach is would be 
welcome.  Thanks for your consideration.  I'm hoping that this 
is somehow supported.  I did not see any kind of bug/enhancement 
on this topic in Apache's Bugzilla.



I have the following in my .htaccess file (with certain things 

AuthName "Enter your Corporate Short Login (CSL)"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative  off
AuthLDAPUrl ldaps://...:1793/dc=internal,dc=users,dc=alcatel?uid
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthLDAPBindPassword ...
Require valid-user

I have the following in my httpd.conf file (I cut out a lot of 
what I thought would be extraneous):

# This is the main Apache HTTP server configuration file.  It 
contains the
# configuration directives that give the server its instructions.
# See <URL:> for detailed 
# In particular, see
# <URL:>
# for a discussion of each configuration directive.
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If 
you are unsure
# consult the online docs. You have been warned.

# Dynamic Shared Object (DSO) Support
# To be able to use the functionality of a module which was 
built as a DSO you
# have to place corresponding `LoadModule' lines at this 
location so the
# directives contained in it are actually available _before_ 
they are used.
# Statically compiled modules (those listed by `httpd -l') do 
not need
# to be loaded here.
# Example:
# LoadModule foo_module modules/
LoadModule authn_file_module modules/
         # dal - 2009-02-23 - comment out the dbm cause it no work
#LoadModule authn_dbm_module modules/
LoadModule authn_anon_module modules/
LoadModule authn_dbd_module modules/
LoadModule authn_default_module modules/
LoadModule authz_host_module modules/
LoadModule authz_groupfile_module modules/
LoadModule authz_user_module modules/
         # dal - 2009-02-23 - comment out the dbm cause it no work
#LoadModule authz_dbm_module modules/
LoadModule authz_owner_module modules/
LoadModule authnz_ldap_module modules/
LoadModule authz_default_module modules/
LoadModule auth_basic_module modules/
LoadModule auth_digest_module modules/
LoadModule dbd_module modules/
LoadModule dumpio_module modules/
LoadModule ext_filter_module modules/
LoadModule include_module modules/
LoadModule filter_module modules/
LoadModule substitute_module modules/
LoadModule deflate_module modules/
LoadModule ldap_module modules/
LoadModule log_config_module modules/
LoadModule log_forensic_module modules/
LoadModule logio_module modules/
LoadModule env_module modules/
LoadModule mime_magic_module modules/
LoadModule cern_meta_module modules/
LoadModule expires_module modules/
LoadModule headers_module modules/
LoadModule ident_module modules/
LoadModule usertrack_module modules/
LoadModule unique_id_module modules/
LoadModule setenvif_module modules/
LoadModule version_module modules/
LoadModule ssl_module modules/
LoadModule mime_module modules/
LoadModule dav_module modules/
LoadModule status_module modules/
LoadModule autoindex_module modules/
LoadModule asis_module modules/
LoadModule info_module modules/
LoadModule cgi_module modules/
LoadModule dav_fs_module modules/
LoadModule vhost_alias_module modules/
LoadModule negotiation_module modules/
LoadModule dir_module modules/
LoadModule imagemap_module modules/
LoadModule actions_module modules/
LoadModule speling_module modules/
LoadModule userdir_module modules/
LoadModule alias_module modules/
LoadModule rewrite_module modules/
LoadModule php5_module        modules/

# Configuration and logfile names: If the filenames you specify 
for many
# of the server's control files begin with "/" (or "drive:/" for 
Win32), the
# server will use that explicit path.  If the filenames do *not* 
# with "/", the value of ServerRoot is prepended -- so 
# with ServerRoot set to "/opt/exp/lib/apache2.2" will be 
interpreted by the
# server as "/opt/exp/lib/apache2.2/logs/foo_log".

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile 
# at a local disk.  If you wish to share the same ServerRoot for 
# httpd daemons, you will need to change at least LockFile and 
ServerRoot "..."

# This is the main server configuration file. See URL
# for instructions.

# Do NOT simply read the instructions in here without understanding
# what they do, if you are unsure consult the online docs. You 
have been
# warned.

# Originally by Rob McCool

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.

Listen ...:...

# HostnameLookups: Log the names of clients or just their IP numbers
#   e.g. (on) or (off)
HostnameLookups off


# 'Main' server configuration
# The directives in this section set up the values used by the 
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
# All of these directives may appear inside <VirtualHost> 
# in which case these default settings will be overridden for the
# virtual host being defined.

# ServerAdmin: Your address, where problems with the server 
should be
# e-mailed.  This address appears on some server-generated 
pages, such
# as error documents.  e.g.

# ServerName gives the name and port that the server uses to 
identify itself.
# This can often be determined automatically, but we recommend 
you specify
# it explicitly to prevent problems during startup.
# If your host doesn't have a registered DNS name, enter its IP 
address here.

ServerName ...

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this 
directory, but
# symbolic links and aliases may be used to point to other 

DocumentRoot "..."

# UserDir: The name of the directory which is appended onto a 
user's home
# directory if a ~user request is received.

UserDir public_html


# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random 
#       but a statically compiled-in mod_ssl.

<IfModule ssl_module>
         SSLRandomSeed startup builtin
         SSLRandomSeed connect builtin

# The following directive disables keepalives and HTTP header 
flushes for
# Netscape 2.x and browsers which spoof it. There are known 
problems with
# these

BrowserMatch Mozilla/2 nokeepalive

# BindAddress: You can support virtual hosts with this option. 
This option
# is used to tell the server which IP address to listen to. It 
can either
# contain "*", an IP address, or a fully qualified Internet 
domain name.
# See also the VirtualHost directive.

#BindAddress *

# TransferLog: The location of the transfer log file. If this 
does not
# start with /, ServerRoot is prepended to it.

TransferLog logs/access_log

# PidFile: The file the server should log its pid to
PidFile logs/

# ScoreBoardFile: File used to store internal server process 
# Not all architectures require this.  But if yours does (you'll 
know because
# this file is created when you run Apache) then you *must* 
ensure that
# no two invocations of Apache share the same scoreboard file.
ScoreBoardFile logs/apache_status

# CacheNegotiatedDocs: By default, Apache sends Pragma: no-cache 
with each
# document that was negotiated on the basis of content. This 
asks proxy
# servers not to cache the document. Uncommenting the following 
line disables
# this behavior, and proxies will be allowed to cache the documents.

# CacheNegotiatedDocs

# Timeout: The number of seconds before receives and sends time out

Timeout 1200

# KeepAlive: Whether or not to allow persistent connections 
(more than
# one request per connection). Set to "Off" to deactivate.

KeepAlive On

# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited 
# We reccomend you leave this number high, for maximum performance.

MaxKeepAliveRequests 100

# KeepAliveTimeout: Number of seconds to wait for the next request

KeepAliveTimeout 15

# Server-pool size regulation.  Rather than making you guess how 
# server processes you need, Apache dynamically adapts to the 
load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle 
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).

# It does this by periodically checking how many servers are waiting
# for a request.  If there are fewer than MinSpareServers, it 
# a new spare.  If there are more than MaxSpareServers, some of the
# spares die off.  These values are probably OK for most sites ---

MinSpareServers 5
MaxSpareServers 16

# Number of servers to start --- should be a reasonable ballpark 

StartServers 5

# Limit on total number of servers running, i.e., limit on the 
# of clients who can simultaneously connect --- if this limit is 
# reached, clients will be LOCKED OUT, so it should NOT BE SET 
# It is intended mainly as a brake to keep a runaway server from 
# Unix with it as it spirals down...

MaxClients 254

# MaxRequestsPerChild: the number of requests each child process is
#  allowed to process before the child dies.
#  The child will exit so as to avoid problems after prolonged 
use when
#  Apache (and maybe the libraries it uses) leak.  On most 
systems, this
#  isn't really needed, but a few (such as Solaris) do have 
notable leaks
#  in the libraries.

MaxRequestsPerChild 128

# Proxy Server directives. Uncomment the following line to
# enable the proxy server:

#ProxyRequests On

# To enable the cache as well, edit and uncomment the following 

#CacheRoot /usr/local/etc/httpd/proxy
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1


# AccessFileName: The name of the file to look for in each directory
# for access control information.

AccessFileName .htaccess


<Directory />
         Options FollowSymLinks ExecCGI Indexes Includes
         AllowOverride None
         Order deny,allow
         Deny from all

<Directory /home>
         AddType text/html .cgi .pl
         AddHandler cgi-script .cgi .pl
         AddType application/x-httpd-php .php
         Options ExecCGI FollowSymLinks Includes Indexes


LDAPSHaredCacheSize 20000
LDAPCacheEntries 1024
LDAPCacheTTL 600
LDAPOpCacheEntries 1024
LDAPOpCacheTTL 600
LDAPTrustedMode SSL
LDAPTrustedGlobalCert CA_BASE64 /info/www/rootCa.pem

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message