]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_ldap.html.en
Prelim docs
[apache] / docs / manual / mod / mod_ldap.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
5 <!--
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7               This file is generated from xml source: DO NOT EDIT
8         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9       -->
10 <title>mod_ldap - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 </script>
16
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body>
19 <div id="page-header">
20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
21 <p class="apache">Apache HTTP Server Version 2.5</p>
22 <img alt="" src="../images/feather.gif" /></div>
23 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
24 <div id="path">
25 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
26 <div id="page-content">
27 <div id="preamble"><h1>Apache Module mod_ldap</h1>
28 <div class="toplang">
29 <p><span>Available Languages: </span><a href="../en/mod/mod_ldap.html" title="English">&nbsp;en&nbsp;</a> |
30 <a href="../fr/mod/mod_ldap.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a></p>
31 </div>
32 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>LDAP connection pooling and result caching services for use
33 by other LDAP modules</td></tr>
34 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
35 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>ldap_module</td></tr>
36 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>util_ldap.c</td></tr></table>
37 <h3>Summary</h3>
38
39     <p>This module was created to improve the performance of
40     websites relying on backend connections to LDAP servers. In
41     addition to the functions provided by the standard LDAP
42     libraries, this module adds an LDAP connection pool and an LDAP
43     shared memory cache.</p>
44
45     <p>To enable this module, LDAP support must be compiled into
46     apr-util. This is achieved by adding the <code>--with-ldap</code>
47     flag to the <code class="program"><a href="../programs/configure.html">configure</a></code> script when building
48     Apache.</p>
49
50     <p>SSL/TLS support is dependent on which LDAP toolkit has been
51     linked to <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>. As of this writing, APR-util supports:
52     <a href="http://www.openldap.org/">OpenLDAP SDK</a> (2.x or later),
53     <a href="http://developer.novell.com/ndk/cldap.htm">Novell LDAP
54     SDK</a>, <a href="https://wiki.mozilla.org/LDAP_C_SDK">
55     Mozilla LDAP SDK</a>, native Solaris LDAP SDK (Mozilla based) or the
56     native Microsoft LDAP SDK. See the <a href="http://apr.apache.org">APR</a>
57     website for details.</p>
58
59 </div>
60 <div id="quickview"><h3>Topics</h3>
61 <ul id="topics">
62 <li><img alt="" src="../images/down.gif" /> <a href="#exampleconfig">Example Configuration</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#pool">LDAP Connection Pool</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#cache">LDAP Cache</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#usingssltls">Using SSL/TLS</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#settingcerts">SSL/TLS Certificates</a></li>
67 </ul><h3 class="directives">Directives</h3>
68 <ul id="toc">
69 <li><img alt="" src="../images/down.gif" /> <a href="#ldapcacheentries">LDAPCacheEntries</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#ldapcachettl">LDAPCacheTTL</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#ldapconnectionpoolttl">LDAPConnectionPoolTTL</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#ldapconnectiontimeout">LDAPConnectionTimeout</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#ldaplibrarydebug">LDAPLibraryDebug</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#ldapopcacheentries">LDAPOpCacheEntries</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#ldapopcachettl">LDAPOpCacheTTL</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#ldapreferralhoplimit">LDAPReferralHopLimit</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#ldapreferrals">LDAPReferrals</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#ldapretries">LDAPRetries</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#ldapretrydelay">LDAPRetryDelay</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#ldapsharedcachefile">LDAPSharedCacheFile</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#ldapsharedcachesize">LDAPSharedCacheSize</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#ldaptimeout">LDAPTimeout</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#ldaptrustedclientcert">LDAPTrustedClientCert</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#ldaptrustedglobalcert">LDAPTrustedGlobalCert</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#ldaptrustedmode">LDAPTrustedMode</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#ldapverifyservercert">LDAPVerifyServerCert</a></li>
87 </ul>
88 <ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
89 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
90 <div class="section">
91 <h2><a name="exampleconfig" id="exampleconfig">Example Configuration</a></h2>
92     <p>The following is an example configuration that uses
93     <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> to increase the performance of HTTP Basic
94     authentication provided by <code class="module"><a href="../mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code>.</p>
95
96     <pre class="prettyprint lang-config"># Enable the LDAP connection pool and shared
97 # memory cache. Enable the LDAP cache status
98 # handler. Requires that mod_ldap and mod_authnz_ldap
99 # be loaded. Change the "yourdomain.example.com" to
100 # match your domain.
101
102 LDAPSharedCacheSize 500000
103 LDAPCacheEntries 1024
104 LDAPCacheTTL 600
105 LDAPOpCacheEntries 1024
106 LDAPOpCacheTTL 600
107
108 &lt;Location "/ldap-status"&gt;
109     SetHandler ldap-status
110
111     Require host yourdomain.example.com
112
113     Satisfy any
114     AuthType Basic
115     AuthName "LDAP Protected"
116     AuthBasicProvider ldap
117     AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
118     Require valid-user
119 &lt;/Location&gt;</pre>
120
121 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
122 <div class="section">
123 <h2><a name="pool" id="pool">LDAP Connection Pool</a></h2>
124
125     <p>LDAP connections are pooled from request to request. This
126     allows the LDAP server to remain connected and bound ready for
127     the next request, without the need to unbind/connect/rebind.
128     The performance advantages are similar to the effect of HTTP
129     keepalives.</p>
130
131     <p>On a busy server it is possible that many requests will try
132     and access the same LDAP server connection simultaneously.
133     Where an LDAP connection is in use, Apache will create a new
134     connection alongside the original one. This ensures that the
135     connection pool does not become a bottleneck.</p>
136
137     <p>There is no need to manually enable connection pooling in
138     the Apache configuration. Any module using this module for
139     access to LDAP services will share the connection pool.</p>
140
141     <p>LDAP connections can keep track of the ldap client
142     credentials used when binding to an LDAP server. These
143     credentials can be provided to LDAP servers that do not
144     allow anonymous binds during referral chasing. To control
145     this feature, see the
146     <code class="directive"><a href="#ldapreferrals">LDAPReferrals</a></code> and
147     <code class="directive"><a href="#ldapreferralhoplimit">LDAPReferralHopLimit</a></code>
148     directives. By default, this feature is enabled.</p>
149 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
150 <div class="section">
151 <h2><a name="cache" id="cache">LDAP Cache</a></h2>
152
153     <p>For improved performance, <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> uses an aggressive
154     caching strategy to minimize the number of times that the LDAP
155     server must be contacted. Caching can easily double or triple
156     the throughput of Apache when it is serving pages protected
157     with mod_authnz_ldap. In addition, the load on the LDAP server
158     will be significantly decreased.</p>
159
160     <p><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> supports two types of LDAP caching during
161     the search/bind phase with a <em>search/bind cache</em> and
162     during the compare phase with two <em>operation
163     caches</em>. Each LDAP URL that is used by the server has
164     its own set of these three caches.</p>
165
166     <h3><a name="search-bind" id="search-bind">The Search/Bind Cache</a></h3>
167       <p>The process of doing a search and then a bind is the
168       most time-consuming aspect of LDAP operation, especially if
169       the directory is large. The search/bind cache is used to
170       cache all searches that resulted in successful binds.
171       Negative results (<em>i.e.</em>, unsuccessful searches, or searches
172       that did not result in a successful bind) are not cached.
173       The rationale behind this decision is that connections with
174       invalid credentials are only a tiny percentage of the total
175       number of connections, so by not caching invalid
176       credentials, the size of the cache is reduced.</p>
177
178       <p><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> stores the username, the DN
179       retrieved, the password used to bind, and the time of the bind
180       in the cache. Whenever a new connection is initiated with the
181       same username, <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> compares the password
182       of the new connection with the password in the cache. If the
183       passwords match, and if the cached entry is not too old,
184       <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> bypasses the search/bind phase.</p>
185
186       <p>The search and bind cache is controlled with the <code class="directive"><a href="#ldapcacheentries">LDAPCacheEntries</a></code> and <code class="directive"><a href="#ldapcachettl">LDAPCacheTTL</a></code> directives.</p>
187     
188
189     <h3><a name="opcaches" id="opcaches">Operation Caches</a></h3>
190       <p>During attribute and distinguished name comparison
191       functions, <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> uses two operation caches
192       to cache the compare operations. The first compare cache is
193       used to cache the results of compares done to test for LDAP
194       group membership. The second compare cache is used to cache
195       the results of comparisons done between distinguished
196       names.</p>
197
198       <p>Note that, when group membership is being checked, any sub-group
199       comparison results are cached to speed future sub-group comparisons.</p>
200
201       <p>The behavior of both of these caches is controlled with
202       the <code class="directive"><a href="#ldapopcacheentries">LDAPOpCacheEntries</a></code>
203       and <code class="directive"><a href="#ldapopcachettl">LDAPOpCacheTTL</a></code>
204       directives.</p>
205     
206
207     <h3><a name="monitoring" id="monitoring">Monitoring the Cache</a></h3>
208       <p><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> has a content handler that allows
209       administrators to monitor the cache performance. The name of
210       the content handler is <code>ldap-status</code>, so the
211       following directives could be used to access the
212       <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> cache information:</p>
213
214       <pre class="prettyprint lang-config">&lt;Location "/server/cache-info"&gt;
215     SetHandler ldap-status
216 &lt;/Location&gt;</pre>
217
218
219       <p>By fetching the URL <code>http://servername/cache-info</code>,
220       the administrator can get a status report of every cache that is used
221       by <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code> cache. Note that if Apache does not
222       support shared memory, then each <code class="program"><a href="../programs/httpd.html">httpd</a></code> instance has its
223       own cache, so reloading the URL will result in different
224       information each time, depending on which <code class="program"><a href="../programs/httpd.html">httpd</a></code>
225       instance processes the request.</p>
226     
227 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
228 <div class="section">
229 <h2><a name="usingssltls" id="usingssltls">Using SSL/TLS</a></h2>
230
231     <p>The ability to create an SSL and TLS connections to an LDAP server
232     is defined by the directives
233     <code class="directive"><a href="#ldaptrustedglobalcert">LDAPTrustedGlobalCert</a></code>,
234     <code class="directive"><a href="#ldaptrustedclientcert">LDAPTrustedClientCert</a></code>
235      and <code class="directive"><a href="#ldaptrustedmode">LDAPTrustedMode</a></code>.
236     These directives specify the CA and optional client certificates to be used,
237     as well as the type of encryption to be used on the connection (none, SSL or
238     TLS/STARTTLS).</p>
239
240     <pre class="prettyprint lang-config"># Establish an SSL LDAP connection on port 636. Requires that
241 # mod_ldap and mod_authnz_ldap be loaded. Change the
242 # "yourdomain.example.com" to match your domain.
243
244 LDAPTrustedGlobalCert CA_DER /certs/certfile.der
245
246 &lt;Location "/ldap-status"&gt;
247     SetHandler ldap-status
248
249     Require host yourdomain.example.com
250
251     Satisfy any
252     AuthType Basic
253     AuthName "LDAP Protected"
254     AuthBasicProvider ldap
255     AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
256     Require valid-user
257 &lt;/Location&gt;</pre>
258
259
260     <pre class="prettyprint lang-config"># Establish a TLS LDAP connection on port 389. Requires that
261 # mod_ldap and mod_authnz_ldap be loaded. Change the
262 # "yourdomain.example.com" to match your domain.
263
264 LDAPTrustedGlobalCert CA_DER /certs/certfile.der
265
266 &lt;Location "/ldap-status"&gt;
267     SetHandler ldap-status
268
269     Require host yourdomain.example.com
270
271     Satisfy any
272     AuthType Basic
273     AuthName "LDAP Protected"
274     AuthBasicProvider ldap
275     AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS
276     Require valid-user
277 &lt;/Location&gt;</pre>
278
279
280 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
281 <div class="section">
282 <h2><a name="settingcerts" id="settingcerts">SSL/TLS Certificates</a></h2>
283
284     <p>The different LDAP SDKs have widely different methods of setting
285     and handling both CA and client side certificates.</p>
286
287     <p>If you intend to use SSL or TLS, read this section CAREFULLY so as to
288     understand the differences between configurations on the different LDAP
289     toolkits supported.</p>
290
291     <h3><a name="settingcerts-netscape" id="settingcerts-netscape">Netscape/Mozilla/iPlanet SDK</a></h3>
292         <p>CA certificates are specified within a file called cert7.db.
293         The SDK will not talk to any LDAP server whose certificate was
294         not signed by a CA specified in this file. If
295         client certificates are required, an optional key3.db file may
296         be specified with an optional password. The secmod file can be
297         specified if required. These files are in the same format as
298         used by the Netscape Communicator or Mozilla web browsers. The easiest
299         way to obtain these files is to grab them from your browser
300         installation.</p>
301
302         <p>Client certificates are specified per connection using the
303         LDAPTrustedClientCert directive by referring
304         to the certificate "nickname". An optional password may be
305         specified to unlock the certificate's private key.</p>
306
307         <p>The SDK supports SSL only. An attempt to use STARTTLS will cause
308         an error when an attempt is made to contact the LDAP server at
309         runtime.</p>
310
311         <pre class="prettyprint lang-config"># Specify a Netscape CA certificate file
312 LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db
313 # Specify an optional key3.db file for client certificate support
314 LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db
315 # Specify the secmod file if required
316 LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
317 &lt;Location "/ldap-status"&gt;
318     SetHandler ldap-status
319
320     Require host yourdomain.example.com
321
322     Satisfy any
323     AuthType Basic
324     AuthName "LDAP Protected"
325     AuthBasicProvider ldap
326     LDAPTrustedClientCert CERT_NICKNAME &lt;nickname&gt; [password]
327     AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
328     Require valid-user
329 &lt;/Location&gt;</pre>
330
331
332     
333
334     <h3><a name="settingcerts-novell" id="settingcerts-novell">Novell SDK</a></h3>
335
336         <p>One or more CA certificates must be specified for the Novell
337         SDK to work correctly. These certificates can be specified as
338         binary DER or Base64 (PEM) encoded files.</p>
339
340         <p>Note: Client certificates are specified globally rather than per
341         connection, and so must be specified with the LDAPTrustedGlobalCert
342         directive as below. Trying to set client certificates via the
343         LDAPTrustedClientCert directive will cause an error to be logged
344         when an attempt is made to connect to the LDAP server..</p>
345
346         <p>The SDK supports both SSL and STARTTLS, set using the
347         LDAPTrustedMode parameter. If an ldaps:// URL is specified,
348         SSL mode is forced, override this directive.</p>
349
350         <pre class="prettyprint lang-config"># Specify two CA certificate files
351 LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
352 LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
353 # Specify a client certificate file and key
354 LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem
355 LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password]
356 # Do not use this directive, as it will throw an error
357 #LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem</pre>
358
359
360     
361
362     <h3><a name="settingcerts-openldap" id="settingcerts-openldap">OpenLDAP SDK</a></h3>
363
364         <p>One or more CA certificates must be specified for the OpenLDAP
365         SDK to work correctly. These certificates can be specified as
366         binary DER or Base64 (PEM) encoded files.</p>
367
368         <p>Both CA and client certificates may be specified globally
369         (LDAPTrustedGlobalCert) or per-connection (LDAPTrustedClientCert).
370         When any settings are specified per-connection, the global
371         settings are superceded.</p>
372
373         <p>The documentation for the SDK claims to support both SSL and
374         STARTTLS, however STARTTLS does not seem to work on all versions
375         of the SDK. The SSL/TLS mode can be set using the
376         LDAPTrustedMode parameter. If an ldaps:// URL is specified,
377         SSL mode is forced. The OpenLDAP documentation notes that SSL
378         (ldaps://) support has been deprecated to be replaced with TLS,
379         although the SSL functionality still works.</p>
380
381         <pre class="prettyprint lang-config"># Specify two CA certificate files
382 LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
383 LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
384 &lt;Location "/ldap-status"&gt;
385     SetHandler ldap-status
386
387     Require host yourdomain.example.com
388
389     LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
390     LDAPTrustedClientCert KEY_BASE64 /certs/key1.pem
391     # CA certs respecified due to per-directory client certs
392     LDAPTrustedClientCert CA_DER /certs/cacert1.der
393     LDAPTrustedClientCert CA_BASE64 /certs/cacert2.pem
394     Satisfy any
395     AuthType Basic
396     AuthName "LDAP Protected"
397     AuthBasicProvider ldap
398     AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
399     Require valid-user
400 &lt;/Location&gt;</pre>
401
402
403     
404
405     <h3><a name="settingcerts-solaris" id="settingcerts-solaris">Solaris SDK</a></h3>
406
407         <p>SSL/TLS for the native Solaris LDAP libraries is not yet
408         supported. If required, install and use the OpenLDAP libraries
409         instead.</p>
410
411     
412
413     <h3><a name="settingcerts-microsoft" id="settingcerts-microsoft">Microsoft SDK</a></h3>
414
415         <p>SSL/TLS certificate configuration for the native Microsoft
416         LDAP libraries is done inside the system registry, and no
417         configuration directives are required.</p>
418
419         <p>Both SSL and TLS are supported by using the ldaps:// URL
420         format, or by using the LDAPTrustedMode directive accordingly.</p>
421
422         <p>Note: The status of support for client certificates is not yet known
423         for this toolkit.</p>
424
425     
426
427 </div>
428 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
429 <div class="directive-section"><h2><a name="LDAPCacheEntries" id="LDAPCacheEntries">LDAPCacheEntries</a> <a name="ldapcacheentries" id="ldapcacheentries">Directive</a></h2>
430 <table class="directive">
431 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of entries in the primary LDAP cache</td></tr>
432 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPCacheEntries <var>number</var></code></td></tr>
433 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPCacheEntries 1024</code></td></tr>
434 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
435 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
436 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
437 </table>
438     <p>Specifies the maximum size of the primary LDAP cache. This
439     cache contains successful search/binds. Set it to 0 to turn off
440     search/bind caching. The default size is 1024 cached
441     searches.</p>
442
443 </div>
444 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
445 <div class="directive-section"><h2><a name="LDAPCacheTTL" id="LDAPCacheTTL">LDAPCacheTTL</a> <a name="ldapcachettl" id="ldapcachettl">Directive</a></h2>
446 <table class="directive">
447 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Time that cached items remain valid</td></tr>
448 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPCacheTTL <var>seconds</var></code></td></tr>
449 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPCacheTTL 600</code></td></tr>
450 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
451 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
452 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
453 </table>
454     <p>Specifies the time (in seconds) that an item in the
455     search/bind cache remains valid. The default is 600 seconds (10
456     minutes).</p>
457
458 </div>
459 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
460 <div class="directive-section"><h2><a name="LDAPConnectionPoolTTL" id="LDAPConnectionPoolTTL">LDAPConnectionPoolTTL</a> <a name="ldapconnectionpoolttl" id="ldapconnectionpoolttl">Directive</a></h2>
461 <table class="directive">
462 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Discard backend connections that have been sitting in the connection pool too long</td></tr>
463 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPConnectionPoolTTL <var>n</var></code></td></tr>
464 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPConnectionPoolTTL -1</code></td></tr>
465 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
466 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
467 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
468 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Apache HTTP Server 2.3.12 and later</td></tr>
469 </table>
470     <p>Specifies the maximum age, in seconds, that a pooled LDAP connection can remain idle
471     and still be available for use.  Connections are cleaned up when they are next needed,
472     not asynchronously.</p>
473
474     <p>A setting of 0 causes connections to never be saved in the backend
475     connection pool.  The default value of -1, and any other negative value,
476     allows connections of any age to be reused.</p>
477
478     <p>For performance reasons, the reference time used by this directive is
479     based on when the LDAP connection is returned to the pool, not the time
480     of the last successful I/O with the LDAP server.  </p>
481
482     <p>Since 2.4.10, new measures are in place to avoid the reference time
483     from being inflated by cache hits or slow requests.  First, the reference
484     time is not updated if no backend LDAP conncetions were needed. Second,
485     the reference time uses the time the HTTP request was received instead
486     of the time the request is completed.</p>
487
488     <div class="note"><p>This timeout defaults to units of seconds, but accepts
489     suffixes for milliseconds (ms), minutes (min), and hours (h).
490     </p></div>
491
492 </div>
493 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
494 <div class="directive-section"><h2><a name="LDAPConnectionTimeout" id="LDAPConnectionTimeout">LDAPConnectionTimeout</a> <a name="ldapconnectiontimeout" id="ldapconnectiontimeout">Directive</a></h2>
495 <table class="directive">
496 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specifies the socket connection timeout in seconds</td></tr>
497 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPConnectionTimeout <var>seconds</var></code></td></tr>
498 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
499 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
500 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
501 </table>
502     <p>This directive configures the LDAP_OPT_NETWORK_TIMEOUT (or LDAP_OPT_CONNECT_TIMEOUT)
503     option in the underlying LDAP client library, when available.  This value
504     typically controls how long the LDAP client library will wait for the TCP
505     connection to the LDAP server to complete.</p>
506
507     <p> If a connection is not successful with the timeout period, either an error will be
508     returned or the LDAP client library will attempt to connect to a secondary LDAP
509     server if one is specified (via a space-separated list of hostnames in the
510     <code class="directive"><a href="../mod/mod_authnz_ldap.html#authldapurl">AuthLDAPURL</a></code>).</p>
511
512     <p>The default is 10 seconds, if the LDAP client library linked with the
513     server supports the LDAP_OPT_NETWORK_TIMEOUT option.</p>
514
515     <div class="note">LDAPConnectionTimeout is only available when the LDAP client library linked
516     with the server supports the LDAP_OPT_NETWORK_TIMEOUT
517     (or LDAP_OPT_CONNECT_TIMEOUT) option, and the ultimate behavior is
518     dictated entirely by the LDAP client library.
519     </div>
520
521 </div>
522 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
523 <div class="directive-section"><h2><a name="LDAPLibraryDebug" id="LDAPLibraryDebug">LDAPLibraryDebug</a> <a name="ldaplibrarydebug" id="ldaplibrarydebug">Directive</a></h2>
524 <table class="directive">
525 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable debugging in the LDAP SDK</td></tr>
526 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPLibraryDebug <var>7</var></code></td></tr>
527 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>disabled</code></td></tr>
528 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
529 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
530 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
531 </table>
532     <p>Turns on SDK-specific LDAP debug options that generally cause the LDAP
533     SDK to log verbose trace information to the main Apache error log.
534     The trace messages from the LDAP SDK provide gory details that
535     can be useful during debugging of connectivity problems with backend LDAP servers</p>
536
537     <p>This option is only configurable when Apache HTTP Server is linked with
538     an LDAP SDK that implements <code>LDAP_OPT_DEBUG</code> or
539     <code>LDAP_OPT_DEBUG_LEVEL</code>, such as OpenLDAP (a value of 7 is verbose)
540     or Tivoli Directory Server (a value of 65535 is verbose).</p>
541
542     <div class="warning">
543     <p>The logged information will likely contain plaintext credentials being used or
544     validated by LDAP authentication, so care should be taken in protecting and purging
545     the error log when this directive is used.</p>
546     </div>
547
548
549 </div>
550 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
551 <div class="directive-section"><h2><a name="LDAPOpCacheEntries" id="LDAPOpCacheEntries">LDAPOpCacheEntries</a> <a name="ldapopcacheentries" id="ldapopcacheentries">Directive</a></h2>
552 <table class="directive">
553 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of entries used to cache LDAP compare
554 operations</td></tr>
555 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPOpCacheEntries <var>number</var></code></td></tr>
556 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPOpCacheEntries 1024</code></td></tr>
557 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
558 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
559 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
560 </table>
561     <p>This specifies the number of entries <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code>
562     will use to cache LDAP compare operations. The default is 1024
563     entries.  Setting it to 0 disables operation caching.</p>
564
565 </div>
566 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
567 <div class="directive-section"><h2><a name="LDAPOpCacheTTL" id="LDAPOpCacheTTL">LDAPOpCacheTTL</a> <a name="ldapopcachettl" id="ldapopcachettl">Directive</a></h2>
568 <table class="directive">
569 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Time that entries in the operation cache remain
570 valid</td></tr>
571 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPOpCacheTTL <var>seconds</var></code></td></tr>
572 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPOpCacheTTL 600</code></td></tr>
573 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
574 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
575 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
576 </table>
577     <p>Specifies the time (in seconds) that entries in the
578     operation cache remain valid. The default is 600 seconds.</p>
579
580 </div>
581 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
582 <div class="directive-section"><h2><a name="LDAPReferralHopLimit" id="LDAPReferralHopLimit">LDAPReferralHopLimit</a> <a name="ldapreferralhoplimit" id="ldapreferralhoplimit">Directive</a></h2>
583 <table class="directive">
584 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum number of referral hops to chase before terminating an LDAP query.</td></tr>
585 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPReferralHopLimit <var>number</var></code></td></tr>
586 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SDK dependent, typically between 5 and 10</code></td></tr>
587 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
588 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
589 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
590 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
591 </table>
592     <p>This directive, if enabled by the <code class="directive">LDAPReferrals</code> directive,
593     limits the number of referral hops that are followed before terminating an
594     LDAP query.</p>
595
596 <div class="warning">
597 <p> Support for this tunable is uncommon in LDAP SDKs.</p>
598 </div>
599
600 </div>
601 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
602 <div class="directive-section"><h2><a name="LDAPReferrals" id="LDAPReferrals">LDAPReferrals</a> <a name="ldapreferrals" id="ldapreferrals">Directive</a></h2>
603 <table class="directive">
604 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable referral chasing during queries to the LDAP server.</td></tr>
605 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPReferrals <var>On|Off|default</var></code></td></tr>
606 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPReferrals On</code></td></tr>
607 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
608 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
609 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
610 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
611 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The <var>default</var> parameter is available in Apache 2.4.7 and later</td></tr>
612 </table>
613     <p>Some LDAP servers divide their directory among multiple domains and use referrals
614     to direct a client when a domain boundary is crossed. This is similar to a HTTP redirect.
615     LDAP client libraries may or may not chase referrals by default. This directive
616     explicitly configures the referral chasing in the underlying SDK.</p>
617
618
619     <p><code class="directive">LDAPReferrals</code> takes the following values:</p>
620     <dl>
621      <dt>"on"</dt>
622      <dd> <p> When set to "on", the underlying SDK's referral chasing state
623               is enabled, <code class="directive">LDAPReferralHopLimit</code> is used to
624               override the SDK's hop limit, and an LDAP rebind callback is
625               registered.</p></dd>
626      <dt>"off"</dt>
627      <dd> <p> When set to "off", the underlying SDK's referral chasing state
628               is disabled completely.</p></dd>
629      <dt>"default"</dt>
630      <dd> <p> When set to "default", the underlying SDK's referral chasing state
631               is not changed, <code class="directive">LDAPReferralHopLimit</code> is not
632               used to overide the SDK's hop limit, and no LDAP rebind callback is
633               registered.</p></dd>
634     </dl>
635
636     <p>The directive <code class="directive">LDAPReferralHopLimit</code> works in conjunction with
637     this directive to limit the number of referral hops to follow before terminating the LDAP query.
638     When referral processing is enabled by a value of "On", client credentials will be provided,
639     via a rebind callback, for any LDAP server requiring them.</p>
640
641 </div>
642 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
643 <div class="directive-section"><h2><a name="LDAPRetries" id="LDAPRetries">LDAPRetries</a> <a name="ldapretries" id="ldapretries">Directive</a></h2>
644 <table class="directive">
645 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the number of LDAP server retries.</td></tr>
646 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPRetries <var>number-of-retries</var></code></td></tr>
647 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPRetries 3</code></td></tr>
648 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
649 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
650 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
651 </table>
652     <p>The server will retry failed LDAP requests up to
653     <code class="directive">LDAPRetries</code> times.  Setting this
654     directive to 0 disables retries.</p>
655     <p>LDAP errors such as timeouts and refused connections are retryable.</p>
656
657 </div>
658 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
659 <div class="directive-section"><h2><a name="LDAPRetryDelay" id="LDAPRetryDelay">LDAPRetryDelay</a> <a name="ldapretrydelay" id="ldapretrydelay">Directive</a></h2>
660 <table class="directive">
661 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the delay between LDAP server retries.</td></tr>
662 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPRetryDelay <var>seconds</var></code></td></tr>
663 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPRetryDelay 0</code></td></tr>
664 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
665 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
666 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
667 </table>
668     <p>If <code class="directive">LDAPRetryDelay</code> is set to a non-zero
669     value, the server will delay retrying an LDAP request for the
670     specified amount of time.  Setting this directive to 0 will
671     result in any retry to occur without delay.</p>
672
673     <p>LDAP errors such as timeouts and refused connections are retryable.</p>
674
675 </div>
676 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
677 <div class="directive-section"><h2><a name="LDAPSharedCacheFile" id="LDAPSharedCacheFile">LDAPSharedCacheFile</a> <a name="ldapsharedcachefile" id="ldapsharedcachefile">Directive</a></h2>
678 <table class="directive">
679 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the shared memory cache file</td></tr>
680 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPSharedCacheFile <var>file-path</var></code></td></tr>
681 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
682 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
683 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
684 </table>
685     <p>Specifies the path of the shared memory cache file. If not set,
686     anonymous shared memory will be used if the platform supports it.</p>
687
688     <p>If <var>file-path</var> is not an absolute path, the location specified
689     will be relative to the value of
690     <code class="directive"><a href="../mod/core.html#defaultruntimedir">DefaultRuntimeDir</a></code>.</p>
691
692 </div>
693 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
694 <div class="directive-section"><h2><a name="LDAPSharedCacheSize" id="LDAPSharedCacheSize">LDAPSharedCacheSize</a> <a name="ldapsharedcachesize" id="ldapsharedcachesize">Directive</a></h2>
695 <table class="directive">
696 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Size in bytes of the shared-memory cache</td></tr>
697 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPSharedCacheSize <var>bytes</var></code></td></tr>
698 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPSharedCacheSize 500000</code></td></tr>
699 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
700 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
701 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
702 </table>
703     <p>Specifies the number of bytes to allocate for the shared
704     memory cache. The default is 500kb. If set to 0, shared memory
705     caching will not be used and every HTTPD process will create its
706     own cache.</p>
707
708 </div>
709 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
710 <div class="directive-section"><h2><a name="LDAPTimeout" id="LDAPTimeout">LDAPTimeout</a> <a name="ldaptimeout" id="ldaptimeout">Directive</a></h2>
711 <table class="directive">
712 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specifies the timeout for LDAP search and bind operations, in seconds</td></tr>
713 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPTimeout <var>seconds</var></code></td></tr>
714 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPTimeout 60</code></td></tr>
715 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
716 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
717 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
718 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Apache HTTP Server 2.3.5 and later</td></tr>
719 </table>
720     <p>This directive configures the timeout for bind and search operations, as well as
721     the LDAP_OPT_TIMEOUT option in the underlying LDAP client library, when available.</p>
722
723     <p> If the timeout expires, httpd will retry in case an existing connection has
724     been silently dropped by a firewall. However, performance will be much better if
725     the firewall is configured to send TCP RST packets instead of silently dropping
726     packets.</p>
727
728     <div class="note">
729     <p>Timeouts for ldap compare operations requires an SDK with LDAP_OPT_TIMEOUT, such as OpenLDAP &gt;= 2.4.4.</p>
730     </div>
731
732
733 </div>
734 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
735 <div class="directive-section"><h2><a name="LDAPTrustedClientCert" id="LDAPTrustedClientCert">LDAPTrustedClientCert</a> <a name="ldaptrustedclientcert" id="ldaptrustedclientcert">Directive</a></h2>
736 <table class="directive">
737 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the file containing or nickname referring to a per
738 connection client certificate. Not all LDAP toolkits support per
739 connection client certificates.</td></tr>
740 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPTrustedClientCert <var>type</var> <var>directory-path/filename/nickname</var> <var>[password]</var></code></td></tr>
741 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
742 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
743 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
744 </table>
745     <p>It specifies the directory path, file name or nickname of a
746     per connection client certificate used when establishing an SSL
747     or TLS connection to an LDAP server. Different locations or
748     directories may have their own independent client certificate
749     settings. Some LDAP toolkits (notably Novell)
750     do not support per connection client certificates, and will throw an
751     error on LDAP server connection if you try to use this directive
752     (Use the LDAPTrustedGlobalCert directive instead for Novell client
753     certificates - See the SSL/TLS certificate guide above for details).
754     The type specifies the kind of certificate parameter being
755     set, depending on the LDAP toolkit being used. Supported types are:</p>
756     <ul>
757       <li>CA_DER - binary DER encoded CA certificate</li>
758       <li>CA_BASE64 - PEM encoded CA certificate</li>
759       <li>CERT_DER - binary DER encoded client certificate</li>
760       <li>CERT_BASE64 - PEM encoded client certificate</li>
761       <li>CERT_NICKNAME - Client certificate "nickname" (Netscape SDK)</li>
762       <li>KEY_DER - binary DER encoded private key</li>
763       <li>KEY_BASE64 - PEM encoded private key</li>
764     </ul>
765
766 </div>
767 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
768 <div class="directive-section"><h2><a name="LDAPTrustedGlobalCert" id="LDAPTrustedGlobalCert">LDAPTrustedGlobalCert</a> <a name="ldaptrustedglobalcert" id="ldaptrustedglobalcert">Directive</a></h2>
769 <table class="directive">
770 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the file or database containing global trusted
771 Certificate Authority or global client certificates</td></tr>
772 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPTrustedGlobalCert <var>type</var> <var>directory-path/filename</var> <var>[password]</var></code></td></tr>
773 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
774 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
775 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
776 </table>
777     <p>It specifies the directory path and file name of the trusted CA
778     certificates and/or system wide client certificates <code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code>
779     should use when establishing an SSL or TLS connection to an LDAP
780     server. Note that all certificate information specified using this directive
781     is applied globally to the entire server installation. Some LDAP toolkits
782     (notably Novell) require all client certificates to be set globally using
783     this directive. Most other toolkits require clients certificates to be set
784     per Directory or per Location using LDAPTrustedClientCert. If you get this
785     wrong, an error may be logged when an attempt is made to contact the LDAP
786     server, or the connection may silently fail (See the SSL/TLS certificate
787     guide above for details).
788     The type specifies the kind of certificate parameter being
789     set, depending on the LDAP toolkit being used. Supported types are:</p>
790     <ul>
791       <li>CA_DER - binary DER encoded CA certificate</li>
792       <li>CA_BASE64 - PEM encoded CA certificate</li>
793       <li>CA_CERT7_DB - Netscape cert7.db CA certificate database file</li>
794       <li>CA_SECMOD - Netscape secmod database file</li>
795       <li>CERT_DER - binary DER encoded client certificate</li>
796       <li>CERT_BASE64 - PEM encoded client certificate</li>
797       <li>CERT_KEY3_DB - Netscape key3.db client certificate database file</li>
798       <li>CERT_NICKNAME - Client certificate "nickname" (Netscape SDK)</li>
799       <li>CERT_PFX - PKCS#12 encoded client certificate (Novell SDK)</li>
800       <li>KEY_DER - binary DER encoded private key</li>
801       <li>KEY_BASE64 - PEM encoded private key</li>
802       <li>KEY_PFX - PKCS#12 encoded private key (Novell SDK)</li>
803     </ul>
804
805 </div>
806 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
807 <div class="directive-section"><h2><a name="LDAPTrustedMode" id="LDAPTrustedMode">LDAPTrustedMode</a> <a name="ldaptrustedmode" id="ldaptrustedmode">Directive</a></h2>
808 <table class="directive">
809 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specifies the SSL/TLS mode to be used when connecting to an LDAP server.</td></tr>
810 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPTrustedMode <var>type</var></code></td></tr>
811 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
812 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
813 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
814 </table>
815     <p>The following modes are supported:</p>
816     <ul>
817       <li>NONE - no encryption</li>
818       <li>SSL - ldaps:// encryption on default port 636</li>
819       <li>TLS - STARTTLS encryption on default port 389</li>
820     </ul>
821
822     <p>Not all LDAP toolkits support all the above modes. An error message
823     will be logged at runtime if a mode is not supported, and the
824     connection to the LDAP server will fail.
825     </p>
826
827     <p>If an ldaps:// URL is specified, the mode becomes SSL and the setting
828     of LDAPTrustedMode is ignored.</p>
829
830 </div>
831 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
832 <div class="directive-section"><h2><a name="LDAPVerifyServerCert" id="LDAPVerifyServerCert">LDAPVerifyServerCert</a> <a name="ldapverifyservercert" id="ldapverifyservercert">Directive</a></h2>
833 <table class="directive">
834 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Force server certificate verification</td></tr>
835 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LDAPVerifyServerCert <var>On|Off</var></code></td></tr>
836 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LDAPVerifyServerCert On</code></td></tr>
837 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
838 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
839 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ldap</td></tr>
840 </table>
841     <p>Specifies whether to force the verification of a
842     server certificate when establishing an SSL connection to the
843     LDAP server.</p>
844
845 </div>
846 </div>
847 <div class="bottomlang">
848 <p><span>Available Languages: </span><a href="../en/mod/mod_ldap.html" title="English">&nbsp;en&nbsp;</a> |
849 <a href="../fr/mod/mod_ldap.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a></p>
850 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
851 <script type="text/javascript"><!--//--><![CDATA[//><!--
852 var comments_shortname = 'httpd';
853 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_ldap.html';
854 (function(w, d) {
855     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
856         d.write('<div id="comments_thread"><\/div>');
857         var s = d.createElement('script');
858         s.type = 'text/javascript';
859         s.async = true;
860         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
861         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
862     }
863     else {
864         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
865     }
866 })(window, document);
867 //--><!]]></script></div><div id="footer">
868 <p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
869 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
870 if (typeof(prettyPrint) !== 'undefined') {
871     prettyPrint();
872 }
873 //--><!]]></script>
874 </body></html>