]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
allow 'all' vs. 'any' sasl-authz-policy
[openldap] / doc / man / man5 / slapd.conf.5
1 .TH SLAPD.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2003 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The file
11 .B ETCDIR/slapd.conf
12 contains configuration information for the
13 .BR slapd (8)
14 daemon.  This configuration file is also used by the
15 .BR slurpd (8)
16 replication daemon and by the SLAPD tools
17 .BR slapadd (8),
18 .BR slapcat (8),
19 and
20 .BR slapindex (8).
21 .LP
22 The
23 .B slapd.conf
24 file consists of a series of global configuration options that apply to
25 .B slapd
26 as a whole (including all backends), followed by zero or more database
27 backend definitions that contain information specific to a backend
28 instance.
29 .LP
30 The general format of
31 .B slapd.conf
32 is as follows:
33 .LP
34 .nf
35     # comment - these options apply to every database
36     <global configuration options>
37     # first database definition & configuration options
38     database <backend 1 type>
39     <configuration options specific to backend 1>
40     # subsequent database definitions & configuration options
41     ...
42 .fi
43 .LP
44 As many backend-specific sections as desired may be included.  Global
45 options can be overridden in a backend (for options that appear more
46 than once, the last appearance in the
47 .B slapd.conf
48 file is used).
49 .LP
50 If a line begins with white space, it is considered a continuation
51 of the previous line.  Blank lines and comment lines beginning with
52 a `#' character are ignored.  (Note: continuation lines are unwrapped
53 before comment processing is applied.)
54 .LP
55 Arguments on configuration lines are separated by white space. If an
56 argument contains white space, the argument should be enclosed in
57 double quotes.  If an argument contains a double quote (`"') or a
58 backslash character (`\\'), the character should be preceded by a
59 backslash character.
60 .LP
61 The specific configuration options available are discussed below in the
62 Global Configuration Options, General Backend Options, and General Database
63 Options.  Backend-specific options are discussed in the
64 .B slapd-<backend>(5)
65 manual pages.  Refer to the "OpenLDAP Administrator's Guide" for more
66 details on the slapd configuration file.
67 .SH GLOBAL CONFIGURATION OPTIONS
68 Options described in this section apply to all backends, unless specifically 
69 overridden in a backend definition. Arguments that should be replaced by 
70 actual text are shown in brackets <>.
71 .TP
72 .B access to <what> "[ by <who> <access> <control> ]+"
73 Grant access (specified by <access>) to a set of entries and/or
74 attributes (specified by <what>) by one or more requestors (specified
75 by <who>).
76 See
77 .BR slapd.access (5)
78 and the "OpenLDAP's Administrator's Guide" for details.
79 .TP
80 .B allow <features>
81 Specify a set of features (separated by white space) to
82 allow (default none).
83 .B bind_v2
84 allows acceptance of LDAPv2 bind requests.  Note that
85 .BR slapd (8)
86 does not truly implement LDAPv2 (RFC 1777), now Historic (RFC 3494).
87 .B bind_anon_cred
88 allows anonymous bind when credentials are not empty (e.g.
89 when DN is empty).
90 .B bind_anon_dn
91 allows unauthenticated (anonymous) bind when DN is not empty.
92 .B update_anon
93 allow unauthenticated (anonymous) update operations to be processed
94 (subject to access controls and other administrative limits).
95 .TP
96 .B argsfile <filename>
97 The ( absolute ) name of a file that will hold the 
98 .B slapd
99 server's command line options
100 if started without the debugging command line option.
101 .TP
102 .B attributeoptions [option-name]...
103 Define tagging attribute options or option tag/range prefixes.
104 Options must not end with `-', prefixes must end with `-'.
105 The `lang-' prefix is predefined.
106 If you use the
107 .B attributeoptions
108 directive, `lang-' will no longer be defined and you must specify it
109 explicitly if you want it defined.
110
111 An attribute description with a tagging option is a subtype of that
112 attribute description without the option.
113 Except for that, options defined this way have no special semantics.
114 Prefixes defined this way work like the `lang-' options:
115 They define a prefix for tagging options starting with the prefix.
116 That is, if you define the prefix `x-foo-', you can use the option
117 `x-foo-bar'.
118 Furthermore, in a search or compare, a prefix or range name (with
119 a trailing `-') matches all options starting with that name, as well
120 as the option with the range name sans the trailing `-'.
121 That is, `x-foo-bar-' matches `x-foo-bar' and `x-foo-bar-baz'.
122
123 RFC 2251 reserves options beginning with `x-' for private experiments.
124 Other options should be registered with IANA, see RFC 3383 section 3.4.
125 OpenLDAP also has the `binary' option built in, but this is a transfer
126 option, not a tagging option.
127 .HP
128 .hy 0
129 .B attributetype "(\ <oid>\
130  [NAME\ <name>]\
131  [DESC\ <description>]\
132  [OBSOLETE]\
133  [SUP\ <oid>]\
134  [EQUALITY\ <oid>]\
135  [ORDERING\ <oid>]\
136  [SUBSTR\ <oid>]\
137  [SYNTAX\ <oidlen>]\
138  [SINGLE\-VALUE]\
139  [COLLECTIVE]\
140  [NO\-USER\-MODIFICATION]\
141  [USAGE\ <attributeUsage>]\ )"
142 .RS
143 Specify an attribute type using the LDAPv3 syntax defined in RFC 2252.
144 The slapd parser extends the RFC 2252 definition by allowing string
145 forms as well as numeric OIDs to be used for the attribute OID and
146 attribute syntax OID.
147 (See the
148 .B objectidentifier
149 description.) 
150 .RE
151 .TP
152 .B concurrency <integer>
153 Specify a desired level of concurrency.  Provided to the underlying
154 thread system as a hint.  The default is not to provide any hint.
155 .TP
156 .B conn_max_pending <integer>
157 Specify the maximum number of pending requests for an anonymous session.
158 If requests are submitted faster than the server can process them, they
159 will be queued up to this limit. If the limit is exceeded, the session
160 is closed. The default is 100.
161 .TP
162 .B conn_max_pending_auth <integer>
163 Specify the maximum number of pending requests for an authenticated session.
164 The default is 1000.
165 .\".TP
166 .\".B debug <subsys> <level>
167 .\"Specify a logging level for a particular subsystem.  The subsystems include
168 .\".B global
169 .\"a global level for all subsystems,
170 .\".B acl
171 .\"the ACL engine,
172 .\".B backend
173 .\"the backend databases,
174 .\".B cache
175 .\"the entry cache manager,
176 .\".B config
177 .\"the config file reader,
178 .\".B connection
179 .\"the connection manager,
180 .\".B cyrus
181 .\"the Cyrus SASL library interface,
182 .\".B filter
183 .\"the search filter processor,
184 .\".B getdn
185 .\"the DN normalization library,
186 .\".B index
187 .\"the database indexer,
188 .\".B liblber
189 .\"the ASN.1 BER library,
190 .\".B module
191 .\"the dynamic module loader,
192 .\".B operation
193 .\"the LDAP operation processors,
194 .\".B sasl
195 .\"the SASL authentication subsystem,
196 .\".B schema
197 .\"the schema processor, and
198 .\".B tls
199 .\"the TLS library interface. This is not an exhaustive list; there are many
200 .\"other subsystems and more are added over time.
201 .\"
202 .\"The levels are, in order of decreasing priority:
203 .\".B emergency, alert, critical, error, warning, notice, information, entry,
204 .\".B args, results, detail1, detail2
205 .\"An integer may be used instead, with 0 corresponding to
206 .\".B emergency
207 .\"up to 11 for
208 .\".BR detail2 .
209 .\"The
210 .\".B entry
211 .\"level logs function entry points,
212 .\".B args
213 .\"adds function call parameters, and
214 .\".B results
215 .\"adds the function results to the logs.
216 .\"The
217 .\".B detail1
218 .\"and
219 .\".B detail2
220 .\"levels add even more low level detail from individual functions.
221 .TP
222 .B defaultsearchbase <dn>
223 Specify a default search base to use when client submits a
224 non-base search request with an empty base DN.
225 .TP
226 .B disallow <features>
227 Specify a set of features (separated by white space) to
228 disallow (default none).
229 .B bind_anon
230 disables acceptance of anonymous bind requests.
231 .B bind_simple
232 disables simple (bind) authentication.
233 .B bind_krbv4
234 disables Kerberos V4 (bind) authentication.
235 .B tls_2_anon
236 disables Start TLS from forcing session to anonymous status (see also
237 .BR tls_authc ).
238 .B tls_authc
239 disables StartTLS if authenticated (see also
240 .BR tls_2_anon ).
241 .HP
242 .hy 0
243 .B ditcontentrule "(\ <oid>\
244  [NAME\ <name>]\
245  [DESC\ <description>]\
246  [OBSOLETE]\
247  [AUX\ <oids>]\
248  [MUST\ <oids>]\
249  [MAY\ <oids>]\
250  [NOT\ <oids>]\ )"
251 .RS
252 Specify an DIT Content Rule using the LDAPv3 syntax defined in RFC 2252.
253 The slapd parser extends the RFC 2252 definition by allowing string
254 forms as well as numeric OIDs to be used for the attribute OID and
255 attribute syntax OID.
256 (See the
257 .B objectidentifier
258 description.) 
259 .RE
260 .TP
261 .B gentlehup { on | off }
262 A SIGHUP signal will only cause a 'gentle' shutdown-attempt:
263 .B Slapd
264 will stop listening for new connections, but will not close the
265 connections to the current clients.  Future write operations return
266 unwilling-to-perform, though.  Slapd terminates when all clients
267 have closed their connections (if they ever do), or \- as before \-
268 if it receives a SIGTERM signal.  This can be useful if you wish to
269 terminate the server and start a new
270 .B slapd
271 server
272 .B with another database,
273 without disrupting the currently active clients.
274 The default is off.  You may wish to use
275 .B idletimeout
276 along with this option.
277 .TP
278 .B idletimeout <integer>
279 Specify the number of seconds to wait before forcibly closing
280 an idle client connection.  A idletimeout of 0 disables this
281 feature.  The default is 0.
282 .TP
283 .B include <filename>
284 Read additional configuration information from the given file before
285 continuing with the next line of the current file.
286 .TP
287 .B limits <who> <limit> [<limit> [...]]
288 Specify time and size limits based on who initiated an operation.
289 The argument
290 .B who
291 can be any of
292 .RS
293 .RS
294 .TP
295 anonymous | users | [dn[.<style>]=]<pattern>
296
297 .RE
298 with
299 .RS
300 .TP
301 <style> ::= exact | base | one | subtree | children | regex | anonymous
302
303 .RE
304 The term
305 .B anonymous
306 matches all unauthenticated clients.
307 the term
308 .B users
309 matches all authenticated clients;
310 otherwise a
311 .B regex
312 dn pattern is assumed unless otherwise specified by qualifying 
313 the (optional) key string
314 .B dn
315 with 
316 .B exact
317 or
318 .B base
319 (which are synonyms), to require an exact match; with
320 .BR one, 
321 to require exactly one level of depth match; with
322 .BR subtree,
323 to allow any level of depth match, including the exact match; with
324 .BR children,
325 to allow any level of depth match, not including the exact match;
326 .BR regex
327 explicitly requires the (default) match based on regular expression
328 pattern, as detailed in
329 .BR regex (7).
330 Finally,
331 .B anonymous
332 matches unbound operations; the 
333 .B pattern
334 field is ignored.
335 The same behavior is obtained by using the 
336 .B anonymous
337 form of the
338 .B who
339 clause.
340
341 The currently supported limits are 
342 .B size
343 and 
344 .BR time.
345
346 The syntax for time limits is 
347 .BR time[.{soft|hard}]=<integer> ,
348 where 
349 .BR integer
350 is the number of seconds slapd will spend answering a search request.
351 If no time limit is explicitly requested by the client, the 
352 .BR soft
353 limit is used; if the requested time limit exceeds the
354 .BR hard
355 limit, an "Administrative limit exceeded" is returned.
356 If the
357 .BR hard
358 limit is set to 0 or to the keyword "soft", the soft limit is used 
359 in either case; if it is set to -1 or to the keyword "none", 
360 no hard limit is enforced.
361 Explicit requests for time limits smaller or equal to the
362 .BR hard 
363 limit are honored.
364 If no flag is set, the value is assigned to the 
365 .BR soft 
366 limit, and the
367 .BR hard
368 limit is set to zero, to preserve the original behavior.
369
370 The syntax for size limits is
371 .BR size[.{soft|hard|unchecked}]=<integer> ,
372 where
373 .BR integer
374 is the maximum number of entries slapd will return answering a search 
375 request.
376 If no size limit is explicitly requested by the client, the
377 .BR soft
378 limit is used; if the requested size limit exceeds the
379 .BR hard
380 limit, an "Administrative limit exceeded" is returned.
381 If the 
382 .BR hard
383 limit is set to 0 or to the keyword "soft", the soft limit is used 
384 in either case; if it is set to -1 or to the keyword "none", 
385 no hard limit is enforced.
386 Explicit requests for size limits smaller or equal to the
387 .BR hard
388 limit are honored.
389 The
390 .BR unchecked
391 flag sets a limit on the number of candidates a search request is allowed
392 to examine.
393 If the selected candidates exceed the 
394 .BR unchecked
395 limit, the search will abort with "Unwilling to perform".
396 If it is set to -1 or to the keyword "none", no limit is applied (the default).
397 If no flag is set, the value is assigned to the
398 .BR soft 
399 limit, and the
400 .BR hard
401 limit is set to zero, to preserve the original behavior.
402
403 In case of no match, the global limits are used.
404 The default values are the same of
405 .BR sizelimit
406 and
407 .BR timelimit ;
408 no limit is set on 
409 .BR unchecked .
410
411 If 
412 .B pagedResults
413 control is defined, additional size limits may be enforced; the syntax is
414 .BR size.pr={<integer>|noEstimate} ,
415 where
416 .BR integer
417 is the max page size if no explicit limit is set; the keyword
418 .BR noEstimate
419 inhibits the server to return an estimate of the total number
420 of entries that will be returned.
421 .RE
422 .\".TP
423 .\".B logfile <filename>
424 .\"Specify a file for recording debug log messages. By default these messages
425 .\"only go to stderr and are not recorded anywhere else. Specifying a logfile
426 .\"copies messages to both stderr and the logfile.
427 .TP
428 .B loglevel <integer>
429 Specify the level at which debugging statements and operation 
430 statistics should be syslogged (currently logged to the
431 .BR syslogd (8) 
432 LOG_LOCAL4 facility).  Log levels are additive, and available levels
433 are:
434 .RS
435 .RS
436 .PD 0
437 .TP
438 .B 1
439 trace function calls
440 .TP
441 .B 2
442 debug packet handling
443 .TP
444 .B 4
445 heavy trace debugging
446 .TP
447 .B 8
448 connection management
449 .TP
450 .B 16
451 print out packets sent and received
452 .TP
453 .B 32
454 search filter processing
455 .TP
456 .B 64
457 configuration file processing
458 .TP
459 .B 128
460 access control list processing
461 .TP
462 .B 256
463 stats log connections/operations/results
464 .TP
465 .B 512
466 stats log entries sent
467 .TP
468 .B 1024
469 print communication with shell backends
470 .TP
471 .B 2048
472 entry parsing
473 .PD
474 .RE
475 .RE
476 .TP
477 .B moduleload <filename>
478 Specify the name of a dynamically loadable module to load. The filename
479 may be an absolute path name or a simple filename. Non-absolute names
480 are searched for in the directories specified by the
481 .B modulepath
482 option. This option and the
483 .B modulepath
484 option are only usable if slapd was compiled with --enable-modules.
485 .TP
486 .B modulepath <pathspec>
487 Specify a list of directories to search for loadable modules. Typically
488 the path is colon-separated but this depends on the operating system.
489 .HP
490 .hy 0
491 .B objectclass "(\ <oid>\
492  [NAME\ <name>]\
493  [DESC\ <description]\
494  [OBSOLETE]\
495  [SUP\ <oids>]\
496  [{ ABSTRACT | STRUCTURAL | AUXILIARY }]\
497  [MUST\ <oids>] [MAY\ <oids>] )"
498 .RS
499 Specify an objectclass using the LDAPv3 syntax defined in RFC 2252.
500 The slapd parser extends the RFC 2252 definition by allowing string
501 forms as well as numeric OIDs to be used for the object class OID.
502 (See the
503 .B
504 objectidentifier
505 description.)  Object classes are "STRUCTURAL" by default.
506 .RE
507 .TP
508 .B objectidentifier <name> "{ <oid> | <name>[:<suffix>] }"
509 Define a string name that equates to the given OID. The string can be used
510 in place of the numeric OID in objectclass and attribute definitions. The
511 name can also be used with a suffix of the form ":xx" in which case the
512 value "oid.xx" will be used.
513 .TP
514 .B password-hash <hash>
515 This option sets the hash to be used in generation of user
516 passwords, stored in userPassword, during processing of
517 LDAP Password Modify Extended Operations (RFC 3062).
518 The <hash> must be one of
519 .BR {SSHA} ,
520 .BR {SHA} ,
521 .BR {SMD5} ,
522 .BR {MD5} ,
523 .BR {CRYPT} ,
524 and
525 .BR {CLEARTEXT} .
526 The default is
527 .BR {SSHA} .
528
529 .B {SHA}
530 and
531 .B {SSHA}
532 use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
533
534 .B {MD5}
535 and
536 .B {SMD5}
537 use the MD5 algorithm (RFC 1321), the latter with a seed.
538
539 .B {CRYPT}
540 uses the
541 .BR crypt (3).
542
543 .B {CLEARTEXT}
544 indicates that the new password should be
545 added to userPassword as clear text.
546
547 Note that this option does not alter the normal user applications
548 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
549 .TP
550 .B password\-crypt\-salt\-format <format>
551 Specify the format of the salt passed to
552 .BR crypt (3)
553 when generating {CRYPT} passwords (see
554 .BR password\-hash )
555 during processing of LDAP Password Modify Extended Operations (RFC 3062).
556
557 This string needs to be in
558 .BR sprintf (3)
559 format and may include one (and only one) %s conversion.
560 This conversion will be substituted with a string random
561 characters from [A\-Za\-z0\-9./].  For example, "%.2s"
562 provides a two character salt and "$1$%.8s" tells some
563 versions of crypt(3) to use an MD5 algorithm and provides
564 8 random characters of salt.  The default is "%s", which
565 provides 31 characters of salt.
566 .TP
567 .B pidfile <filename>
568 The ( absolute ) name of a file that will hold the 
569 .B slapd
570 server's process ID ( see
571 .BR getpid (2)
572 ) if started without the debugging command line option.
573 .TP
574 .B referral <url>
575 Specify the referral to pass back when
576 .BR slapd (8)
577 cannot find a local database to handle a request.
578 If specified multiple times, each url is provided.
579 .TP
580 .B replica-argsfile
581 The ( absolute ) name of a file that will hold the 
582 .B slurpd
583 server's command line options
584 if started without the debugging command line option.
585 .TP
586 .B replica-pidfile
587 The ( absolute ) name of a file that will hold the 
588 .B slurpd
589 server's process ID ( see
590 .BR getpid (2)
591 ) if started without the debugging command line option.
592 .TP
593 .B require <conditions>
594 Specify a set of conditions (separated by white space) to
595 require (default none).
596 The directive may be specified globally and/or per-database.
597 .B bind
598 requires bind operation prior to directory operations.
599 .B LDAPv3
600 requires session to be using LDAP version 3.
601 .B authc
602 requires authentication prior to directory operations.
603 .B SASL
604 requires SASL authentication prior to directory operations.
605 .B strong
606 requires strong authentication prior to directory operations.
607 The strong keyword allows protected "simple" authentication
608 as well as SASL authentication.
609 .B none
610 may be used to require no conditions (useful for clearly globally
611 set conditions within a particular database).
612 .TP
613 .B reverse-lookup on | off
614 Enable/disable client name unverified reverse lookup (default is 
615 .BR off 
616 if compiled with --enable-rlookups).
617 .TP
618 .B rootDSE <file>
619 Specify the name of an LDIF(5) file containing user defined attributes
620 for the root DSE.  These attributes are returned in addition to the
621 attributes normally produced by slapd.
622 .TP
623 .B sasl-authz-policy <policy>
624 Used to specify which rules to use for SASL Proxy Authorization. Proxy
625 authorization allows a client to authenticate to the server using one
626 user's credentials, but specify a different identity to use for authorization
627 and access control purposes. It essentially allows user A to login as user
628 B, using user A's password.
629 The
630 .B none
631 flag disables proxy authorization. This is the default setting.
632 The
633 .B from
634 flag will use rules in the
635 .I saslAuthzFrom
636 attribute of the authorization DN.
637 The
638 .B to
639 flag will use rules in the
640 .I saslAuthzTo
641 attribute of the authentication DN.
642 The
643 .B any
644 flag, an alias for the deprecated value of
645 .BR both ,
646 will allow any of the above, whatever succeeds first (checked in
647 .BR to ,
648 .B from
649 sequence.
650 The
651 .B all
652 flag requires both authorizations to succeed.
653 The rules are simply regular expressions specifying which DNs are allowed 
654 to perform proxy authorization.
655 The
656 .I saslAuthzFrom
657 attribute in an entry specifies which other users
658 are allowed to proxy login to this entry. The
659 .I saslAuthzTo
660 attribute in
661 an entry specifies which other users this user can authorize as.  Use of
662 .I saslAuthzTo
663 rules can be easily
664 abused if users are allowed to write arbitrary values to this attribute.
665 In general the
666 .I saslAuthzTo
667 attribute must be protected with ACLs such that
668 only privileged users can modify it.
669 .TP
670 .B sasl-host <fqdn>
671 Used to specify the fully qualified domain name used for SASL processing.
672 .TP
673 .B sasl-realm <realm>
674 Specify SASL realm.  Default is empty.
675 .TP
676 .B sasl-regexp <match> <replace>
677 Used by the SASL mechanism to convert a SASL authenticated 
678 username to an LDAP DN used for authorization purposes.  Note that
679 the resultant DN need not refer to an existing entry to be considered
680 valid.  When an authorization request is received, the SASL 
681 .B USERNAME, REALM, 
682 and
683 .B MECHANISM
684 are taken, when available, and combined into a SASL name of the 
685 form
686 .RS
687 .RS
688 .TP
689 .B UID=<username>[[,CN=<realm>],CN=<mechanism>,]CN=auth
690
691 .RE
692 This SASL name is then compared against the
693 .B match
694 regular expression, and if the match is successful, the SASL name is
695 replaced with the
696 .B replace
697 string. If there are wildcard strings in the 
698 .B match
699 regular expression that are enclosed in parenthesis, e.g. 
700 .RS
701 .TP
702 .B UID=([^,]*),CN=.*
703
704 .RE
705 then the portion of the SASL name that matched the wildcard will be stored
706 in the numbered placeholder variable $1. If there are other wildcard strings
707 in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The 
708 placeholders can then be used in the 
709 .B replace
710 string, e.g. 
711 .RS
712 .TP
713 .B UID=$1,OU=Accounts,DC=example,DC=com 
714
715 .RE
716 The replaced SASL name can be either a DN or an LDAP URI. If the
717 latter, the server will use the URI to search its own database(s)
718 and, if the search returns exactly one entry, the SASL name is
719 replaced by the DN of that entry.   The LDAP URI must have no
720 hostport, attrs, or extensions components, e.g.
721 .RS
722 .TP
723 .B ldap:///OU=Accounts,DC=example,DC=com??one?(UID=$1)
724
725 .RE
726 Multiple 
727 .B sasl-regexp 
728 options can be given in the configuration file to allow for multiple matching 
729 and replacement patterns. The matching patterns are checked in the order they 
730 appear in the file, stopping at the first successful match.
731
732 .\".B Caution:
733 .\"Because the plus sign + is a character recognized by the regular expression engine,
734 .\"and it will appear in SASL names that include a REALM, be careful to escape the
735 .\"plus sign with a backslash \\+ to remove the character's special meaning.
736 .RE
737 .TP
738 .B sasl-secprops <properties>
739 Used to specify Cyrus SASL security properties.
740 The
741 .B none
742 flag (without any other properties) causes the flag properties
743 default, "noanonymous,noplain", to be cleared.
744 The
745 .B noplain
746 flag disables mechanisms susceptible to simple passive attacks.
747 The
748 .B noactive
749 flag disables mechanisms susceptible to active attacks.
750 The
751 .B nodict
752 flag disables mechanisms susceptible to passive dictionary attacks.
753 The
754 .B noanonymous
755 flag disables mechanisms which support anonymous login.
756 The
757 .B forwardsec
758 flag require forward secrecy between sessions.
759 The
760 .B passcred
761 require mechanisms which pass client credentials (and allow
762 mechanisms which can pass credentials to do so).
763 The
764 .B minssf=<factor> 
765 property specifies the minimum acceptable
766 .I security strength factor
767 as an integer approximate to effective key length used for
768 encryption.  0 (zero) implies no protection, 1 implies integrity
769 protection only, 56 allows DES or other weak ciphers, 112
770 allows triple DES and other strong ciphers, 128 allows RC4,
771 Blowfish and other modern strong ciphers.  The default is 0.
772 The
773 .B maxssf=<factor> 
774 property specifies the maximum acceptable
775 .I security strength factor
776 as an integer (see minssf description).  The default is INT_MAX.
777 The
778 .B maxbufsize=<size> 
779 property specifies the maximum security layer receive buffer
780 size allowed.  0 disables security layers.  The default is 65536.
781 .TP
782 .B schemadn <dn>
783 Specify the distinguished name for the subschema subentry that
784 controls the entries on this server.  The default is "cn=Subschema".
785 .TP
786 .B security <factors>
787 Specify a set of factors (separated by white space) to require.
788 An integer value is associated with each factor and is roughly
789 equivalent of the encryption key length to require.  A value
790 of 112 is equivalent to 3DES, 128 to Blowfish, etc..
791 The directive may be specified globally and/or per-database.
792 .B ssf=<n>
793 specifies the overall security strength factor.
794 .B transport=<n>
795 specifies the transport security strength factor.
796 .B tls=<n>
797 specifies the TLS security strength factor.
798 .B sasl=<n>
799 specifies the SASL security strength factor.
800 .B update_ssf=<n>
801 specifies the overall security strength factor to require for
802 directory updates.
803 .B update_transport=<n>
804 specifies the transport security strength factor to require for
805 directory updates.
806 .B update_tls=<n>
807 specifies the TLS security strength factor to require for
808 directory updates.
809 .B update_sasl=<n>
810 specifies the SASL security strength factor to require for
811 directory updates.
812 .B simple_bind=<n>
813 specifies the security strength factor required for
814 .I simple
815 username/password authentication.
816 Note that the
817 .B transport
818 factor is measure of security provided by the underlying transport,
819 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
820 .TP
821 .B sizelimit {<integer>|unlimited}
822 .TP
823 .B sizelimit size[.{soft|hard|unchecked}]=<integer> [...]
824 Specify the maximum number of entries to return from a search operation.
825 The default size limit is 500.
826 Use
827 .B -1
828 or 
829 .B unlimited
830 to specify no limits.
831 The second format allows a fine grain setting of the size limits.
832 Extra args can be added on the same line.
833 See
834 .BR limits
835 for an explanation of the different flags.
836 .TP
837 .B sockbuf_max_incoming <integer>
838 Specify the maximum incoming LDAP PDU size for anonymous sessions.
839 The default is 262143.
840 .TP
841 .B sockbuf_max_incoming_auth <integer>
842 Specify the maximum incoming LDAP PDU size for authenticated sessions.
843 The default is 4194303.
844 .TP
845 .B srvtab <filename>
846 Specify the srvtab file in which the kerberos keys necessary for
847 authenticating clients using kerberos can be found. This option is only
848 meaningful if you are using Kerberos authentication.
849 .TP
850 .B threads <integer>
851 Specify the maximum size of the primary thread pool.
852 The default is 16.
853 .TP
854 .B timelimit {<integer>|unlimited}
855 .TP
856 .B timelimit time[.{soft|hard}]=<integer> [...]
857 Specify the maximum number of seconds (in real time)
858 .B slapd
859 will spend answering a search request.  The default time limit is 3600.
860 Use
861 .B -1
862 or 
863 .B unlimited
864 to specify no limits.
865 The second format allows a fine grain setting of the time limits.
866 Extra args can be added on the same line.
867 See
868 .BR limits
869 for an explanation of the different flags.
870 .TP
871 .B ucdata-path <path>
872 Specify the path to the directory containing the Unicode character
873 tables. The default path is DATADIR/ucdata.
874 .SH TLS OPTIONS
875 If
876 .B slapd
877 is built with support for Transport Layer Security, there are more options
878 you can specify.
879 .TP
880 .B TLSCipherSuite <cipher-suite-spec>
881 Permits configuring what ciphers will be accepted and the preference order.
882 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
883
884 TLSCipherSuite HIGH:MEDIUM:+SSLv2
885
886 To check what ciphers a given spec selects, use:
887
888 openssl ciphers -v <cipher-suite-spec>
889 .TP
890 .B TLSCACertificateFile <filename>
891 Specifies the file that contains certificates for all of the Certificate
892 Authorities that
893 .B slapd
894 will recognize.
895 .TP
896 .B TLSCACertificatePath <path>
897 Specifies the path of a directory that contains Certificate Authority
898 certificates in separate individual files. Usually only one of this
899 or the TLSCACertificateFile is used.
900 .TP
901 .B TLSCertificateFile <filename>
902 Specifies the file that contains the
903 .B slapd
904 server certificate.
905 .TP
906 .B TLSCertificateKeyFile <filename>
907 Specifies the file that contains the
908 .B slapd
909 server private key that matches the certificate stored in the
910 .B TLSCertificateFile
911 file.  Currently, the private key must not be protected with a password, so
912 it is of critical importance that it is protected carefully. 
913 .TP
914 .B TLSRandFile <filename>
915 Specifies the file to obtain random bits from when /dev/[u]random
916 is not available.  Generally set to the name of the EGD/PRNGD socket.
917 The environment variable RANDFILE can also be used to specify the filename.
918 .TP
919 .B TLSVerifyClient <level>
920 Specifies what checks to perform on client certificates in an
921 incoming TLS session, if any.
922 The
923 .B <level>
924 can be specified as one of the following keywords:
925 .RS
926 .TP
927 .B never
928 This is the default.
929 .B slapd
930 will not ask the client for a certificate.
931 .TP
932 .B allow
933 The client certificate is requested.  If no certificate is provided,
934 the session proceeds normally.  If a bad certificate is provided,
935 it will be ignored and the session proceeds normally.
936 .TP
937 .B try
938 The client certificate is requested.  If no certificate is provided,
939 the session proceeds normally.  If a bad certificate is provided,
940 the session is immediately terminated.
941 .TP
942 .B demand | hard | true
943 These keywords are all equivalent, for compatibility reasons.
944 The client certificate is requested.  If no certificate is provided,
945 or a bad certificate is provided, the session is immediately terminated.
946
947 Note that a valid client certificate is required in order to use the
948 SASL EXTERNAL authentication mechanism with a TLS session.  As such,
949 a non-default
950 .B TLSVerifyClient
951 setting must be chosen to enable SASL EXTERNAL authentication.
952 .RE
953 .SH GENERAL BACKEND OPTIONS
954 Options in this section only apply to the configuration file section
955 for the specified backend.  They are supported by every
956 type of backend.
957 .TP
958 .B backend <databasetype>
959 Mark the beginning of a backend definition. <databasetype>
960 should be one of
961 .B bdb,
962 .B dnssrv,
963 .B ldap,
964 .B ldbm,
965 .B meta,
966 .B monitor,
967 .B null,
968 .B passwd,
969 .B perl,
970 .B shell,
971 .B sql,
972 or
973 .B tcl,
974 depending on which backend will serve the database.
975
976 .SH GENERAL DATABASE OPTIONS
977 Options in this section only apply to the configuration file section
978 for the database in which they are defined.  They are supported by every
979 type of backend.  Note that the
980 .B database
981 and at least one
982 .B suffix
983 option are mandatory for each database.
984 .TP
985 .B database <databasetype>
986 Mark the beginning of a new database instance definition. <databasetype>
987 should be one of
988 .B bdb,
989 .B dnssrv,
990 .B ldap,
991 .B ldbm,
992 .B meta,
993 .B monitor,
994 .B null,
995 .B passwd,
996 .B perl,
997 .B shell,
998 .B sql,
999 or
1000 .B tcl,
1001 depending on which backend will serve the database.
1002 .TP
1003 .B lastmod on | off
1004 Controls whether
1005 .B slapd
1006 will automatically maintain the 
1007 modifiersName, modifyTimestamp, creatorsName, and 
1008 createTimestamp attributes for entries.  By default, lastmod is on.
1009 .TP
1010 .B maxderefdepth <depth>
1011 Specifies the maximum number of aliases to dereference when trying to
1012 resolve an entry, used to avoid infinite alias loops. The default is 1.
1013 .TP
1014 .B readonly on | off
1015 This option puts the database into "read-only" mode.  Any attempts to 
1016 modify the database will return an "unwilling to perform" error.  By
1017 default, readonly is off.
1018 .HP
1019 .hy 0
1020 .B replica uri=ldap[s]://<hostname>[:port]|host=<hostname>[:port] 
1021 .B [starttls=yes|critical]
1022 .B [suffix=<suffix> [...]]
1023 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
1024 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
1025 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
1026 .B [attr[!]=<attr list>]
1027 .RS
1028 Specify a replication site for this database.  Refer to the "OpenLDAP 
1029 Administrator's Guide" for detailed information on setting up a replicated
1030 .B slapd
1031 directory service. Zero or more
1032 .B suffix
1033 instances can be used to select the subtrees that will be replicated
1034 (defaults to all the database). 
1035 .B host
1036 is deprecated in favor of the
1037 .B uri
1038 option.
1039 .B uri
1040 allows the replica LDAP server to be specified as an LDAP URI. 
1041 A
1042 .B bindmethod
1043 of
1044 .B simple
1045 requires the options
1046 .B binddn 
1047 and
1048 .B credentials  
1049 and should only be used when adequate security services 
1050 (e.g TLS or IPSEC) are in place. A
1051 .B bindmethod 
1052 of
1053 .B sasl 
1054 requires the option
1055 .B saslmech. 
1056 Specific security properties (as with the
1057 .B sasl-secprops
1058 keyword above) for a SASL bind can be set with the
1059 .B secprops
1060 option. A non-default SASL realm can be set with the
1061 .B realm
1062 option.
1063 If the 
1064 .B mechanism
1065 will use Kerberos, a kerberos instance should be given in 
1066 .B authcId.
1067 An
1068 .B attr list
1069 can be given after the 
1070 .B attr
1071 keyword to allow the selective replication of the listed attributes only;
1072 if the optional 
1073 .B !
1074 mark is used, the list is considered exclusive, i.e. the listed attributes
1075 are not replicated.
1076 If an objectClass is listed, all the related attributes
1077 are (are not) replicated.
1078 .RE
1079 .TP
1080 .B replogfile <filename>
1081 Specify the name of the replication log file to log changes to.  
1082 The replication log is typically written by
1083 .BR slapd (8)
1084 and read by
1085 .BR slurpd (8).
1086 See
1087 .BR slapd.replog (5)
1088 for more information.  The specified file should be located
1089 in a directory with limited read/write/execute access as the replication
1090 logs may contain sensitive information.
1091 .TP
1092 .B rootdn <dn>
1093 Specify the distinguished name that is not subject to access control 
1094 or administrative limit restrictions for operations on this database.
1095 This DN may or may not be associated with an entry.  An empty root
1096 DN (the default) specifies no root access is to be granted.  It is
1097 recommended that the rootdn only be specified when needed (such as
1098 when initially populating a database).  If the rootdn is within
1099 a namingContext (suffix) of the database, a simple bind password
1100 may also be provided using the
1101 .B rootpw
1102 directive.
1103 .TP
1104 .B rootpw <password>
1105 Specify a password (or hash of the password) for the rootdn.  The
1106 password can only be set if the rootdn is within the namingContext
1107 (suffix) of the database.
1108 This option accepts all RFC 2307 userPassword formats known to
1109 the server (see 
1110 .B password-hash
1111 description) as well as cleartext.
1112 .BR slappasswd (8) 
1113 may be used to generate a hash of a password.  Cleartext
1114 and \fB{CRYPT}\fP passwords are not recommended.  If empty
1115 (the default), authentication of the root DN is by other means
1116 (e.g. SASL).  Use of SASL is encouraged.
1117 .TP
1118 .B suffix <dn suffix>
1119 Specify the DN suffix of queries that will be passed to this 
1120 backend database.  Multiple suffix lines can be given and at least one is 
1121 required for each database definition.
1122 If the suffix of one database is "inside" that of another, the database
1123 with the inner suffix must come first in the configuration file.
1124 .TP
1125 .B subordinate
1126 Specify that the current backend database is a subordinate of another
1127 backend database. A subordinate database may have only one suffix. This
1128 option may be used to glue multiple databases into a single namingContext.
1129 If the suffix of the current database is within the namingContext of a
1130 superior database, searches against the superior database will be
1131 propagated to the subordinate as well. All of the databases
1132 associated with a single namingContext should have identical rootdns.
1133 Behavior of other LDAP operations is unaffected by this setting. In
1134 particular, it is not possible to use moddn to move an entry from
1135 one subordinate to another subordinate within the namingContext.
1136 .HP
1137 .hy 0
1138 .B syncrepl rid=<replica ID>
1139 .B provider=ldap[s]://<hostname>[:port]
1140 .B [type=refreshOnly|refreshAndPersist]
1141 .B [interval=dd:hh:mm:ss]
1142 .B [searchbase=<base DN>]
1143 .B [filter=<filter str>]
1144 .B [scope=sub|one|base]
1145 .B [attrs=<attr list>]
1146 .B [attrsonly]
1147 .B [sizelimit=<limit>]
1148 .B [timelimit=<limit>]
1149 .B [schemachecking=on|off]
1150 .B [updatedn=<dn>]
1151 .B [bindmethod=simple|sasl]
1152 .B [binddn=<dn>]
1153 .B [saslmech=<mech>]
1154 .B [authcid=<identity>]
1155 .B [authzid=<identity>]
1156 .B [credentials=<passwd>]
1157 .B [realm=<realm>]
1158 .B [secprops=<properties>]
1159 .RS
1160 Specify the current database as a replica which is kept up-to-date with the 
1161 master content by establishing the current
1162 .BR slapd (8)
1163 as a replication consumer site running a
1164 .B syncrepl
1165 replication engine.
1166 The replica content is kept synchronized to the master content using
1167 the LDAP Content Synchronization protocol. Refer to the
1168 "OpenLDAP Administrator's Guide" for detailed information on
1169 setting up a replicated
1170 .B slapd
1171 directory service using the 
1172 .B syncrepl
1173 replication engine.
1174 .B rid
1175 identifies the current
1176 .B syncrepl
1177 directive within the replication consumer site.
1178 It is a non-negative integer having no more than three digits.
1179 .B provider
1180 specifies the replication provider site containing the master content
1181 as an LDAP URI. If <port> is not given, the standard LDAP port number
1182 (389 or 636) is used. The content of the
1183 .B syncrepl
1184 replica is defined using a search
1185 specification as its result set. The consumer
1186 .B slapd
1187 will send search requests to the provider
1188 .B slapd
1189 according to the search specification. The search specification includes
1190 .B searchbase, scope, filter, attrs, attrsonly, sizelimit,
1191 and
1192 .B timelimit
1193 parameters as in the normal search specification.
1194 The search specification for the LDAP Content Synchronization operation
1195 has the same value syntax and the same default values as in the
1196 .BR ldapsearch (1)
1197 client search tool.
1198 The LDAP Content Synchronization protocol has two operation types.
1199 In the
1200 .B refreshOnly
1201 operation, the next synchronization search operation
1202 is periodically rescheduled at an interval time (specified by 
1203 .B interval
1204 parameter; 1 day by default)
1205 after each synchronization operation finishes.
1206 In the
1207 .B refreshAndPersist
1208 operation, a synchronization search remains persistent in the provider slapd.
1209 Further updates to the master replica will generate
1210 .B searchResultEntry
1211 to the consumer slapd as the search responses to the persistent
1212 synchronization search. The schema checking can be enforced at the LDAP Sync
1213 consumer site by turning on the
1214 .B schemachecking
1215 parameter. The default is off.
1216 The
1217 .B updatedn
1218 parameter specifies the DN in the consumer site
1219 which is allowed to make changes to the replica.
1220 The DN should have read/write access to the replica database.
1221 Generally, this DN
1222 .I should not
1223 be the same as the
1224 .BR rootdn .
1225 A
1226 .B bindmethod
1227 of 
1228 .B simple
1229 requires the options 
1230 .B binddn
1231 and 
1232 .B credentials
1233 and should only be used when adequate security services
1234 (e.g. TLS or IPSEC) are in place.
1235 A
1236 .B bindmethod
1237 of
1238 .B sasl
1239 requires the option
1240 .B saslmech.
1241 Depending on the mechanism, an authentication identity and/or
1242 credentials can be specified using
1243 .B authcid
1244 and
1245 .B credentials.
1246 The
1247 .B authzid
1248 parameter may be used to specify an authorization identity.
1249 Specific security properties (as with the
1250 .B sasl-secprops
1251 keyword above) for a SASL bind can be set with the
1252 .B secprops
1253 option. A non default SASL realm can be set with the
1254 .B realm 
1255 option.
1256 .RE
1257 .TP
1258 .B updatedn <dn>
1259 This option is only applicable in a slave
1260 .B slapd. 
1261 It specifies the DN permitted to update (subject to access controls)
1262 the replica (typically, this is the DN
1263 .BR slurpd (8)
1264 binds to update the replica).  Generally, this DN
1265 .I should not
1266 be the same as the
1267 .BR rootdn .
1268 .TP
1269 .B updateref <url>
1270 Specify the referral to pass back when
1271 .BR slapd (8)
1272 is asked to modify a replicated local database.
1273 If specified multiple times, each url is provided.
1274
1275 .SH DATABASE-SPECIFIC OPTIONS
1276 Each database may allow specific configuration options; they are
1277 documented separately in the backends' manual pages.
1278 .SH BACKENDS
1279 The following backends can be compiled into slapd.
1280 They are documented in the
1281 .BR slapd-<backend> (5)
1282 manual pages.
1283 .TP
1284 .B bdb
1285 This is the recommended backend for a normal slapd database.
1286 However, it takes more care than with the LDBM backend to configure
1287 it properly.
1288 It uses the Sleepycat Berkeley DB (BDB) package to store data.
1289 .TP
1290 .B ldbm
1291 This is the database backend which is easiest to configure.
1292 However, it does not offer the data durability features of the BDB
1293 backend.
1294 It uses Berkeley DB or GDBM to store data.
1295 .TP
1296 .B dnssrv
1297 This backend is experimental.
1298 It serves up referrals based upon SRV resource records held in the
1299 Domain Name System.
1300 .TP
1301 .B ldap
1302 This backend acts as a proxy to forward incoming requests to another
1303 LDAP server.
1304 .TP
1305 .B meta
1306 This backend performs basic LDAP proxying with respect to a set of
1307 remote LDAP servers. It is an enhancement of the ldap backend. The
1308 proxy cache extension of meta backend provides answering of search
1309 requests from the proxy using results of previously cached requests.
1310 .TP
1311 .B monitor
1312 This backend provides information about the running status of the slapd
1313 daemon.
1314 .TP
1315 .B null
1316 Operations in this backend succeed but do nothing.
1317 .TP
1318 .B passwd
1319 This backend is provided for demonstration purposes only.
1320 It serves up user account information from the system
1321 .BR passwd (5)
1322 file.
1323 .TP
1324 .B perl
1325 This backend embeds a
1326 .BR perl (1)
1327 interpreter into slapd.
1328 It runs Perl subroutines to implement LDAP operations.
1329 .TP
1330 .B shell
1331 This backend executes external programs to implement LDAP operations.
1332 It is is primarily intended to be used in prototypes.
1333 .TP
1334 .B sql
1335 This backend is experimental.
1336 It services LDAP requests from an SQL database.
1337 .TP
1338 .B tcl
1339 This backend is experimental.
1340 It embeds a
1341 .BR Tcl (3tcl)
1342 interpreter into slapd.
1343 It runs Tcl commands to implement LDAP operations.
1344 .SH EXAMPLES
1345 .LP
1346 Here is a short example of a configuration file:
1347 .LP
1348 .RS
1349 .nf
1350 include   SYSCONFDIR/schema/core.schema
1351 pidfile   LOCALSTATEDIR/slapd.pid
1352
1353 # Subtypes of "name" (e.g. "cn" and "ou") with the
1354 # option ";x-hidden" can be searched for/compared,
1355 # but are not shown.  See \fBslapd.access\fP(5).
1356 attributeoptions x-hidden lang-
1357 access to attr=name;x-hidden by * =cs
1358
1359 database  bdb
1360 suffix    "dc=our-domain,dc=com"
1361 # The database directory MUST exist prior to
1362 # running slapd AND should only be accessible
1363 # by the slapd/tools. Mode 0700 recommended.
1364 directory LOCALSTATEDIR/openldap-data
1365 # Indices to maintain
1366 index     objectClass  eq
1367 index     cn,sn,mail   pres,eq,approx,sub
1368
1369 # We serve small clients that do not handle referrals,
1370 # so handle remote lookups on their behalf.
1371 database  ldap
1372 suffix    ""
1373 uri       ldap://ldap.some-server.com/
1374 lastmod   off
1375 .fi
1376 .RE
1377 .LP
1378 "OpenLDAP Administrator's Guide" contains a longer annotated
1379 example of a configuration file.
1380 The original ETCDIR/slapd.conf is another example.
1381 .SH FILES
1382 .TP
1383 ETCDIR/slapd.conf
1384 default slapd configuration file
1385 .SH SEE ALSO
1386 .BR ldap (3),
1387 .BR slapd-bdb (5),
1388 .BR slapd-dnssrv (5),
1389 .BR slapd-ldap (5),
1390 .BR slapd-ldbm (5),
1391 .BR slapd-meta (5),
1392 .BR slapd-monitor (5),
1393 .BR slapd-null (5),
1394 .BR slapd-passwd (5),
1395 .BR slapd-perl (5),
1396 .BR slapd-shell (5),
1397 .BR slapd-sql (5),
1398 .BR slapd-tcl (5),
1399 .BR slapd.access (5),
1400 .BR slapd.plugin (5),
1401 .BR slapd.replog (5),
1402 .BR slapd (8),
1403 .BR slapadd (8),
1404 .BR slapcat (8),
1405 .BR slapindex (8),
1406 .BR slappasswd (8),
1407 .BR slurpd (8),
1408 .LP
1409 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1410 .SH ACKNOWLEDGEMENTS
1411 .B OpenLDAP
1412 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1413 .B OpenLDAP
1414 is derived from University of Michigan LDAP 3.3 Release.