2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_authnz_ldap.xml.meta">
25 <name>mod_authnz_ldap</name>
26 <description>Allows an LDAP directory to be used to store the database
27 for HTTP Basic authentication.</description>
28 <status>Extension</status>
29 <sourcefile>mod_authnz_ldap.c</sourcefile>
30 <identifier>authnz_ldap_module</identifier>
33 <p>This module provides authentication front-ends such as
34 <module>mod_auth_basic</module> to authenticate users through
35 an ldap directory.</p>
37 <p><module>mod_authnz_ldap</module> supports the following features:</p>
40 <li>Known to support the <a
41 href="http://www.openldap.org/">OpenLDAP SDK</a> (both 1.x
42 and 2.x), <a href="http://developer.novell.com/ndk/cldap.htm">
43 Novell LDAP SDK</a> and the <a
44 href="http://www.iplanet.com/downloads/developer/">iPlanet
45 (Netscape)</a> SDK.</li>
47 <li>Complex authorization policies can be implemented by
48 representing the policy with LDAP filters.</li>
50 <li>Uses extensive caching of LDAP operations via <a
51 href="mod_ldap.html">mod_ldap</a>.</li>
53 <li>Support for LDAP over SSL (requires the Netscape SDK) or
54 TLS (requires the OpenLDAP 2.x SDK or Novell LDAP SDK).</li>
57 <p>When using <module>mod_auth_basic</module>, this module is invoked
58 via the <directive module="mod_auth_basic">AuthBasicProvider</directive>
59 directive with the <code>ldap</code> value.</p>
62 <seealso><module>mod_ldap</module></seealso>
63 <seealso><module>mod_auth_basic</module></seealso>
64 <seealso><module>mod_authz_user</module></seealso>
65 <seealso><module>mod_authz_groupfile</module></seealso>
67 <section id="contents"><title>Contents</title>
71 <a href="#operation">Operation</a>
74 <li><a href="#authenphase">The Authentication
77 <li><a href="#authorphase">The Authorization
83 <a href="#requiredirectives">The Require Directives</a>
86 <li><a href="#requser">Require ldap-user</a></li>
87 <li><a href="#reqgroup">Require ldap-group</a></li>
88 <li><a href="#reqdn">Require ldap-dn</a></li>
89 <li><a href="#reqattribute">Require ldap-attribute</a></li>
90 <li><a href="#reqfilter">Require ldap-filter</a></li>
94 <li><a href="#examples">Examples</a></li>
95 <li><a href="#usingtls">Using TLS</a></li>
96 <li><a href="#usingssl">Using SSL</a></li>
97 <li><a href="#exposed">Exposing Login Information</a></li>
98 <li><a href="#activedirectory">Using Active Directory</a></li>
100 <a href="#frontpage">Using Microsoft FrontPage with
101 <module>mod_authnz_ldap</module></a>
104 <li><a href="#howitworks">How It Works</a></li>
105 <li><a href="#fpcaveats">Caveats</a></li>
111 <section id="operation"><title>Operation</title>
113 <p>There are two phases in granting access to a user. The first
114 phase is authentication, in which the <module>mod_authnz_ldap</module>
115 authentication provider verifies that the user's credentials are valid.
116 This is also called the <em>search/bind</em> phase. The second phase is
117 authorization, in which <module>mod_authnz_ldap</module> determines
118 if the authenticated user is allowed access to the resource in
119 question. This is also known as the <em>compare</em>
122 <p><module>mod_authnz_ldap</module> registers both an authn_ldap authentication
123 provider and an authz_ldap authorization handler. The authn_ldap
124 authentication provider can be enabled through the
125 <directive module="mod_auth_basic">AuthBasicProvider</directive> directive
126 using the <code>ldap</code> value. The authz_ldap handler extends the
127 <directive module="mod_authz_core">Require</directive> directive's authorization types
128 by adding <code>ldap-user</code>, <code>ldap-dn</code> and <code>ldap-group</code>
131 <section id="authenphase"><title>The Authentication
134 <p>During the authentication phase, <module>mod_authnz_ldap</module>
135 searches for an entry in the directory that matches the username
136 that the HTTP client passes. If a single unique match is found,
137 then <module>mod_authnz_ldap</module> attempts to bind to the
138 directory server using the DN of the entry plus the password
139 provided by the HTTP client. Because it does a search, then a
140 bind, it is often referred to as the search/bind phase. Here are
141 the steps taken during the search/bind phase.</p>
144 <li>Generate a search filter by combining the attribute and
145 filter provided in the <directive module="mod_authnz_ldap"
146 >AuthLDAPURL</directive> directive with
147 the username passed by the HTTP client.</li>
149 <li>Search the directory using the generated filter. If the
150 search does not return exactly one entry, deny or decline
153 <li>Fetch the distinguished name of the entry retrieved from
154 the search and attempt to bind to the LDAP server using that
155 DN and the password passed by the HTTP client. If the bind is
156 unsuccessful, deny or decline access.</li>
159 <p>The following directives are used during the search/bind
163 <columnspec><column width=".3"/><column width=".7"/></columnspec>
165 <td><directive module="mod_authnz_ldap">AuthLDAPURL</directive></td>
167 <td>Specifies the LDAP server, the
168 base DN, the attribute to use in the search, as well as the
169 extra search filter to use.</td>
173 <td><directive module="mod_authnz_ldap">AuthLDAPBindDN</directive></td>
175 <td>An optional DN to bind with
176 during the search phase.</td>
181 module="mod_authnz_ldap">AuthLDAPBindPassword</directive></td>
183 <td>An optional password to bind
184 with during the search phase.</td>
189 <section id="authorphase"><title>The Authorization Phase</title>
191 <p>During the authorization phase, <module>mod_authnz_ldap</module>
192 attempts to determine if the user is authorized to access the
193 resource. Many of these checks require
194 <module>mod_authnz_ldap</module> to do a compare operation on the
195 LDAP server. This is why this phase is often referred to as the
196 compare phase. <module>mod_authnz_ldap</module> accepts the
197 following <directive module="mod_authz_core">Require</directive>
198 directives to determine if the credentials are acceptable:</p>
201 <li>Grant access if there is a <a
202 href="#reqgroup"><code>Require ldap-user</code></a> directive, and the
203 username in the directive matches the username passed by the
206 <li>Grant access if there is a <a href="#reqdn"><code>Require
207 ldap-dn</code></a> directive, and the DN in the directive matches
208 the DN fetched from the LDAP directory.</li>
210 <li>Grant access if there is a <a
211 href="#reqgroup"><code>Require ldap-group</code></a> directive, and
212 the DN fetched from the LDAP directory (or the username
213 passed by the client) occurs in the LDAP group or, potentially, in
214 one of its sub-groups.</li>
216 <li>Grant access if there is a <a href="#reqattribute">
217 <code>Require ldap-attribute</code></a>
218 directive, and the attribute fetched from the LDAP directory
219 matches the given value.</li>
221 <li>Grant access if there is a <a href="#reqfilter">
222 <code>Require ldap-filter</code></a>
223 directive, and the search filter successfully finds a single user
224 object that matches the dn of the authenticated user.</li>
226 <li>otherwise, deny or decline access</li>
229 <p>Other <directive module="mod_authz_core">Require</directive> values may also
230 be used which may require loading additional authorization modules.</p>
233 <li>Grant access to all successfully authenticated users if
234 there is a <a href="#requser"><code>Require valid-user</code></a>
235 directive. (requires <module>mod_authz_user</module>)</li>
237 <li>Grant access if there is a <a
238 href="#reqgroup"><code>Require group</code></a> directive, and
239 <module>mod_authz_groupfile</module> has been loaded with the
240 <directive module="mod_authz_groupfile">AuthGroupFile</directive>
247 <p><module>mod_authnz_ldap</module> uses the following directives during the
251 <columnspec><column width=".4"/><column width=".6"/></columnspec>
253 <td><directive module="mod_authnz_ldap">AuthLDAPURL</directive> </td>
255 <td>The attribute specified in the
256 URL is used in compare operations for the <code>Require
257 ldap-user</code> operation.</td>
262 module="mod_authnz_ldap">AuthLDAPCompareDNOnServer</directive></td>
264 <td>Determines the behavior of the
265 <code>Require ldap-dn</code> directive.</td>
270 module="mod_authnz_ldap">AuthLDAPGroupAttribute</directive></td>
272 <td>Determines the attribute to
273 use for comparisons in the <code>Require ldap-group</code>
279 module="mod_authnz_ldap">AuthLDAPGroupAttributeIsDN</directive></td>
281 <td>Specifies whether to use the
282 user DN or the username when doing comparisons for the
283 <code>Require ldap-group</code> directive.</td>
288 module="mod_authnz_ldap">AuthLDAPMaxSubGroupDepth</directive></td>
290 <td>Determines the maximum depth of sub-groups that will be evaluated
291 during comparisons in the <code>Require ldap-group</code> directive.</td>
296 module="mod_authnz_ldap">AuthLDAPSubGroupAttribute</directive></td>
298 <td>Determines the attribute to use when obtaining sub-group members
299 of the current group during comparisons in the <code>Require ldap-group</code>
305 module="mod_authnz_ldap">AuthLDAPSubGroupClass</directive></td>
307 <td>Specifies the LDAP objectClass values used to identify if queried directory
308 objects really are group objects (as opposed to user objects) during the
309 <code>Require ldap-group</code> directive's sub-group processing.</td>
315 <section id="requiredirectives"><title>The Require Directives</title>
317 <p>Apache's <directive module="mod_authz_core">Require</directive>
318 directives are used during the authorization phase to ensure that
319 a user is allowed to access a resource. mod_authnz_ldap extends the
320 authorization types with <code>ldap-user</code>, <code>ldap-dn</code>,
321 <code>ldap-group</code>, <code>ldap-attribute</code> and
322 <code>ldap-filter</code>. Other authorization types may also be
323 used but may require that additional authorization modules be loaded.</p>
325 <section id="requser"><title>Require ldap-user</title>
327 <p>The <code>Require ldap-user</code> directive specifies what
328 usernames can access the resource. Once
329 <module>mod_authnz_ldap</module> has retrieved a unique DN from the
330 directory, it does an LDAP compare operation using the username
331 specified in the <code>Require ldap-user</code> to see if that username
332 is part of the just-fetched LDAP entry. Multiple users can be
333 granted access by putting multiple usernames on the line,
334 separated with spaces. If a username has a space in it, then it
335 must be surrounded with double quotes. Multiple users can also be
336 granted access by using multiple <code>Require ldap-user</code>
337 directives, with one user per line. For example, with a <directive
338 module="mod_authnz_ldap">AuthLDAPURL</directive> of
339 <code>ldap://ldap/o=Example?cn</code> (i.e., <code>cn</code> is
340 used for searches), the following Require directives could be used
341 to restrict access:</p>
342 <highlight language="config">
343 Require ldap-user "Barbara Jenson"
344 Require ldap-user "Fred User"
345 Require ldap-user "Joe Manager"
348 <p>Because of the way that <module>mod_authnz_ldap</module> handles this
349 directive, Barbara Jenson could sign on as <em>Barbara
350 Jenson</em>, <em>Babs Jenson</em> or any other <code>cn</code> that
351 she has in her LDAP entry. Only the single <code>Require
352 ldap-user</code> line is needed to support all values of the attribute
353 in the user's entry.</p>
355 <p>If the <code>uid</code> attribute was used instead of the
356 <code>cn</code> attribute in the URL above, the above three lines
357 could be condensed to</p>
358 <highlight language="config">Require ldap-user bjenson fuser jmanager</highlight>
361 <section id="reqgroup"><title>Require ldap-group</title>
363 <p>This directive specifies an LDAP group whose members are
364 allowed access. It takes the distinguished name of the LDAP
365 group. Note: Do not surround the group name with quotes.
366 For example, assume that the following entry existed in
367 the LDAP directory:</p>
369 dn: cn=Administrators, o=Example
370 objectClass: groupOfUniqueNames
371 uniqueMember: cn=Barbara Jenson, o=Example
372 uniqueMember: cn=Fred User, o=Example
375 <p>The following directive would grant access to both Fred and
377 <highlight language="config">Require ldap-group cn=Administrators, o=Example</highlight>
379 <p>Members can also be found within sub-groups of a specified LDAP group
380 if <directive module="mod_authnz_ldap">AuthLDAPMaxSubGroupDepth</directive>
381 is set to a value greater than 0. For example, assume the following entries
382 exist in the LDAP directory:</p>
384 dn: cn=Employees, o=Example
385 objectClass: groupOfUniqueNames
386 uniqueMember: cn=Managers, o=Example
387 uniqueMember: cn=Administrators, o=Example
388 uniqueMember: cn=Users, o=Example
390 dn: cn=Managers, o=Example
391 objectClass: groupOfUniqueNames
392 uniqueMember: cn=Bob Ellis, o=Example
393 uniqueMember: cn=Tom Jackson, o=Example
395 dn: cn=Administrators, o=Example
396 objectClass: groupOfUniqueNames
397 uniqueMember: cn=Barbara Jenson, o=Example
398 uniqueMember: cn=Fred User, o=Example
400 dn: cn=Users, o=Example
401 objectClass: groupOfUniqueNames
402 uniqueMember: cn=Allan Jefferson, o=Example
403 uniqueMember: cn=Paul Tilley, o=Example
404 uniqueMember: cn=Temporary Employees, o=Example
406 dn: cn=Temporary Employees, o=Example
407 objectClass: groupOfUniqueNames
408 uniqueMember: cn=Jim Swenson, o=Example
409 uniqueMember: cn=Elliot Rhodes, o=Example
412 <p>The following directives would allow access for Bob Ellis, Tom Jackson,
413 Barbara Jensen, Fred User, Allan Jefferson, and Paul Tilley but would not
414 allow access for Jim Swenson, or Elliot Rhodes (since they are at a
415 sub-group depth of 2):</p>
416 <highlight language="config">
417 Require ldap-group cn=Employees, o-Example
418 AuthLDAPMaxSubGroupDepth 1
421 <p>Behavior of this directive is modified by the <directive
422 module="mod_authnz_ldap">AuthLDAPGroupAttribute</directive>, <directive
423 module="mod_authnz_ldap">AuthLDAPGroupAttributeIsDN</directive>, <directive
424 module="mod_authnz_ldap">AuthLDAPMaxSubGroupDepth</directive>, <directive
425 module="mod_authnz_ldap">AuthLDAPSubGroupAttribute</directive>, and <directive
426 module="mod_authnz_ldap">AuthLDAPSubGroupClass</directive>
430 <section id="reqdn"><title>Require ldap-dn</title>
432 <p>The <code>Require ldap-dn</code> directive allows the administrator
433 to grant access based on distinguished names. It specifies a DN
434 that must match for access to be granted. If the distinguished
435 name that was retrieved from the directory server matches the
436 distinguished name in the <code>Require ldap-dn</code>, then
437 authorization is granted. Note: do not surround the distinguished
438 name with quotes.</p>
440 <p>The following directive would grant access to a specific
442 <highlight language="config">Require ldap-dn cn=Barbara Jenson, o=Example</highlight>
444 <p>Behavior of this directive is modified by the <directive
445 module="mod_authnz_ldap">AuthLDAPCompareDNOnServer</directive>
449 <section id="reqattribute"><title>Require ldap-attribute</title>
451 <p>The <code>Require ldap-attribute</code> directive allows the
452 administrator to grant access based on attributes of the authenticated
453 user in the LDAP directory. If the attribute in the directory
454 matches the value given in the configuration, access is granted.</p>
456 <p>The following directive would grant access to anyone with
457 the attribute employeeType = active</p>
459 <highlight language="config">Require ldap-attribute employeeType=active</highlight>
461 <p>Multiple attribute/value pairs can be specified on the same line
462 separated by spaces or they can be specified in multiple
463 <code>Require ldap-attribute</code> directives. The effect of listing
464 multiple attribute/values pairs is an OR operation. Access will be
465 granted if any of the listed attribute values match the value of the
466 corresponding attribute in the user object. If the value of the
467 attribute contains a space, only the value must be within double quotes.</p>
469 <p>The following directive would grant access to anyone with
470 the city attribute equal to "San Jose" or status equal to "Active"</p>
472 <highlight language="config">Require ldap-attribute city="San Jose" status=active</highlight>
476 <section id="reqfilter"><title>Require ldap-filter</title>
478 <p>The <code>Require ldap-filter</code> directive allows the
479 administrator to grant access based on a complex LDAP search filter.
480 If the dn returned by the filter search matches the authenticated user
481 dn, access is granted.</p>
483 <p>The following directive would grant access to anyone having a cell phone
484 and is in the marketing department</p>
486 <highlight language="config">Require ldap-filter &(cell=*)(department=marketing)</highlight>
488 <p>The difference between the <code>Require ldap-filter</code> directive and the
489 <code>Require ldap-attribute</code> directive is that <code>ldap-filter</code>
490 performs a search operation on the LDAP directory using the specified search
491 filter rather than a simple attribute comparison. If a simple attribute
492 comparison is all that is required, the comparison operation performed by
493 <code>ldap-attribute</code> will be faster than the search operation
494 used by <code>ldap-filter</code> especially within a large directory.</p>
500 <section id="examples"><title>Examples</title>
504 Grant access to anyone who exists in the LDAP directory,
505 using their UID for searches.
506 <highlight language="config">
507 AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
513 The next example is the same as above; but with the fields
514 that have useful defaults omitted. Also, note the use of a
515 redundant LDAP server.
516 <highlight language="config">AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
522 The next example is similar to the previous one, but it
523 uses the common name instead of the UID. Note that this
524 could be problematical if multiple people in the directory
525 share the same <code>cn</code>, because a search on <code>cn</code>
526 <strong>must</strong> return exactly one entry. That's why
527 this approach is not recommended: it's a better idea to
528 choose an attribute that is guaranteed unique in your
529 directory, such as <code>uid</code>.
530 <highlight language="config">
531 AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
537 Grant access to anybody in the Administrators group. The
538 users must authenticate using their UID.
539 <highlight language="config">
540 AuthLDAPURL ldap://ldap.example.com/o=Example?uid
541 Require ldap-group cn=Administrators, o=Example
546 The next example assumes that everyone at Example who
547 carries an alphanumeric pager will have an LDAP attribute
548 of <code>qpagePagerID</code>. The example will grant access
549 only to people (authenticated via their UID) who have
551 <highlight language="config">
552 AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
558 <p>The next example demonstrates the power of using filters
559 to accomplish complicated administrative requirements.
560 Without filters, it would have been necessary to create a
561 new LDAP group and ensure that the group's members remain
562 synchronized with the pager users. This becomes trivial
563 with filters. The goal is to grant access to anyone who has
564 a pager, plus grant access to Joe Manager, who doesn't
565 have a pager, but does need to access the same
567 <highlight language="config">
568 AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
572 <p>This last may look confusing at first, so it helps to
573 evaluate what the search filter will look like based on who
574 connects, as shown below. If
575 Fred User connects as <code>fuser</code>, the filter would look
578 <example>(&(|(qpagePagerID=*)(uid=jmanager))(uid=fuser))</example>
580 <p>The above search will only succeed if <em>fuser</em> has a
581 pager. When Joe Manager connects as <em>jmanager</em>, the
582 filter looks like</p>
584 <example>(&(|(qpagePagerID=*)(uid=jmanager))(uid=jmanager))</example>
586 <p>The above search will succeed whether <em>jmanager</em>
587 has a pager or not.</p>
592 <section id="usingtls"><title>Using TLS</title>
594 <p>To use TLS, see the <module>mod_ldap</module> directives <directive
595 module="mod_ldap">LDAPTrustedClientCert</directive>, <directive
596 module="mod_ldap">LDAPTrustedGlobalCert</directive> and <directive
597 module="mod_ldap">LDAPTrustedMode</directive>.</p>
599 <p>An optional second parameter can be added to the
600 <directive module="mod_authnz_ldap">AuthLDAPURL</directive> to override
601 the default connection type set by <directive module="mod_ldap">LDAPTrustedMode</directive>.
602 This will allow the connection established by an <em>ldap://</em> Url
603 to be upgraded to a secure connection on the same port.</p>
606 <section id="usingssl"><title>Using SSL</title>
608 <p>To use SSL, see the <module>mod_ldap</module> directives <directive
609 module="mod_ldap">LDAPTrustedClientCert</directive>, <directive
610 module="mod_ldap">LDAPTrustedGlobalCert</directive> and <directive
611 module="mod_ldap">LDAPTrustedMode</directive>.</p>
613 <p>To specify a secure LDAP server, use <em>ldaps://</em> in the
614 <directive module="mod_authnz_ldap">AuthLDAPURL</directive>
615 directive, instead of <em>ldap://</em>.</p>
618 <section id="exposed"><title>Exposing Login Information</title>
620 <p>when this module performs <em>authentication</em>, ldap attributes specified
621 in the <directive module="mod_authnz_ldap">authldapurl</directive>
622 directive are placed in environment variables with the prefix "AUTHENTICATE_".</p>
624 <p>when this module performs <em>authorization</em>, ldap attributes specified
625 in the <directive module="mod_authnz_ldap">authldapurl</directive>
626 directive are placed in environment variables with the prefix "AUTHORIZE_".</p>
628 <p>If the attribute field contains the username, common name
629 and telephone number of a user, a CGI program will have access to
630 this information without the need to make a second independent LDAP
631 query to gather this additional information.</p>
633 <p>This has the potential to dramatically simplify the coding and
634 configuration required in some web applications.</p>
638 <section id="activedirectory"><title>Using Active Directory</title>
640 <p>An Active Directory installation may support multiple domains at the
641 same time. To distinguish users between domains, an identifier called
642 a User Principle Name (UPN) can be added to a user's entry in the
643 directory. This UPN usually takes the form of the user's account
644 name, followed by the domain components of the particular domain,
645 for example <em>somebody@nz.example.com</em>.</p>
647 <p>You may wish to configure the <module>mod_authnz_ldap</module>
648 module to authenticate users present in any of the domains making up
649 the Active Directory forest. In this way both
650 <em>somebody@nz.example.com</em> and <em>someone@au.example.com</em>
651 can be authenticated using the same query at the same time.</p>
653 <p>To make this practical, Active Directory supports the concept of
654 a Global Catalog. This Global Catalog is a read only copy of selected
655 attributes of all the Active Directory servers within the Active
656 Directory forest. Querying the Global Catalog allows all the domains
657 to be queried in a single query, without the query spanning servers
658 over potentially slow links.</p>
660 <p>If enabled, the Global Catalog is an independent directory server
661 that runs on port 3268 (3269 for SSL). To search for a user, do a
662 subtree search for the attribute <em>userPrincipalName</em>, with
663 an empty search root, like so:</p>
665 <highlight language="config">
666 AuthLDAPBindDN apache@example.com
667 AuthLDAPBindPassword password
668 AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub
671 <p>Users will need to enter their User Principal Name as a login, in
672 the form <em>somebody@nz.example.com</em>.</p>
676 <section id="frontpage"><title>Using Microsoft
677 FrontPage with mod_authnz_ldap</title>
679 <p>Normally, FrontPage uses FrontPage-web-specific user/group
680 files (i.e., the <module>mod_authn_file</module> and
681 <module>mod_authz_groupfile</module> modules) to handle all
682 authentication. Unfortunately, it is not possible to just
683 change to LDAP authentication by adding the proper directives,
684 because it will break the <em>Permissions</em> forms in
685 the FrontPage client, which attempt to modify the standard
686 text-based authorization files.</p>
688 <p>Once a FrontPage web has been created, adding LDAP
689 authentication to it is a matter of adding the following
690 directives to <em>every</em> <code>.htaccess</code> file
691 that gets created in the web</p>
692 <highlight language="config">
693 AuthLDAPURL "the url"
694 AuthGroupFile mygroupfile
695 Require group mygroupfile
698 <section id="howitworks"><title>How It Works</title>
700 <p>FrontPage restricts access to a web by adding the <code>Require
701 valid-user</code> directive to the <code>.htaccess</code>
702 files. The <code>Require valid-user</code> directive will succeed for
703 any user who is valid <em>as far as LDAP is
704 concerned</em>. This means that anybody who has an entry in
705 the LDAP directory is considered a valid user, whereas FrontPage
706 considers only those people in the local user file to be
707 valid. By substituting the ldap-group with group file authorization,
708 Apache is allowed to consult the local user file (which is managed by
709 FrontPage) - instead of LDAP - when handling authorizing the user.</p>
711 <p>Once directives have been added as specified above,
712 FrontPage users will be able to perform all management
713 operations from the FrontPage client.</p>
716 <section id="fpcaveats"><title>Caveats</title>
719 <li>When choosing the LDAP URL, the attribute to use for
720 authentication should be something that will also be valid
721 for putting into a <module>mod_authn_file</module> user file.
722 The user ID is ideal for this.</li>
724 <li>When adding users via FrontPage, FrontPage administrators
725 should choose usernames that already exist in the LDAP
726 directory (for obvious reasons). Also, the password that the
727 administrator enters into the form is ignored, since Apache
728 will actually be authenticating against the password in the
729 LDAP database, and not against the password in the local user
730 file. This could cause confusion for web administrators.</li>
732 <!-- XXX is that true? was mod_auth before the aaa change -->
733 <li>Apache must be compiled with <module>mod_auth_basic</module>,
734 <module>mod_authn_file</module> and
735 <module>mod_authz_groupfile</module> in order to
736 use FrontPage support. This is because Apache will still use
737 the <module>mod_authz_groupfile</module> group file for determine
738 the extent of a user's access to the FrontPage web.</li>
740 <li>The directives must be put in the <code>.htaccess</code>
741 files. Attempting to put them inside <directive module="core"
742 type="section">Location</directive> or <directive module="core"
743 type="section">Directory</directive> directives won't work. This
744 is because <module>mod_authnz_ldap</module> has to be able to grab
745 the <directive module="mod_authz_groupfile">AuthGroupFile</directive>
746 directive that is found in FrontPage <code>.htaccess</code>
747 files so that it knows where to look for the valid user list. If
748 the <module>mod_authnz_ldap</module> directives aren't in the same
749 <code>.htaccess</code> file as the FrontPage directives, then
750 the hack won't work, because <module>mod_authnz_ldap</module> will
751 never get a chance to process the <code>.htaccess</code> file,
752 and won't be able to find the FrontPage-managed user file.</li>
758 <name>AuthLDAPAuthorizePrefix</name>
759 <description>Specifies the prefix for environment variables set during
760 authorization</description>
761 <syntax>AuthLDAPAuthorizePrefix <em>prefix</em></syntax>
762 <default>AuthLDAPAuthorizePrefix AUTHORIZE_</default>
763 <contextlist><context>directory</context><context>.htaccess</context>
765 <override>AuthConfig</override>
766 <compatibility>Available in version 2.3.6 and later</compatibility>
768 <p>This directive allows you to override the prefix used for environment
769 variables set during LDAP authorization. If <em>AUTHENTICATE_</em> is
770 specified, consumers of these environment variables see the same information
771 whether LDAP has performed authentication, authorization, or both.</p>
773 <note><title>Note</title>
774 No authorization variables are set when a user is authorized on the basis of
775 <code>Require valid-user</code>.
782 <name>AuthLDAPBindAuthoritative</name>
783 <description>Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.</description>
784 <syntax>AuthLDAPBindAuthoritative<em>off|on</em></syntax>
785 <default>AuthLDAPBindAuthoritative on</default>
786 <contextlist><context>directory</context><context>.htaccess</context>
788 <override>AuthConfig</override>
790 <p>By default, subsequent authentication providers are only queried if a
791 user cannot be mapped to a DN, but not if the user can be mapped to a DN and their
792 password cannot be verified with an LDAP bind.
793 If <directive module="mod_authnz_ldap">AuthLDAPBindAuthoritative</directive>
794 is set to <em>off</em>, other configured authentication modules will have
795 a chance to validate the user if the LDAP bind (with the current user's credentials)
796 fails for any reason.</p>
797 <p> This allows users present in both LDAP and
798 <directive module="mod_authn_file">AuthUserFile</directive> to authenticate
799 when the LDAP server is available but the user's account is locked or password
800 is otherwise unusable.</p>
802 <seealso><directive module="mod_authn_file">AuthUserFile</directive></seealso>
803 <seealso><directive module="mod_auth_basic">AuthBasicProvider</directive></seealso>
807 <name>AuthLDAPInitialBindAsUser</name>
808 <description>Determines if the server does the initial DN lookup using the basic authentication users'
809 own username, instead of anonymously or with hard-coded credentials for the server</description>
810 <syntax>AuthLDAPInitialBindAsUser <em>off|on</em></syntax>
811 <default>AuthLDAPInitialBindAsUser off</default>
812 <contextlist><context>directory</context><context>.htaccess</context>
814 <override>AuthConfig</override>
815 <compatibility>Available in version 2.3.6 and later</compatibility>
817 <p>By default, the server either anonymously, or with a dedicated user and
818 password, converts the basic authentication username into an LDAP
819 distinguished name (DN). This directive forces the server to use the verbatim username
820 and password provided by the incoming user to perform the initial DN
823 <p> If the verbatim username can't directly bind, but needs some
824 cosmetic transformation, see <directive module="mod_authnz_ldap">
825 AuthLDAPInitialBindPattern</directive>.</p>
827 <p> This directive should only be used when your LDAP server doesn't
828 accept anonymous searches and you cannot use a dedicated
829 <directive module="mod_authnz_ldap">AuthLDAPBindDN</directive>.
832 <note><title>Not available with authorization-only</title>
833 This directive can only be used if this module authenticates the user, and
834 has no effect when this module is used exclusively for authorization.
837 <seealso><directive module="mod_authnz_ldap">AuthLDAPInitialBindPattern</directive></seealso>
838 <seealso><directive module="mod_authnz_ldap">AuthLDAPBindDN</directive></seealso>
839 <seealso><directive module="mod_authnz_ldap">AuthLDAPCompareAsUser</directive></seealso>
840 <seealso><directive module="mod_authnz_ldap">AuthLDAPSearchAsUser</directive></seealso>
844 <name>AuthLDAPInitialBindPattern</name>
845 <description>Specifies the transformation of the basic authentication username to be used when binding to the LDAP server
846 to perform a DN lookup</description>
847 <syntax>AuthLDAPInitialBindPattern<em><var>regex</var> <var>substitution</var></em></syntax>
848 <default>AuthLDAPInitialBindPattern (.*) $1 (remote username used verbatim)</default>
849 <contextlist><context>directory</context><context>.htaccess</context>
851 <override>AuthConfig</override>
852 <compatibility>Available in version 2.3.6 and later</compatibility>
854 <p>If <directive module="mod_authnz_ldap">AuthLDAPInitialBindAsUser</directive> is set to
855 <em>ON</em>, the basic authentication username will be transformed according to the
856 regular expression and substituion arguments.</p>
858 <p> The regular expression argument is compared against the current basic authentication username.
859 The substitution argument may contain backreferences, but has no other variable interpolation.</p>
861 <p> This directive should only be used when your LDAP server doesn't
862 accept anonymous searches and you cannot use a dedicated
863 <directive module="mod_authnz_ldap">AuthLDAPBindDN</directive>.
866 <highlight language="config"> AuthLDAPInitialBindPattern (.+) $1@example.com </highlight>
867 <highlight language="config"> AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com</highlight>
869 <note><title>Not available with authorization-only</title>
870 This directive can only be used if this module authenticates the user, and
871 has no effect when this module is used exclusively for authorization.
873 <note><title>debugging</title>
874 The substituted DN is recorded in the environment variable
875 <em>LDAP_BINDASUSER</em>. If the regular expression does not match the input,
876 the verbatim username is used.
879 <seealso><directive module="mod_authnz_ldap">AuthLDAPInitialBindAsUser</directive></seealso>
880 <seealso><directive module="mod_authnz_ldap">AuthLDAPBindDN</directive></seealso>
884 <name>AuthLDAPBindDN</name>
885 <description>Optional DN to use in binding to the LDAP server</description>
886 <syntax>AuthLDAPBindDN <em>distinguished-name</em></syntax>
887 <contextlist><context>directory</context><context>.htaccess</context>
889 <override>AuthConfig</override>
892 <p>An optional DN used to bind to the server when searching for
893 entries. If not provided, <module>mod_authnz_ldap</module> will use
894 an anonymous bind.</p>
899 <name>AuthLDAPBindPassword</name>
900 <description>Password used in conjuction with the bind DN</description>
901 <syntax>AuthLDAPBindPassword <em>password</em></syntax>
902 <contextlist><context>directory</context><context>.htaccess</context>
904 <override>AuthConfig</override>
907 <p>A bind password to use in conjunction with the bind DN. Note
908 that the bind password is probably sensitive data, and should be
909 properly protected. You should only use the <directive
910 module="mod_authnz_ldap">AuthLDAPBindDN</directive> and <directive
911 module="mod_authnz_ldap">AuthLDAPBindPassword</directive> if you
912 absolutely need them to search the directory.</p>
914 <p>If the value begins with exec: the resulting command will be
915 executed and the first line returned to standard output by the
916 program will be used as the password.</p>
919 AuthLDAPBindPassword secret
921 #Run /path/to/program to get my password
922 AuthLDAPBindPassword exec:/path/to/program
924 #Run /path/to/otherProgram and provide arguments
925 AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
932 <name>AuthLDAPCharsetConfig</name>
933 <description>Language to charset conversion configuration file</description>
934 <syntax>AuthLDAPCharsetConfig <em>file-path</em></syntax>
935 <contextlist><context>server config</context>
939 <p>The <directive>AuthLDAPCharsetConfig</directive> directive sets the location
940 of the language to charset conversion configuration file. <var>File-path</var> is relative
941 to the <directive module="core">ServerRoot</directive>. This file specifies
942 the list of language extensions to character sets.
943 Most administrators use the provided <code>charset.conv</code>
944 file, which associates common language extensions to character sets.</p>
946 <p>The file contains lines in the following format:</p>
949 <var>Language-Extension</var> <var>charset</var> [<var>Language-String</var>] ...
952 <p>The case of the extension does not matter. Blank lines, and lines
953 beginning with a hash character (<code>#</code>) are ignored.</p>
958 <name>AuthLDAPCompareAsUser</name>
959 <description>Use the authenticated user's credentials to perform authorization comparisons</description>
960 <syntax>AuthLDAPCompareAsUser on|off</syntax>
961 <default>AuthLDAPCompareAsUser off</default>
962 <contextlist><context>directory</context><context>.htaccess</context>
964 <override>AuthConfig</override>
965 <compatibility>Available in version 2.3.6 and later</compatibility>
968 <p>When set, and <module>mod_authnz_ldap</module> has authenticated the
969 user, LDAP comparisons for authorization use the queried distinguished name (DN)
970 and HTTP basic authentication password of the authenticated user instead of
971 the servers configured credentials.</p>
973 <p> The <em>ldap-attribute</em>, <em>ldap-user</em>, and <em>ldap-group</em> (single-level only)
974 authorization checks use comparisons.</p>
976 <p>This directive only has effect on the comparisons performed during
977 nested group processing when <directive module="mod_authnz_ldap">
978 AuthLDAPSearchAsUser</directive> is also enabled.</p>
980 <p> This directive should only be used when your LDAP server doesn't
981 accept anonymous comparisons and you cannot use a dedicated
982 <directive module="mod_authnz_ldap">AuthLDAPBindDN</directive>.
985 <seealso><directive module="mod_authnz_ldap">AuthLDAPInitialBindAsUser</directive></seealso>
986 <seealso><directive module="mod_authnz_ldap">AuthLDAPSearchAsUser</directive></seealso>
990 <name>AuthLDAPCompareDNOnServer</name>
991 <description>Use the LDAP server to compare the DNs</description>
992 <syntax>AuthLDAPCompareDNOnServer on|off</syntax>
993 <default>AuthLDAPCompareDNOnServer on</default>
994 <contextlist><context>directory</context><context>.htaccess</context>
996 <override>AuthConfig</override>
999 <p>When set, <module>mod_authnz_ldap</module> will use the LDAP
1000 server to compare the DNs. This is the only foolproof way to
1001 compare DNs. <module>mod_authnz_ldap</module> will search the
1002 directory for the DN specified with the <a
1003 href="#reqdn"><code>Require dn</code></a> directive, then,
1004 retrieve the DN and compare it with the DN retrieved from the user
1005 entry. If this directive is not set,
1006 <module>mod_authnz_ldap</module> simply does a string comparison. It
1007 is possible to get false negatives with this approach, but it is
1008 much faster. Note the <module>mod_ldap</module> cache can speed up
1009 DN comparison in most situations.</p>
1011 </directivesynopsis>
1014 <name>AuthLDAPDereferenceAliases</name>
1015 <description>When will the module de-reference aliases</description>
1016 <syntax>AuthLDAPDereferenceAliases never|searching|finding|always</syntax>
1017 <default>AuthLDAPDereferenceAliases always</default>
1018 <contextlist><context>directory</context><context>.htaccess</context>
1020 <override>AuthConfig</override>
1023 <p>This directive specifies when <module>mod_authnz_ldap</module> will
1024 de-reference aliases during LDAP operations. The default is
1025 <code>always</code>.</p>
1027 </directivesynopsis>
1030 <name>AuthLDAPGroupAttribute</name>
1031 <description>LDAP attributes used to identify the user members of
1032 groups.</description>
1033 <syntax>AuthLDAPGroupAttribute <em>attribute</em></syntax>
1034 <default>AuthLDAPGroupAttribute member uniquemember</default>
1035 <contextlist><context>directory</context><context>.htaccess</context>
1037 <override>AuthConfig</override>
1040 <p>This directive specifies which LDAP attributes are used to
1041 check for user members within groups. Multiple attributes can be used
1042 by specifying this directive multiple times. If not specified,
1043 then <module>mod_authnz_ldap</module> uses the <code>member</code> and
1044 <code>uniquemember</code> attributes.</p>
1046 </directivesynopsis>
1049 <name>AuthLDAPGroupAttributeIsDN</name>
1050 <description>Use the DN of the client username when checking for
1051 group membership</description>
1052 <syntax>AuthLDAPGroupAttributeIsDN on|off</syntax>
1053 <default>AuthLDAPGroupAttributeIsDN on</default>
1054 <contextlist><context>directory</context><context>.htaccess</context>
1056 <override>AuthConfig</override>
1059 <p>When set <code>on</code>, this directive says to use the
1060 distinguished name of the client username when checking for group
1061 membership. Otherwise, the username will be used. For example,
1062 assume that the client sent the username <code>bjenson</code>,
1063 which corresponds to the LDAP DN <code>cn=Babs Jenson,
1064 o=Example</code>. If this directive is set,
1065 <module>mod_authnz_ldap</module> will check if the group has
1066 <code>cn=Babs Jenson, o=Example</code> as a member. If this
1067 directive is not set, then <module>mod_authnz_ldap</module> will
1068 check if the group has <code>bjenson</code> as a member.</p>
1070 </directivesynopsis>
1073 <name>AuthLDAPMaxSubGroupDepth</name>
1074 <description>Specifies the maximum sub-group nesting depth that will be
1075 evaluated before the user search is discontinued.</description>
1076 <syntax>AuthLDAPMaxSubGroupDepth <var>Number</var></syntax>
1077 <default>AuthLDAPMaxSubGroupDepth 10</default>
1078 <contextlist><context>directory</context><context>.htaccess</context>
1080 <override>AuthConfig</override>
1081 <compatibility>Available in version 2.3.0 and later</compatibility>
1084 <p>When this directive is set to a non-zero value <code>X</code>
1085 combined with use of the <code>Require ldap-group someGroupDN</code>
1086 directive, the provided user credentials will be searched for
1087 as a member of the <code>someGroupDN</code> directory object or of
1088 any group member of the current group up to the maximum nesting
1089 level <code>X</code> specified by this directive.</p>
1090 <p>See the <a href="#reqgroup"><code>Require ldap-group</code></a>
1091 section for a more detailed example.</p>
1093 </directivesynopsis>
1096 <name>AuthLDAPRemoteUserAttribute</name>
1097 <description>Use the value of the attribute returned during the user
1098 query to set the REMOTE_USER environment variable</description>
1099 <syntax>AuthLDAPRemoteUserAttribute uid</syntax>
1100 <default>none</default>
1101 <contextlist><context>directory</context><context>.htaccess</context>
1103 <override>AuthConfig</override>
1106 <p>If this directive is set, the value of the
1107 <code>REMOTE_USER</code> environment variable will be set to the
1108 value of the attribute specified. Make sure that this attribute is
1109 included in the list of attributes in the AuthLDAPUrl definition,
1110 otherwise this directive will have no effect. This directive, if
1111 present, takes precedence over AuthLDAPRemoteUserIsDN. This
1112 directive is useful should you want people to log into a website
1113 using an email address, but a backend application expects the
1114 username as a userid.</p>
1116 </directivesynopsis>
1119 <name>AuthLDAPRemoteUserIsDN</name>
1120 <description>Use the DN of the client username to set the REMOTE_USER
1121 environment variable</description>
1122 <syntax>AuthLDAPRemoteUserIsDN on|off</syntax>
1123 <default>AuthLDAPRemoteUserIsDN off</default>
1124 <contextlist><context>directory</context><context>.htaccess</context>
1126 <override>AuthConfig</override>
1129 <p>If this directive is set to on, the value of the
1130 <code>REMOTE_USER</code> environment variable will be set to the full
1131 distinguished name of the authenticated user, rather than just
1132 the username that was passed by the client. It is turned off by
1135 </directivesynopsis>
1138 <name>AuthLDAPSearchAsUser</name>
1139 <description>Use the authenticated user's credentials to perform authorization searches</description>
1140 <syntax>AuthLDAPSearchAsUser on|off</syntax>
1141 <default>AuthLDAPSearchAsUser off</default>
1142 <contextlist><context>directory</context><context>.htaccess</context>
1144 <override>AuthConfig</override>
1145 <compatibility>Available in version 2.3.6 and later</compatibility>
1148 <p>When set, and <module>mod_authnz_ldap</module> has authenticated the
1149 user, LDAP searches for authorization use the queried distinguished name (DN)
1150 and HTTP basic authentication password of the authenticated user instead of
1151 the servers configured credentials.</p>
1153 <p> The <em>ldap-filter</em> and <em>ldap-dn</em> authorization
1154 checks use searches.</p>
1156 <p>This directive only has effect on the comparisons performed during
1157 nested group processing when <directive module="mod_authnz_ldap">
1158 AuthLDAPCompareAsUser</directive> is also enabled.</p>
1160 <p> This directive should only be used when your LDAP server doesn't
1161 accept anonymous searches and you cannot use a dedicated
1162 <directive module="mod_authnz_ldap">AuthLDAPBindDN</directive>.
1165 <seealso><directive module="mod_authnz_ldap">AuthLDAPInitialBindAsUser</directive></seealso>
1166 <seealso><directive module="mod_authnz_ldap">AuthLDAPCompareAsUser</directive></seealso>
1167 </directivesynopsis>
1170 <name>AuthLDAPSubGroupAttribute</name>
1171 <description>Specifies the attribute labels, one value per
1172 directive line, used to distinguish the members of the current group that
1173 are groups.</description>
1174 <syntax>AuthLDAPSubGroupAttribute <em>attribute</em></syntax>
1175 <default>AuthLDAPSubgroupAttribute member uniquemember</default>
1176 <contextlist><context>directory</context><context>.htaccess</context>
1178 <override>AuthConfig</override>
1179 <compatibility>Available in version 2.3.0 and later</compatibility>
1182 <p>An LDAP group object may contain members that are users and
1183 members that are groups (called nested or sub groups). The
1184 <code>AuthLDAPSubGroupAttribute</code> directive identifies the
1185 labels of group members and the <code>AuthLDAPGroupAttribute</code>
1186 directive identifies the labels of the user members. Multiple
1187 attributes can be used by specifying this directive multiple times.
1188 If not specified, then <module>mod_authnz_ldap</module> uses the
1189 <code>member</code> and <code>uniqueMember</code> attributes.</p>
1191 </directivesynopsis>
1194 <name>AuthLDAPSubGroupClass</name>
1195 <description>Specifies which LDAP objectClass values identify directory
1196 objects that are groups during sub-group processing.</description>
1197 <syntax>AuthLDAPSubGroupClass <em>LdapObjectClass</em></syntax>
1198 <default>AuthLDAPSubGroupClass groupOfNames groupOfUniqueNames</default>
1199 <contextlist><context>directory</context><context>.htaccess</context>
1201 <override>AuthConfig</override>
1202 <compatibility>Available in version 2.3.0 and later</compatibility>
1205 <p>An LDAP group object may contain members that are users and
1206 members that are groups (called nested or sub groups). The
1207 <code>AuthLDAPSubGroupAttribute</code> directive identifies the
1208 labels of members that may be sub-groups of the current group
1209 (as opposed to user members). The <code>AuthLDAPSubGroupClass</code>
1210 directive specifies the LDAP objectClass values used in verifying that
1211 these potential sub-groups are in fact group objects. Verified sub-groups
1212 can then be searched for more user or sub-group members. Multiple
1213 attributes can be used by specifying this directive multiple times.
1214 If not specified, then <module>mod_authnz_ldap</module> uses the
1215 <code>groupOfNames</code> and <code>groupOfUniqueNames</code> values.</p>
1217 </directivesynopsis>
1220 <name>AuthLDAPUrl</name>
1221 <description>URL specifying the LDAP search parameters</description>
1222 <syntax>AuthLDAPUrl <em>url [NONE|SSL|TLS|STARTTLS]</em></syntax>
1223 <contextlist><context>directory</context><context>.htaccess</context>
1225 <override>AuthConfig</override>
1228 <p>An RFC 2255 URL which specifies the LDAP search parameters
1229 to use. The syntax of the URL is</p>
1230 <example>ldap://host:port/basedn?attribute?scope?filter</example>
1231 <p>If you want to specify more than one LDAP URL that Apache should try in turn, the syntax is:</p>
1232 <highlight language="config">AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..."</highlight>
1233 <p><em><strong>Caveat: </strong>If you specify multiple servers, you need to enclose the entire URL string in quotes;
1234 otherwise you will get an error: "AuthLDAPURL takes one argument, URL to define LDAP connection.." </em>
1235 You can of course use search parameters on each of these.</p>
1240 <dd>For regular ldap, use the
1241 string <code>ldap</code>. For secure LDAP, use <code>ldaps</code>
1242 instead. Secure LDAP is only available if Apache was linked
1243 to an LDAP library with SSL support.</dd>
1248 <p>The name/port of the ldap server (defaults to
1249 <code>localhost:389</code> for <code>ldap</code>, and
1250 <code>localhost:636</code> for <code>ldaps</code>). To
1251 specify multiple, redundant LDAP servers, just list all
1252 servers, separated by spaces. <module>mod_authnz_ldap</module>
1253 will try connecting to each server in turn, until it makes a
1254 successful connection. If multiple ldap servers are specified,
1255 then entire LDAP URL must be encapsulated in double quotes.</p>
1257 <p>Once a connection has been made to a server, that
1258 connection remains active for the life of the
1259 <program>httpd</program> process, or until the LDAP server goes
1262 <p>If the LDAP server goes down and breaks an existing
1263 connection, <module>mod_authnz_ldap</module> will attempt to
1264 re-connect, starting with the primary server, and trying
1265 each redundant server in turn. Note that this is different
1266 than a true round-robin search.</p>
1271 <dd>The DN of the branch of the
1272 directory where all searches should start from. At the very
1273 least, this must be the top of your directory tree, but
1274 could also specify a subtree in the directory.</dd>
1278 <dd>The attribute to search for.
1279 Although RFC 2255 allows a comma-separated list of
1280 attributes, only the first attribute will be used, no
1281 matter how many are provided. If no attributes are
1282 provided, the default is to use <code>uid</code>. It's a good
1283 idea to choose an attribute that will be unique across all
1284 entries in the subtree you will be using. All attributes
1285 listed will be put into the environment with an AUTHENTICATE_ prefix
1286 for use by other modules.</dd>
1290 <dd>The scope of the search. Can be either <code>one</code> or
1291 <code>sub</code>. Note that a scope of <code>base</code> is
1292 also supported by RFC 2255, but is not supported by this
1293 module. If the scope is not provided, or if <code>base</code> scope
1294 is specified, the default is to use a scope of
1295 <code>sub</code>.</dd>
1299 <dd>A valid LDAP search filter. If
1300 not provided, defaults to <code>(objectClass=*)</code>, which
1301 will search for all objects in the tree. Filters are
1302 limited to approximately 8000 characters (the definition of
1303 <code>MAX_STRING_LEN</code> in the Apache source code). This
1304 should be more than sufficient for any application.</dd>
1307 <p>When doing searches, the attribute, filter and username passed
1308 by the HTTP client are combined to create a search filter that
1310 <code>(&(<em>filter</em>)(<em>attribute</em>=<em>username</em>))</code>.</p>
1312 <p>For example, consider an URL of
1313 <code>ldap://ldap.example.com/o=Example?cn?sub?(posixid=*)</code>. When
1314 a client attempts to connect using a username of <code>Babs
1315 Jenson</code>, the resulting search filter will be
1316 <code>(&(posixid=*)(cn=Babs Jenson))</code>.</p>
1318 <p>An optional parameter can be added to allow the LDAP Url to override
1319 the connection type. This parameter can be one of the following:</p>
1323 <dd>Establish an unsecure connection on the default LDAP port. This
1324 is the same as <code>ldap://</code> on port 389.</dd>
1326 <dd>Establish a secure connection on the default secure LDAP port.
1327 This is the same as <code>ldaps://</code></dd>
1328 <dt>TLS | STARTTLS</dt>
1329 <dd>Establish an upgraded secure connection on the default LDAP port.
1330 This connection will be initiated on port 389 by default and then
1331 upgraded to a secure connection on the same port.</dd>
1334 <p>See above for examples of <directive
1335 module="mod_authnz_ldap">AuthLDAPURL</directive> URLs.</p>
1337 </directivesynopsis>