]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-config.5
happy new year
[openldap] / doc / man / man5 / slapd-config.5
1 .TH SLAPD-CONFIG 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2007 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd-config \- configuration backend
7 .SH SYNOPSIS
8 ETCDIR/slapd.d
9 .SH DESCRIPTION
10 The
11 .B config
12 backend manages all of the configuration information for the
13 .BR slapd (8)
14 daemon.  This configuration information is also used by the SLAPD tools
15 .BR slapacl (8),
16 .BR slapadd (8),
17 .BR slapauth (8),
18 .BR slapcat (8),
19 .BR slapdn (8),
20 .BR slapindex (8),
21 and
22 .BR slaptest (8).
23 .LP
24 The
25 .B config
26 backend is backward compatible with the older
27 .BR slapd.conf (5)
28 file but provides the ability to change the configuration dynamically
29 at runtime. If slapd is run with only a
30 .B slapd.conf
31 file dynamic changes will be allowed but they will not persist across
32 a server restart. Dynamic changes are only saved when slapd is running
33 from a
34 .B slapd.d
35 configuration directory.
36 .LP
37
38 Unlike other backends, there can only be one instance of the
39 .B config
40 backend, and most of its structure is predefined. The root of the
41 database is hardcoded to
42 .B "cn=config"
43 and this root entry contains
44 global settings for slapd. Multiple child entries underneath the
45 root entry are used to carry various other settings:
46 .RS
47 .TP
48 .B cn=Include
49 old-style include files
50 .TP
51 .B cn=Module
52 dynamically loaded modules
53 .TP
54 .B cn=Schema
55 schema definitions
56 .TP
57 .B olcBackend=xxx
58 backend-specific settings
59 .TP
60 .B olcDatabase=xxx
61 database-specific settings
62 .RE
63
64 The
65 .B cn=Include
66 entries will only appear in configurations that were
67 converted from slapd.conf format. There can be multiple entries, one
68 for each included file. These entries only serve as placeholders to
69 document the fact that files were previously included. After those
70 files have been read and parsed, their content is merged into the
71 main configuration and then the include files are ignored thereafter.
72 These entries may form an arbitrarily deep subtree, reflecting any
73 nesting of the original include files.
74
75 The
76 .B cn=Module
77 entries will only appear in configurations where slapd
78 was built with support for dynamically loaded modules. There can be
79 multiple entries, one for each configured module path. Within each
80 entry there will be values recorded for each module loaded on a
81 given path. These entries have no children.
82
83 The
84 .B cn=Schema
85 entry contains all of the hardcoded schema elements.
86 The children of this entry contain all user-defined schema elements.
87 In schema that were loaded from include files, the child entry will
88 be named after the include file from which the schema was loaded.
89 Typically the first child in this subtree will be
90 .BR cn=core,cn=schema,cn=config .
91
92 .B olcBackend
93 entries are for storing settings specific to a single
94 backend type (and thus global to all database instances of that type).
95 At present there are no backends that implement settings of this
96 nature, so usually there will not be any olcBackend entries.
97
98 .B olcDatabase
99 entries store settings specific to a single database
100 instance. These entries may have
101 .B olcOverlay
102 child entries corresponding
103 to any overlays configured on the database. The olcDatabase and
104 olcOverlay entries may also have miscellaneous child entries for
105 other settings as needed. There are two special database entries
106 that are predefined - one is an entry for the config database itself,
107 and the other is for the "frontend" database. Settings in the
108 frontend database are inherited by the other databases, unless
109 they are explicitly overridden in a specific database.
110 .LP
111 The specific configuration options available are discussed below in the
112 Global Configuration Options, General Backend Options, and General Database
113 Options. Options are set by defining LDAP attributes with specific values.
114 In general the names of the LDAP attributes are the same as the corresponding
115 .B slapd.conf
116 keyword, with an "olc" prefix added on.
117
118 The parser for many of these attributes is the same as used for parsing
119 the slapd.conf keywords. As such, slapd.conf keywords that allow multiple
120 items to be specified on one line, separated by whitespace, will allow
121 multiple items to be specified in one attribute value. However, when
122 reading the attribute via LDAP, the items will be returned as individual
123 attribute values.
124
125 Backend-specific options are discussed in the
126 .B slapd-<backend>(5)
127 manual pages.  Refer to the "OpenLDAP Administrator's Guide" for more
128 details on configuring slapd.
129 .SH GLOBAL CONFIGURATION OPTIONS
130 Options described in this section apply to the server as a whole.
131 Arguments that should be replaced by 
132 actual text are shown in brackets <>.
133
134 These options may only be specified in the
135 .B cn=config
136 entry. This entry must have an objectClass of
137 .BR olcGlobal .
138
139 .TP
140 .B olcAllows: <features>
141 Specify a set of features to allow (default none).
142 .B bind_v2
143 allows acceptance of LDAPv2 bind requests.  Note that
144 .BR slapd (8)
145 does not truly implement LDAPv2 (RFC 1777), now Historic (RFC 3494).
146 .B bind_anon_cred
147 allows anonymous bind when credentials are not empty (e.g.
148 when DN is empty).
149 .B bind_anon_dn
150 allows unauthenticated (anonymous) bind when DN is not empty.
151 .B update_anon
152 allows unauthenticated (anonymous) update operations to be processed
153 (subject to access controls and other administrative limits).
154 .B proxy_authz_anon
155 allows unauthenticated (anonymous) proxy authorization control to be processed
156 (subject to access controls, authorization and other administrative limits).
157 .TP
158 .B olcArgsFile: <filename>
159 The ( absolute ) name of a file that will hold the 
160 .B slapd
161 server's command line options
162 if started without the debugging command line option.
163 .TP
164 .B olcAttributeOptions: <option-name>...
165 Define tagging attribute options or option tag/range prefixes.
166 Options must not end with `-', prefixes must end with `-'.
167 The `lang-' prefix is predefined.
168 If you use the
169 .B olcAttributeOptions
170 directive, `lang-' will no longer be defined and you must specify it
171 explicitly if you want it defined.
172
173 An attribute description with a tagging option is a subtype of that
174 attribute description without the option.
175 Except for that, options defined this way have no special semantics.
176 Prefixes defined this way work like the `lang-' options:
177 They define a prefix for tagging options starting with the prefix.
178 That is, if you define the prefix `x-foo-', you can use the option
179 `x-foo-bar'.
180 Furthermore, in a search or compare, a prefix or range name (with
181 a trailing `-') matches all options starting with that name, as well
182 as the option with the range name sans the trailing `-'.
183 That is, `x-foo-bar-' matches `x-foo-bar' and `x-foo-bar-baz'.
184
185 RFC 4520 reserves options beginning with `x-' for private experiments.
186 Other options should be registered with IANA, see RFC 4520 section 3.5.
187 OpenLDAP also has the `binary' option built in, but this is a transfer
188 option, not a tagging option.
189 .TP
190 .B olcAuthzPolicy: <policy>
191 Used to specify which rules to use for Proxy Authorization.  Proxy
192 authorization allows a client to authenticate to the server using one
193 user's credentials, but specify a different identity to use for authorization
194 and access control purposes. It essentially allows user A to login as user
195 B, using user A's password.
196 The
197 .B none
198 flag disables proxy authorization. This is the default setting.
199 The
200 .B from
201 flag will use rules in the
202 .I authzFrom
203 attribute of the authorization DN.
204 The
205 .B to
206 flag will use rules in the
207 .I authzTo
208 attribute of the authentication DN.
209 The
210 .B any
211 flag, an alias for the deprecated value of
212 .BR both ,
213 will allow any of the above, whatever succeeds first (checked in
214 .BR to ,
215 .B from
216 sequence.
217 The
218 .B all
219 flag requires both authorizations to succeed.
220 .LP
221 .RS
222 The rules are mechanisms to specify which identities are allowed 
223 to perform proxy authorization.
224 The
225 .I authzFrom
226 attribute in an entry specifies which other users
227 are allowed to proxy login to this entry. The
228 .I authzTo
229 attribute in
230 an entry specifies which other users this user can authorize as.  Use of
231 .I authzTo
232 rules can be easily
233 abused if users are allowed to write arbitrary values to this attribute.
234 In general the
235 .I authzTo
236 attribute must be protected with ACLs such that
237 only privileged users can modify it.
238 The value of
239 .I authzFrom
240 and
241 .I authzTo
242 describes an 
243 .B identity 
244 or a set of identities; it can take five forms:
245 .RS
246 .TP
247 .B ldap:///<base>??[<scope>]?<filter>
248 .RE
249 .RS
250 .B dn[.<dnstyle>]:<pattern>
251 .RE
252 .RS
253 .B u[<mech>[<realm>]]:<pattern>
254 .RE
255 .RS
256 .B group[/objectClass[/attributeType]]:<pattern>
257 .RE
258 .RS
259 .B <pattern>
260 .RE
261 .RS
262
263 .B <dnstyle>:={exact|onelevel|children|subtree|regex}
264
265 .RE
266 The first form is a valid LDAP
267 .B URI
268 where the 
269 .IR <host>:<port> ,
270 the
271 .I <attrs>
272 and the
273 .I <extensions>
274 portions must be absent, so that the search occurs locally on either
275 .I authzFrom
276 or 
277 .IR authzTo .
278 The second form is a 
279 .BR DN ,
280 with the optional style modifiers
281 .IR exact ,
282 .IR onelevel ,
283 .IR children ,
284 and
285 .I subtree
286 for exact, onelevel, children and subtree matches, which cause 
287 .I <pattern>
288 to be normalized according to the DN normalization rules, or the special
289 .I regex
290 style, which causes the
291 .I <pattern>
292 to be treated as a POSIX (''extended'') regular expression, as
293 discussed in
294 .BR regex (7)
295 and/or
296 .BR re_format (7).
297 A pattern of
298 .I *
299 means any non-anonymous DN.
300 The third form is a SASL
301 .BR id ,
302 with the optional fields
303 .I <mech>
304 and
305 .I <realm>
306 that allow to specify a SASL
307 .BR mechanism ,
308 and eventually a SASL
309 .BR realm ,
310 for those mechanisms that support one.
311 The need to allow the specification of a mechanism is still debated, 
312 and users are strongly discouraged to rely on this possibility.
313 The fourth form is a group specification, consisting of the keyword
314 .BR group ,
315 optionally followed by the specification of the group
316 .B objectClass
317 and member
318 .BR attributeType .
319 The group with DN
320 .B <pattern>
321 is searched with base scope, and in case of match, the values of the
322 member
323 .B attributeType
324 are searched for the asserted DN.
325 For backwards compatibility, if no identity type is provided, i.e. only
326 .B <pattern>
327 is present, an
328 .I exact DN
329 is assumed; as a consequence, 
330 .B <pattern>
331 is subjected to DN normalization.
332 Since the interpretation of
333 .I authzFrom
334 and
335 .I authzTo
336 can impact security, users are strongly encouraged 
337 to explicitly set the type of identity specification that is being used.
338 A subset of these rules can be used as third arg in the 
339 .B olcAuthzRegexp
340 statement (see below); significantly, the 
341 .I URI
342 and the
343 .I dn.exact:<dn> 
344 forms.
345 .RE
346 .TP
347 .B olcAuthzRegexp: <match> <replace>
348 Used by the authentication framework to convert simple user names,
349 such as provided by SASL subsystem, to an LDAP DN used for
350 authorization purposes.  Note that the resultant DN need not refer
351 to an existing entry to be considered valid.  When an authorization
352 request is received from the SASL subsystem, the SASL 
353 .BR USERNAME ,
354 .BR REALM , 
355 and
356 .B MECHANISM
357 are taken, when available, and combined into a name of the form
358 .RS
359 .RS
360 .TP
361 .B UID=<username>[[,CN=<realm>],CN=<mechanism>],CN=auth
362
363 .RE
364 This name is then compared against the
365 .B match
366 POSIX (''extended'') regular expression, and if the match is successful,
367 the name is replaced with the
368 .B replace
369 string.  If there are wildcard strings in the 
370 .B match
371 regular expression that are enclosed in parenthesis, e.g. 
372 .RS
373 .TP
374 .B UID=([^,]*),CN=.*
375
376 .RE
377 then the portion of the name that matched the wildcard will be stored
378 in the numbered placeholder variable $1. If there are other wildcard strings
379 in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The 
380 placeholders can then be used in the 
381 .B replace
382 string, e.g. 
383 .RS
384 .TP
385 .B UID=$1,OU=Accounts,DC=example,DC=com 
386
387 .RE
388 The replaced name can be either a DN, i.e. a string prefixed by "dn:",
389 or an LDAP URI.
390 If the latter, the server will use the URI to search its own database(s)
391 and, if the search returns exactly one entry, the name is
392 replaced by the DN of that entry.   The LDAP URI must have no
393 hostport, attrs, or extensions components, but the filter is mandatory,
394 e.g.
395 .RS
396 .TP
397 .B ldap:///OU=Accounts,DC=example,DC=com??one?(UID=$1)
398
399 .RE
400 The protocol portion of the URI must be strictly
401 .BR ldap .
402 Note that this search is subject to access controls.  Specifically,
403 the authentication identity must have "auth" access in the subject.
404
405 Multiple 
406 .B olcAuthzRegexp 
407 values can be specified to allow for multiple matching 
408 and replacement patterns. The matching patterns are checked in the order they 
409 appear in the attribute, stopping at the first successful match.
410
411 .\".B Caution:
412 .\"Because the plus sign + is a character recognized by the regular expression engine,
413 .\"and it will appear in names that include a REALM, be careful to escape the
414 .\"plus sign with a backslash \\+ to remove the character's special meaning.
415 .RE
416 .TP
417 .B olcConcurrency: <integer>
418 Specify a desired level of concurrency.  Provided to the underlying
419 thread system as a hint.  The default is not to provide any hint. This setting
420 is only meaningful on some platforms where there is not a one to one
421 correspondence between user threads and kernel threads.
422 .TP
423 .B olcConnMaxPending: <integer>
424 Specify the maximum number of pending requests for an anonymous session.
425 If requests are submitted faster than the server can process them, they
426 will be queued up to this limit. If the limit is exceeded, the session
427 is closed. The default is 100.
428 .TP
429 .B olcConnMaxPendingAuth: <integer>
430 Specify the maximum number of pending requests for an authenticated session.
431 The default is 1000.
432 .TP
433 .B olcDisallows: <features>
434 Specify a set of features to disallow (default none).
435 .B bind_anon
436 disables acceptance of anonymous bind requests.  Note that this setting
437 does not prohibit anonymous directory access (See "require authc").
438 .B bind_simple
439 disables simple (bind) authentication.
440 .B tls_2_anon
441 disables forcing session to anonymous status (see also
442 .BR tls_authc )
443 upon StartTLS operation receipt.
444 .B tls_authc
445 disallows the StartTLS operation if authenticated (see also
446 .BR tls_2_anon ).
447 .TP
448 .B olcGentleHUP: { TRUE | FALSE }
449 A SIGHUP signal will only cause a 'gentle' shutdown-attempt:
450 .B Slapd
451 will stop listening for new connections, but will not close the
452 connections to the current clients.  Future write operations return
453 unwilling-to-perform, though.  Slapd terminates when all clients
454 have closed their connections (if they ever do), or \- as before \-
455 if it receives a SIGTERM signal.  This can be useful if you wish to
456 terminate the server and start a new
457 .B slapd
458 server
459 .B with another database,
460 without disrupting the currently active clients.
461 The default is FALSE.  You may wish to use
462 .B olcIdletTmeout
463 along with this option.
464 .TP
465 .B olcIdleTimeout: <integer>
466 Specify the number of seconds to wait before forcibly closing
467 an idle client connection.  A setting of 0 disables this
468 feature.  The default is 0.
469 .TP
470 .B olcIndexSubstrIfMaxlen: <integer>
471 Specify the maximum length for subinitial and subfinal indices. Only
472 this many characters of an attribute value will be processed by the
473 indexing functions; any excess characters are ignored. The default is 4.
474 .TP
475 .B olcIndexSubstrIfMinlen: <integer>
476 Specify the minimum length for subinitial and subfinal indices. An
477 attribute value must have at least this many characters in order to be
478 processed by the indexing functions. The default is 2.
479 .TP
480 .B olcIndexSubstrAnyLen: <integer>
481 Specify the length used for subany indices. An attribute value must have
482 at least this many characters in order to be processed. Attribute values
483 longer than this length will be processed in segments of this length. The
484 default is 4. The subany index will also be used in subinitial and
485 subfinal index lookups when the filter string is longer than the
486 .I olcIndexSubstrIfMaxlen
487 value.
488 .TP
489 .B olcIndexSubstrAnyStep: <integer>
490 Specify the steps used in subany index lookups. This value sets the offset
491 for the segments of a filter string that are processed for a subany index
492 lookup. The default is 2. For example, with the default values, a search
493 using this filter "cn=*abcdefgh*" would generate index lookups for
494 "abcd", "cdef", and "efgh".
495
496 .TP
497 .B olcLocalSSF: <SSF>
498 Specifies the Security Strength Factor (SSF) to be given local LDAP sessions,
499 such as those to the ldapi:// listener.  For a description of SSF values,
500 see 
501 .BR olcSaslSecProps 's
502 .B minssf
503 option description.  The default is 71.
504 .TP
505 .B olcLogLevel: <integer> [...]
506 Specify the level at which debugging statements and operation 
507 statistics should be syslogged (currently logged to the
508 .BR syslogd (8) 
509 LOG_LOCAL4 facility).
510 They must be considered subsystems rather than increasingly verbose 
511 log levels.
512 Some messages with higher priority are logged regardless 
513 of the configured loglevel as soon as some logging is configured,
514 otherwise anything is logged at all.
515 Log levels are additive, and available levels are:
516 .RS
517 .RS
518 .PD 0
519 .TP
520 .B 1
521 .B (0x1 trace)
522 trace function calls
523 .TP
524 .B 2
525 .B (0x2 packets)
526 debug packet handling
527 .TP
528 .B 4
529 .B (0x4 args)
530 heavy trace debugging (function args)
531 .TP
532 .B 8
533 .B (0x8 conns)
534 connection management
535 .TP
536 .B 16
537 .B (0x10 BER)
538 print out packets sent and received
539 .TP
540 .B 32
541 .B (0x20 filter)
542 search filter processing
543 .TP
544 .B 64
545 .B (0x40 config)
546 configuration file processing
547 .TP
548 .B 128
549 .B (0x80 ACL)
550 access control list processing
551 .TP
552 .B 256
553 .B (0x100 stats)
554 stats log connections/operations/results
555 .TP
556 .B 512
557 .B (0x200 stats2)
558 stats log entries sent
559 .TP
560 .B 1024
561 .B (0x400 shell)
562 print communication with shell backends
563 .TP
564 .B 2048
565 .B (0x800 parse)
566 entry parsing
567 \".TP
568 \".B 4096
569 \".B (0x1000 cache)
570 \"caching (unused)
571 \".TP
572 \".B 8192
573 \".B (0x2000 index)
574 \"data indexing (unused)
575 .TP
576 .B 16384
577 .B (0x4000 sync)
578 LDAPSync replication
579 .TP
580 .B 32768
581 .B (0x8000 none)
582 only messages that get logged whatever log level is set
583 .PD
584 .RE
585 The desired log level can be input as a single integer that combines 
586 the (ORed) desired levels, both in decimal or in hexadecimal notation,
587 as a list of integers (that are ORed internally),
588 or as a list of the names that are shown between brackets, such that
589 .LP
590 .nf
591     olcLogLevel: 129
592     olcLogLevel: 0x81
593     olcLogLevel: 128 1
594     olcLogLevel: 0x80 0x1
595     olcLogLevel: acl trace
596 .fi
597 .LP
598 are equivalent.
599 The keyword 
600 .B any
601 can be used as a shortcut to enable logging at all levels (equivalent to -1).
602 The keyword
603 .BR none ,
604 or the equivalent integer representation, causes those messages
605 that are logged regardless of the configured olcLogLevel to be logged.
606 In fact, if no olcLogLevel (or a 0 level) is defined, no logging occurs, 
607 so at least the 
608 .B none
609 level is required to have high priority messages logged.
610 .RE
611 .TP
612 .B olcPasswordCryptSaltFormat: <format>
613 Specify the format of the salt passed to
614 .BR crypt (3)
615 when generating {CRYPT} passwords (see
616 .BR olcPasswordHash )
617 during processing of LDAP Password Modify Extended Operations (RFC 3062).
618
619 This string needs to be in
620 .BR sprintf (3)
621 format and may include one (and only one) %s conversion.
622 This conversion will be substituted with a string of random
623 characters from [A\-Za\-z0\-9./].  For example, "%.2s"
624 provides a two character salt and "$1$%.8s" tells some
625 versions of crypt(3) to use an MD5 algorithm and provides
626 8 random characters of salt.  The default is "%s", which
627 provides 31 characters of salt.
628 .TP
629 .B olcPasswordHash: <hash> [<hash>...]
630 This option configures one or more hashes to be used in generation of user
631 passwords stored in the userPassword attribute during processing of
632 LDAP Password Modify Extended Operations (RFC 3062).
633 The <hash> must be one of
634 .BR {SSHA} ,
635 .BR {SHA} ,
636 .BR {SMD5} ,
637 .BR {MD5} ,
638 .BR {CRYPT} ,
639 and
640 .BR {CLEARTEXT} .
641 The default is
642 .BR {SSHA} .
643
644 .B {SHA}
645 and
646 .B {SSHA}
647 use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
648
649 .B {MD5}
650 and
651 .B {SMD5}
652 use the MD5 algorithm (RFC 1321), the latter with a seed.
653
654 .B {CRYPT}
655 uses the
656 .BR crypt (3).
657
658 .B {CLEARTEXT}
659 indicates that the new password should be
660 added to userPassword as clear text.
661
662 Note that this option does not alter the normal user applications
663 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
664 .TP
665 .B olcPidFile: <filename>
666 The ( absolute ) name of a file that will hold the 
667 .B slapd
668 server's process ID ( see
669 .BR getpid (2)
670 ) if started without the debugging command line option.
671 .TP
672 .B olcPluginLogFile: <filename>
673 The ( absolute ) name of a file that will contain log
674 messages from
675 .B SLAPI
676 plugins. See
677 .BR slapd.plugin (5)
678 for details.
679 .TP
680 .B olcReferral: <url>
681 Specify the referral to pass back when
682 .BR slapd (8)
683 cannot find a local database to handle a request.
684 If multiple values are specified, each url is provided.
685 .\" slurpd-related keywords are all deprecated
686 .\".TP
687 .\".B replica-argsfile
688 .\"The ( absolute ) name of a file that will hold the 
689 .\".B slurpd
690 .\"server's command line options
691 .\"if started without the debugging command line option.
692 .\"If it appears after a
693 .\".B replogfile
694 .\"directive, the args file is specific to the 
695 .\".BR slurpd (8)
696 .\"instance that handles that replication log.
697 .\".TP
698 .\".B replica-pidfile
699 .\"The ( absolute ) name of a file that will hold the 
700 .\".B slurpd
701 .\"server's process ID ( see
702 .\".BR getpid (2)
703 .\") if started without the debugging command line option.
704 .\"If it appears after a
705 .\".B replogfile
706 .\"directive, the pid file is specific to the 
707 .\".BR slurpd (8)
708 .\"instance that handles that replication log.
709 .\".TP
710 .\".B replicationinterval
711 .\"The number of seconds 
712 .\".B slurpd 
713 .\"waits before checking the replogfile for changes.
714 .\"If it appears after a
715 .\".B replogfile
716 .\"directive, the replication interval is specific to the 
717 .\".BR slurpd (8)
718 .\"instance that handles that replication log.
719 .TP
720 .B olcReverseLookup: TRUE | FALSE
721 Enable/disable client name unverified reverse lookup (default is 
722 .BR FALSE 
723 if compiled with --enable-rlookups).
724 .TP
725 .B olcRootDSE: <file>
726 Specify the name of an LDIF(5) file containing user defined attributes
727 for the root DSE.  These attributes are returned in addition to the
728 attributes normally produced by slapd.
729 .TP
730 .B olcSaslHost: <fqdn>
731 Used to specify the fully qualified domain name used for SASL processing.
732 .TP
733 .B olcSaslRealm: <realm>
734 Specify SASL realm.  Default is empty.
735 .TP
736 .B olcSaslSecProps: <properties>
737 Used to specify Cyrus SASL security properties.
738 The
739 .B none
740 flag (without any other properties) causes the flag properties
741 default, "noanonymous,noplain", to be cleared.
742 The
743 .B noplain
744 flag disables mechanisms susceptible to simple passive attacks.
745 The
746 .B noactive
747 flag disables mechanisms susceptible to active attacks.
748 The
749 .B nodict
750 flag disables mechanisms susceptible to passive dictionary attacks.
751 The
752 .B noanonymous
753 flag disables mechanisms which support anonymous login.
754 The
755 .B forwardsec
756 flag require forward secrecy between sessions.
757 The
758 .B passcred
759 require mechanisms which pass client credentials (and allow
760 mechanisms which can pass credentials to do so).
761 The
762 .B minssf=<factor> 
763 property specifies the minimum acceptable
764 .I security strength factor
765 as an integer approximate to effective key length used for
766 encryption.  0 (zero) implies no protection, 1 implies integrity
767 protection only, 56 allows DES or other weak ciphers, 112
768 allows triple DES and other strong ciphers, 128 allows RC4,
769 Blowfish and other modern strong ciphers.  The default is 0.
770 The
771 .B maxssf=<factor> 
772 property specifies the maximum acceptable
773 .I security strength factor
774 as an integer (see minssf description).  The default is INT_MAX.
775 The
776 .B maxbufsize=<size> 
777 property specifies the maximum security layer receive buffer
778 size allowed.  0 disables security layers.  The default is 65536.
779 .TP
780 .B olcSockbufMaxIncoming: <integer>
781 Specify the maximum incoming LDAP PDU size for anonymous sessions.
782 The default is 262143.
783 .TP
784 .B olcSockbufMaxIncomingAuth: <integer>
785 Specify the maximum incoming LDAP PDU size for authenticated sessions.
786 The default is 4194303.
787 .TP
788 .B olcThreads: <integer>
789 Specify the maximum size of the primary thread pool.
790 The default is 16; the minimum value is 2.
791 .TP
792 .B olcToolThreads: <integer>
793 Specify the maximum number of threads to use in tool mode.
794 This should not be greater than the number of CPUs in the system.
795 The default is 1.
796 .\"ucdata-path is obsolete / ignored...
797 .\".TP
798 .\".B ucdata-path <path>
799 .\"Specify the path to the directory containing the Unicode character
800 .\"tables. The default path is DATADIR/ucdata.
801 .SH TLS OPTIONS
802 If
803 .B slapd
804 is built with support for Transport Layer Security, there are more options
805 you can specify.
806 .TP
807 .B olcTLSCipherSuite: <cipher-suite-spec>
808 Permits configuring what ciphers will be accepted and the preference order.
809 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
810
811 olcTLSCipherSuite: HIGH:MEDIUM:+SSLv2
812
813 To check what ciphers a given spec selects, use:
814
815 openssl ciphers -v <cipher-suite-spec>
816 .TP
817 .B olcTLSCACertificateFile: <filename>
818 Specifies the file that contains certificates for all of the Certificate
819 Authorities that
820 .B slapd
821 will recognize.
822 .TP
823 .B olcTLSCACertificatePath: <path>
824 Specifies the path of a directory that contains Certificate Authority
825 certificates in separate individual files. Usually only one of this
826 or the olcTLSCACertificateFile is defined. If both are specified, both
827 locations will be used.
828 .TP
829 .B olcTLSCertificateFile: <filename>
830 Specifies the file that contains the
831 .B slapd
832 server certificate.
833 .TP
834 .B olcTLSCertificateKeyFile: <filename>
835 Specifies the file that contains the
836 .B slapd
837 server private key that matches the certificate stored in the
838 .B olcTLSCertificateFile
839 file. If the private key is protected with a password, the password must
840 be manually typed in when slapd starts.  Usually the private key is not
841 protected with a password, to allow slapd to start without manual
842 intervention, so
843 it is of critical importance that the file is protected carefully. 
844 .TP
845 .B olcTLSDHParamFile: <filename>
846 This directive specifies the file that contains parameters for Diffie-Hellman
847 ephemeral key exchange.  This is required in order to use a DSA certificate on
848 the server. If multiple sets of parameters are present in the file, all of
849 them will be processed.  Note that setting this option may also enable
850 Anonymous Diffie-Hellman key exchanges in certain non-default cipher suites.
851 You should append "!ADH" to your cipher suites if you have changed them
852 from the default, otherwise no certificate exchanges or verification will
853 be done.
854 .TP
855 .B olcTLSRandFile: <filename>
856 Specifies the file to obtain random bits from when /dev/[u]random
857 is not available.  Generally set to the name of the EGD/PRNGD socket.
858 The environment variable RANDFILE can also be used to specify the filename.
859 .TP
860 .B olcTLSVerifyClient: <level>
861 Specifies what checks to perform on client certificates in an
862 incoming TLS session, if any.
863 The
864 .B <level>
865 can be specified as one of the following keywords:
866 .RS
867 .TP
868 .B never
869 This is the default.
870 .B slapd
871 will not ask the client for a certificate.
872 .TP
873 .B allow
874 The client certificate is requested.  If no certificate is provided,
875 the session proceeds normally.  If a bad certificate is provided,
876 it will be ignored and the session proceeds normally.
877 .TP
878 .B try
879 The client certificate is requested.  If no certificate is provided,
880 the session proceeds normally.  If a bad certificate is provided,
881 the session is immediately terminated.
882 .TP
883 .B demand | hard | true
884 These keywords are all equivalent, for compatibility reasons.
885 The client certificate is requested.  If no certificate is provided,
886 or a bad certificate is provided, the session is immediately terminated.
887
888 Note that a valid client certificate is required in order to use the
889 SASL EXTERNAL authentication mechanism with a TLS session.  As such,
890 a non-default
891 .B olcTLSVerifyClient
892 setting must be chosen to enable SASL EXTERNAL authentication.
893 .RE
894 .TP
895 .B olcTLSCRLCheck: <level>
896 Specifies if the Certificate Revocation List (CRL) of the CA should be 
897 used to verify if the client certificates have not been revoked. This
898 requires
899 .B olcTLSCACertificatePath
900 parameter to be set.
901 .B <level>
902 can be specified as one of the following keywords:
903 .RS
904 .TP
905 .B none
906 No CRL checks are performed
907 .TP
908 .B peer
909 Check the CRL of the peer certificate
910 .TP
911 .B all
912 Check the CRL for a whole certificate chain
913 .RE
914 .SH DYNAMIC MODULE OPTIONS
915 If
916 .B slapd
917 is compiled with --enable-modules then the module-related entries will
918 be available. These entries are named
919 .B cn=module{x},cn=config
920 and
921 must have the olcModuleList objectClass. One entry should be created
922 per
923 .B olcModulePath.
924 Normally the config engine generates the "{x}" index in the RDN
925 automatically, so it can be omitted when initially loading these entries.
926 .TP
927 .B olcModuleLoad: <filename>
928 Specify the name of a dynamically loadable module to load. The filename
929 may be an absolute path name or a simple filename. Non-absolute names
930 are searched for in the directories specified by the
931 .B olcModulePath
932 option.
933 .TP
934 .B olcModulePath: <pathspec>
935 Specify a list of directories to search for loadable modules. Typically
936 the path is colon-separated but this depends on the operating system.
937 .SH SCHEMA OPTIONS
938 Schema definitions are created as entries in the
939 .B cn=schema,cn=config
940 subtree. These entries must have the olcSchemaConfig objectClass.
941 As noted above, the actual
942 .B cn=schema,cn=config
943 entry is predefined and any values specified for it are ignored.
944
945 .HP
946 .hy 0
947 .B olcAttributetypes: "(\ <oid>\
948  [NAME\ <name>]\
949  [DESC\ <description>]\
950  [OBSOLETE]\
951  [SUP\ <oid>]\
952  [EQUALITY\ <oid>]\
953  [ORDERING\ <oid>]\
954  [SUBSTR\ <oid>]\
955  [SYNTAX\ <oidlen>]\
956  [SINGLE\-VALUE]\
957  [COLLECTIVE]\
958  [NO\-USER\-MODIFICATION]\
959  [USAGE\ <attributeUsage>]\ )"
960 .RS
961 Specify an attribute type using the LDAPv3 syntax defined in RFC 4512.
962 The slapd parser extends the RFC 4512 definition by allowing string
963 forms as well as numeric OIDs to be used for the attribute OID and
964 attribute syntax OID.
965 (See the
966 .B olcObjectIdentifier
967 description.) 
968 .RE
969
970 .HP
971 .hy 0
972 .B olcDitContentRules: "(\ <oid>\
973  [NAME\ <name>]\
974  [DESC\ <description>]\
975  [OBSOLETE]\
976  [AUX\ <oids>]\
977  [MUST\ <oids>]\
978  [MAY\ <oids>]\
979  [NOT\ <oids>]\ )"
980 .RS
981 Specify an DIT Content Rule using the LDAPv3 syntax defined in RFC 4512.
982 The slapd parser extends the RFC 4512 definition by allowing string
983 forms as well as numeric OIDs to be used for the attribute OID and
984 attribute syntax OID.
985 (See the
986 .B olcObjectIdentifier
987 description.) 
988 .RE
989
990 .HP
991 .hy 0
992 .B olcObjectClasses: "(\ <oid>\
993  [NAME\ <name>]\
994  [DESC\ <description>]\
995  [OBSOLETE]\
996  [SUP\ <oids>]\
997  [{ ABSTRACT | STRUCTURAL | AUXILIARY }]\
998  [MUST\ <oids>] [MAY\ <oids>] )"
999 .RS
1000 Specify an objectclass using the LDAPv3 syntax defined in RFC 4512.
1001 The slapd parser extends the RFC 4512 definition by allowing string
1002 forms as well as numeric OIDs to be used for the object class OID.
1003 (See the
1004 .B
1005 olcObjectIdentifier
1006 description.)  Object classes are "STRUCTURAL" by default.
1007 .RE
1008 .TP
1009 .B olcObjectIdentifier: <name> "{ <oid> | <name>[:<suffix>] }"
1010 Define a string name that equates to the given OID. The string can be used
1011 in place of the numeric OID in objectclass and attribute definitions. The
1012 name can also be used with a suffix of the form ":xx" in which case the
1013 value "oid.xx" will be used.
1014
1015 .SH GENERAL BACKEND OPTIONS
1016 Options in these entries only apply to the configuration of a single
1017 type of backend. All backends may support this class of options.
1018 The entry must be named
1019 .B olcBackend=<databasetype>,cn=config
1020 and must have the olcBackendConfig objectClass.
1021 <databasetype>
1022 should be one of
1023 .BR bdb ,
1024 .BR config ,
1025 .BR dnssrv ,
1026 .BR hdb ,
1027 .BR ldap ,
1028 .BR ldif ,
1029 .BR meta ,
1030 .BR monitor ,
1031 .BR null ,
1032 .BR passwd ,
1033 .BR perl ,
1034 .BR relay ,
1035 .BR shell ,
1036 or
1037 .BR sql .
1038 At present, no backend implements any options of this type.
1039
1040 .SH DATABASE OPTIONS
1041 Database options are set in entries named
1042 .B olcDatabase={x}<databasetype>,cn=config
1043 and must have the olcDatabaseConfig objectClass. Normally the config
1044 engine generates the "{x}" index in the RDN automatically, so it
1045 can be omitted when initially loading these entries.
1046
1047 The special frontend database is always numbered "{-1}" and the config
1048 database is always numbered "{0}".
1049
1050 .SH GLOBAL DATABASE OPTIONS
1051 Options in this section may be set in the special "frontend" database
1052 and inherited in all the other databases. These options may be altered
1053 by further settings in each specific database. The frontend entry must
1054 be named
1055 .B olcDatabase=frontend,cn=config
1056 and must have the olcFrontendConfig objectClass.
1057 .TP
1058 .B olcAccess: to <what> "[ by <who> <access> <control> ]+"
1059 Grant access (specified by <access>) to a set of entries and/or
1060 attributes (specified by <what>) by one or more requestors (specified
1061 by <who>).
1062 If no access controls are present, the default policy
1063 allows anyone and everyone to read anything but restricts
1064 updates to rootdn.  (e.g., "olcAccess: to * by * read").
1065 See
1066 .BR slapd.access (5)
1067 and the "OpenLDAP Administrator's Guide" for details.
1068
1069 Access controls set in the frontend are appended to any access
1070 controls set on the specific databases.
1071 The rootdn of a database can always read and write EVERYTHING
1072 in that database.
1073
1074 Extra special care must be taken with the access controls on the
1075 config database. Unlike other databases, the default policy for the
1076 config database is to only allow access to the rootdn. Regular users
1077 should not have read access, and write access should be granted very
1078 carefully to privileged administrators.
1079
1080 .TP
1081 .B olcDefaultSearchBase: <dn>
1082 Specify a default search base to use when client submits a
1083 non-base search request with an empty base DN.
1084 Base scoped search requests with an empty base DN are not affected.
1085 This setting is only allowed in the frontend entry.
1086 .TP
1087 .B olcReadOnly: TRUE | FALSE
1088 This option puts the database into "read-only" mode.  Any attempts to 
1089 modify the database will return an "unwilling to perform" error.  By
1090 default, olcReadOnly is FALSE. Note that when this option is set
1091 TRUE on the frontend, it cannot be reset without restarting the
1092 server, since further writes to the config database will be rejected.
1093 .TP
1094 .B olcRequires: <conditions>
1095 Specify a set of conditions to require (default none).
1096 The directive may be specified globally and/or per-database;
1097 databases inherit global conditions, so per-database specifications
1098 are additive.
1099 .B bind
1100 requires bind operation prior to directory operations.
1101 .B LDAPv3
1102 requires session to be using LDAP version 3.
1103 .B authc
1104 requires authentication prior to directory operations.
1105 .B SASL
1106 requires SASL authentication prior to directory operations.
1107 .B strong
1108 requires strong authentication prior to directory operations.
1109 The strong keyword allows protected "simple" authentication
1110 as well as SASL authentication.
1111 .B none
1112 may be used to require no conditions (useful to clear out globally
1113 set conditions within a particular database); it must occur first
1114 in the list of conditions.
1115 .TP
1116 .B olcRestrict: <oplist>
1117 Specify a list of operations that are restricted.
1118 Restrictions on a specific database override any frontend setting.
1119 Operations can be any of 
1120 .BR add ,
1121 .BR bind ,
1122 .BR compare ,
1123 .BR delete ,
1124 .BR extended[=<OID>] ,
1125 .BR modify ,
1126 .BR rename ,
1127 .BR search ,
1128 or the special pseudo-operations
1129 .B read
1130 and
1131 .BR write ,
1132 which respectively summarize read and write operations.
1133 The use of 
1134 .I restrict write
1135 is equivalent to 
1136 .I olcReadOnly: TRUE
1137 (see above).
1138 The 
1139 .B extended
1140 keyword allows to indicate the OID of the specific operation
1141 to be restricted.
1142 .TP
1143 .B olcSchemaDN: <dn>
1144 Specify the distinguished name for the subschema subentry that
1145 controls the entries on this server.  The default is "cn=Subschema".
1146 .TP
1147 .B olcSecurity: <factors>
1148 Specify a set of security strength factors (separated by white space)
1149 to require (see
1150 .BR olcSaslSecprops 's
1151 .B minssf
1152 option for a description of security strength factors).
1153 The directive may be specified globally and/or per-database.
1154 .B ssf=<n>
1155 specifies the overall security strength factor.
1156 .B transport=<n>
1157 specifies the transport security strength factor.
1158 .B tls=<n>
1159 specifies the TLS security strength factor.
1160 .B sasl=<n>
1161 specifies the SASL security strength factor.
1162 .B update_ssf=<n>
1163 specifies the overall security strength factor to require for
1164 directory updates.
1165 .B update_transport=<n>
1166 specifies the transport security strength factor to require for
1167 directory updates.
1168 .B update_tls=<n>
1169 specifies the TLS security strength factor to require for
1170 directory updates.
1171 .B update_sasl=<n>
1172 specifies the SASL security strength factor to require for
1173 directory updates.
1174 .B simple_bind=<n>
1175 specifies the security strength factor required for
1176 .I simple
1177 username/password authentication.
1178 Note that the
1179 .B transport
1180 factor is measure of security provided by the underlying transport,
1181 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
1182 .TP
1183 .B olcSizeLimit: {<integer>|unlimited}
1184 .TP
1185 .B olcSizeLimit: size[.{soft|hard|unchecked}]=<integer> [...]
1186 Specify the maximum number of entries to return from a search operation.
1187 The default size limit is 500.
1188 Use
1189 .B unlimited
1190 to specify no limits.
1191 The second format allows a fine grain setting of the size limits.
1192 Extra args can be added in the same value or as additional values.
1193 See
1194 .BR olcLimits
1195 for an explanation of the different flags.
1196 .TP
1197 .B olcTimeLimit: {<integer>|unlimited}
1198 .TP
1199 .B olcTimeLimit: time[.{soft|hard}]=<integer> [...]
1200 Specify the maximum number of seconds (in real time)
1201 .B slapd
1202 will spend answering a search request.  The default time limit is 3600.
1203 Use
1204 .B unlimited
1205 to specify no limits.
1206 The second format allows a fine grain setting of the time limits.
1207 Extra args can be added in the same value or as additional values.
1208 See
1209 .BR olcLimits
1210 for an explanation of the different flags.
1211
1212 .SH GENERAL DATABASE OPTIONS
1213 Options in this section only apply to the specific database for
1214 which they are defined.  They are supported by every
1215 type of backend. All of the Global Database Options may also be
1216 used here.
1217 .TP
1218 .B olcLastMod: TRUE | FALSE
1219 Controls whether
1220 .B slapd
1221 will automatically maintain the 
1222 modifiersName, modifyTimestamp, creatorsName, and 
1223 createTimestamp attributes for entries. It also controls
1224 the entryCSN and entryUUID attributes, which are needed
1225 by the syncrepl provider. By default, olcLastMod is TRUE.
1226 .TP
1227 .B olcLimits: <who> <limit> [<limit> [...]]
1228 Specify time and size limits based on who initiated an operation.
1229 The argument
1230 .B who
1231 can be any of
1232 .RS
1233 .RS
1234 .TP
1235 anonymous | users | [dn[.<style>]=]<pattern> | group[/oc[/at]]=<pattern>
1236
1237 .RE
1238 with
1239 .RS
1240 .TP
1241 <style> ::= exact | base | onelevel | subtree | children | regex | anonymous
1242
1243 .RE
1244 The term
1245 .B anonymous
1246 matches all unauthenticated clients.
1247 The term
1248 .B users
1249 matches all authenticated clients;
1250 otherwise an
1251 .B exact
1252 dn pattern is assumed unless otherwise specified by qualifying 
1253 the (optional) key string
1254 .B dn
1255 with 
1256 .B exact
1257 or
1258 .B base
1259 (which are synonyms), to require an exact match; with
1260 .BR onelevel , 
1261 to require exactly one level of depth match; with
1262 .BR subtree ,
1263 to allow any level of depth match, including the exact match; with
1264 .BR children ,
1265 to allow any level of depth match, not including the exact match;
1266 .BR regex
1267 explicitly requires the (default) match based on POSIX (''extended'')
1268 regular expression pattern.
1269 Finally,
1270 .B anonymous
1271 matches unbound operations; the 
1272 .B pattern
1273 field is ignored.
1274 The same behavior is obtained by using the 
1275 .B anonymous
1276 form of the
1277 .B who
1278 clause.
1279 The term
1280 .BR group ,
1281 with the optional objectClass
1282 .B oc
1283 and attributeType
1284 .B at
1285 fields, followed by
1286 .BR pattern ,
1287 sets the limits for any DN listed in the values of the
1288 .B at
1289 attribute (default
1290 .BR member )
1291 of the 
1292 .B oc
1293 group objectClass (default
1294 .BR groupOfNames )
1295 whose DN exactly matches
1296 .BR pattern .
1297
1298 The currently supported limits are 
1299 .B size
1300 and 
1301 .BR time .
1302
1303 The syntax for time limits is 
1304 .BR time[.{soft|hard}]=<integer> ,
1305 where 
1306 .I integer
1307 is the number of seconds slapd will spend answering a search request.
1308 If no time limit is explicitly requested by the client, the 
1309 .BR soft
1310 limit is used; if the requested time limit exceeds the
1311 .BR hard
1312 .\"limit, an
1313 .\".I "Administrative limit exceeded"
1314 .\"error is returned.
1315 limit, the value of the limit is used instead.
1316 If the
1317 .BR hard
1318 limit is set to the keyword 
1319 .IR soft ,
1320 the soft limit is used in either case; if it is set to the keyword 
1321 .IR unlimited , 
1322 no hard limit is enforced.
1323 Explicit requests for time limits smaller or equal to the
1324 .BR hard 
1325 limit are honored.
1326 If no limit specifier is set, the value is assigned to the 
1327 .BR soft 
1328 limit, and the
1329 .BR hard
1330 limit is set to
1331 .IR soft ,
1332 to preserve the original behavior.
1333
1334 The syntax for size limits is
1335 .BR size[.{soft|hard|unchecked}]=<integer> ,
1336 where
1337 .I integer
1338 is the maximum number of entries slapd will return answering a search 
1339 request.
1340 If no size limit is explicitly requested by the client, the
1341 .BR soft
1342 limit is used; if the requested size limit exceeds the
1343 .BR hard
1344 .\"limit, an 
1345 .\".I "Administrative limit exceeded"
1346 .\"error is returned.
1347 limit, the value of the limit is used instead.
1348 If the 
1349 .BR hard
1350 limit is set to the keyword 
1351 .IR soft , 
1352 the soft limit is used in either case; if it is set to the keyword
1353 .IR unlimited , 
1354 no hard limit is enforced.
1355 Explicit requests for size limits smaller or equal to the
1356 .BR hard
1357 limit are honored.
1358 The
1359 .BR unchecked
1360 specifier sets a limit on the number of candidates a search request is allowed
1361 to examine.
1362 The rationale behind it is that searches for non-properly indexed
1363 attributes may result in large sets of candidates, which must be 
1364 examined by
1365 .BR slapd (8)
1366 to determine whether they match the search filter or not.
1367 The
1368 .B unchecked
1369 limit provides a means to drop such operations before they are even 
1370 started.
1371 If the selected candidates exceed the 
1372 .BR unchecked
1373 limit, the search will abort with 
1374 .IR "Unwilling to perform" .
1375 If it is set to the keyword 
1376 .IR unlimited , 
1377 no limit is applied (the default).
1378 If it is set to
1379 .IR disable ,
1380 the search is not even performed; this can be used to disallow searches
1381 for a specific set of users.
1382 If no limit specifier is set, the value is assigned to the
1383 .BR soft 
1384 limit, and the
1385 .BR hard
1386 limit is set to
1387 .IR soft ,
1388 to preserve the original behavior.
1389
1390 In case of no match, the global limits are used.
1391 The default values are the same as
1392 .B olcSizeLimit
1393 and
1394 .BR olcTimeLimit ;
1395 no limit is set on 
1396 .BR unchecked .
1397
1398 If 
1399 .B pagedResults
1400 control is requested, the 
1401 .B hard
1402 size limit is used by default, because the request of a specific page size
1403 is considered an explicit request for a limitation on the number
1404 of entries to be returned.
1405 However, the size limit applies to the total count of entries returned within
1406 the search, and not to a single page.
1407 Additional size limits may be enforced; the syntax is
1408 .BR size.pr={<integer>|noEstimate|unlimited} ,
1409 where
1410 .I integer
1411 is the max page size if no explicit limit is set; the keyword
1412 .I noEstimate
1413 inhibits the server from returning an estimate of the total number
1414 of entries that might be returned
1415 (note: the current implementation does not return any estimate).
1416 The keyword
1417 .I unlimited
1418 indicates that no limit is applied to the pagedResults control page size.
1419 The syntax
1420 .B size.prtotal={<integer>|unlimited|disabled}
1421 allows to set a limit on the total number of entries that a pagedResults
1422 control allows to return.
1423 By default it is set to the 
1424 .B hard
1425 limit.
1426 When set, 
1427 .I integer
1428 is the max number of entries that the whole search with pagedResults control
1429 can return.
1430 Use 
1431 .I unlimited
1432 to allow unlimited number of entries to be returned, e.g. to allow
1433 the use of the pagedResults control as a means to circumvent size 
1434 limitations on regular searches; the keyword
1435 .I disabled
1436 disables the control, i.e. no paged results can be returned.
1437 Note that the total number of entries returned when the pagedResults control 
1438 is requested cannot exceed the 
1439 .B hard 
1440 size limit of regular searches unless extended by the
1441 .B prtotal
1442 switch.
1443 .RE
1444 .TP
1445 .B olcMaxDerefDepth: <depth>
1446 Specifies the maximum number of aliases to dereference when trying to
1447 resolve an entry, used to avoid infinite alias loops. The default is 1.
1448 .TP
1449 .B olcMirrorMode: TRUE | FALSE
1450 This option puts a replica database into "mirror" mode.  Update
1451 operations will be accepted from any user, not just the updatedn.  The
1452 database must already be configured as syncrepl consumer
1453 before this keyword may be set.  This mode must be used with extreme
1454 care, as it does not offer any consistency guarantees.  This feature
1455 is intended to be used with an external frontend that guarantees that
1456 writes are only directed to a single master, switching to an alternate
1457 server only if the original master goes down.
1458 By default, this setting is FALSE.
1459 .TP
1460 .B olcPlugin: <plugin_type> <lib_path> <init_function> [<arguments>]
1461 Configure a SLAPI plugin. See the
1462 .BR slapd.plugin (5)
1463 manpage for more details.
1464 .\".HP
1465 .\".hy 0
1466 .\".B replica uri=ldap[s]://<hostname>[:port]|host=<hostname>[:port] 
1467 .\".B [starttls=yes|critical]
1468 .\".B [suffix=<suffix> [...]]
1469 .\".B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
1470 .\".B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
1471 .\".B [authcId=<authentication ID>] [authzId=<authorization ID>]
1472 .\".B [attrs[!]=<attr list>]
1473 .\".RS
1474 .\"Specify a replication site for this database.  Refer to the "OpenLDAP 
1475 .\"Administrator's Guide" for detailed information on setting up a replicated
1476 .\".B slapd
1477 .\"directory service. Zero or more
1478 .\".B suffix
1479 .\"instances can be used to select the subtrees that will be replicated
1480 .\"(defaults to all the database). 
1481 .\".B host
1482 .\"is deprecated in favor of the
1483 .\".B uri
1484 .\"option.
1485 .\".B uri
1486 .\"allows the replica LDAP server to be specified as an LDAP URI. 
1487 .\"A
1488 .\".B bindmethod
1489 .\"of
1490 .\".B simple
1491 .\"requires the options
1492 .\".B binddn 
1493 .\"and
1494 .\".B credentials  
1495 .\"and should only be used when adequate security services 
1496 .\"(e.g TLS or IPSEC) are in place. A
1497 .\".B bindmethod 
1498 .\"of
1499 .\".B sasl 
1500 .\"requires the option
1501 .\".B saslmech. 
1502 .\"Specific security properties (as with the
1503 .\".B sasl-secprops
1504 .\"keyword above) for a SASL bind can be set with the
1505 .\".B secprops
1506 .\"option. A non-default SASL realm can be set with the
1507 .\".B realm
1508 .\"option.
1509 .\"If the 
1510 .\".B mechanism
1511 .\"will use Kerberos, a kerberos instance should be given in 
1512 .\".B authcId.
1513 .\"An
1514 .\".B attr list
1515 .\"can be given after the 
1516 .\".B attrs
1517 .\"keyword to allow the selective replication of the listed attributes only;
1518 .\"if the optional 
1519 .\".B !
1520 .\"mark is used, the list is considered exclusive, i.e. the listed attributes
1521 .\"are not replicated.
1522 .\"If an objectClass is listed, all the related attributes
1523 .\"are (are not) replicated.
1524 .\".RE
1525 .\".TP
1526 .\".B replogfile <filename>
1527 .\"Specify the name of the replication log file to log changes to.  
1528 .\"The replication log is typically written by
1529 .\".BR slapd (8)
1530 .\"and read by
1531 .\".BR slurpd (8).
1532 .\"See
1533 .\".BR slapd.replog (5)
1534 .\"for more information.  The specified file should be located
1535 .\"in a directory with limited read/write/execute access as the replication
1536 .\"logs may contain sensitive information.
1537 .TP
1538 .B olcRootDN: <dn>
1539 Specify the distinguished name that is not subject to access control 
1540 or administrative limit restrictions for operations on this database.
1541 This DN may or may not be associated with an entry.  An empty root
1542 DN (the default) specifies no root access is to be granted.  It is
1543 recommended that the rootdn only be specified when needed (such as
1544 when initially populating a database).  If the rootdn is within
1545 a namingContext (suffix) of the database, a simple bind password
1546 may also be provided using the
1547 .B olcRootPW
1548 directive. Note that the rootdn is always needed when using syncrepl.
1549 .TP
1550 .B olcRootPW: <password>
1551 Specify a password (or hash of the password) for the rootdn.  The
1552 password can only be set if the rootdn is within the namingContext
1553 (suffix) of the database.
1554 This option accepts all RFC 2307 userPassword formats known to
1555 the server (see 
1556 .B olcPasswordHash
1557 description) as well as cleartext.
1558 .BR slappasswd (8) 
1559 may be used to generate a hash of a password.  Cleartext
1560 and \fB{CRYPT}\fP passwords are not recommended.  If empty
1561 (the default), authentication of the root DN is by other means
1562 (e.g. SASL).  Use of SASL is encouraged.
1563 .TP
1564 .B olcSubordinate: [TRUE | FALSE | advertise]
1565 Specify that the current backend database is a subordinate of another
1566 backend database. A subordinate  database may have only one suffix. This
1567 option may be used to glue multiple databases into a single namingContext.
1568 If the suffix of the current database is within the namingContext of a
1569 superior database, searches against the superior database will be
1570 propagated to the subordinate as well. All of the databases
1571 associated with a single namingContext should have identical rootdns.
1572 Behavior of other LDAP operations is unaffected by this setting. In
1573 particular, it is not possible to use moddn to move an entry from
1574 one subordinate to another subordinate within the namingContext.
1575
1576 If the optional \fBadvertise\fP flag is supplied, the naming context of
1577 this database is advertised in the root DSE. The default is to hide this
1578 database context, so that only the superior context is visible.
1579
1580 If the slap tools
1581 .BR slapcat (8),
1582 .BR slapadd (8),
1583 or
1584 .BR slapindex (8)
1585 are used on the superior database, any glued subordinates that support
1586 these tools are opened as well.
1587
1588 Databases that are glued together should usually be configured with the
1589 same indices (assuming they support indexing), even for attributes that
1590 only exist in some of these databases. In general, all of the glued
1591 databases should be configured as similarly as possible, since the intent
1592 is to provide the appearance of a single directory.
1593
1594 Note that the subordinate functionality is implemented internally
1595 by the \fIglue\fP overlay and as such its behavior will interact with other
1596 overlays in use. By default, the glue overlay is automatically configured as
1597 the last overlay on the superior database. Its position on the database
1598 can be explicitly configured by setting an \fBoverlay glue\fP directive
1599 at the desired position. This explicit configuration is necessary e.g.
1600 when using the \fIsyncprov\fP overlay, which needs to follow \fIglue\fP
1601 in order to work over all of the glued databases. E.g.
1602 .RS
1603 .nf
1604         dn: olcDatabase={1}bdb,cn=config
1605         olcSuffix: dc=example,dc=com
1606         ...
1607
1608         dn: olcOverlay={0}glue,olcDatabase={1}bdb,cn=config
1609         ...
1610
1611         dn: olcOverlay={1}syncprov,olcDatabase={1}bdb,cn=config
1612         ...
1613 .fi
1614 .RE
1615 See the Overlays section below for more details.
1616 .TP
1617 .B olcSuffix: <dn suffix>
1618 Specify the DN suffix of queries that will be passed to this 
1619 backend database.  Multiple suffix lines can be given and at least one is 
1620 required for each database definition.
1621 If the suffix of one database is "inside" that of another, the database
1622 with the inner suffix must come first in the configuration file.
1623 .HP
1624 .hy 0
1625 .B olcSyncrepl: rid=<replica ID>
1626 .B provider=ldap[s]://<hostname>[:port]
1627 .B searchbase=<base DN>
1628 .B [type=refreshOnly|refreshAndPersist]
1629 .B [interval=dd:hh:mm:ss]
1630 .B [retry=[<retry interval> <# of retries>]+]
1631 .B [filter=<filter str>]
1632 .B [scope=sub|one|base|subord]
1633 .B [attrs=<attr list>]
1634 .B [exattrs=<attr list>]
1635 .B [attrsonly]
1636 .B [sizelimit=<limit>]
1637 .B [timelimit=<limit>]
1638 .B [schemachecking=on|off]
1639 .B [bindmethod=simple|sasl]
1640 .B [binddn=<dn>]
1641 .B [saslmech=<mech>]
1642 .B [authcid=<identity>]
1643 .B [authzid=<identity>]
1644 .B [credentials=<passwd>]
1645 .B [realm=<realm>]
1646 .B [secprops=<properties>]
1647 .B [starttls=yes|critical]
1648 .B [tls_cert=<file>]
1649 .B [tls_key=<file>]
1650 .B [tls_cacert=<file>]
1651 .B [tls_cacertdir=<path>]
1652 .B [tls_reqcert=never|allow|try|demand]
1653 .B [tls_ciphersuite=<ciphers>]
1654 .B [tls_crlcheck=none|peer|all]
1655 .B [logbase=<base DN>]
1656 .B [logfilter=<filter str>]
1657 .B [syncdata=default|accesslog|changelog]
1658 .RS
1659 Specify the current database as a replica which is kept up-to-date with the 
1660 master content by establishing the current
1661 .BR slapd (8)
1662 as a replication consumer site running a
1663 .B syncrepl
1664 replication engine.
1665 The replica content is kept synchronized to the master content using
1666 the LDAP Content Synchronization protocol. Refer to the
1667 "OpenLDAP Administrator's Guide" for detailed information on
1668 setting up a replicated
1669 .B slapd
1670 directory service using the 
1671 .B syncrepl
1672 replication engine.
1673
1674 .B rid
1675 identifies the current
1676 .B syncrepl
1677 directive within the replication consumer site.
1678 It is a non-negative integer having no more than three digits.
1679
1680 .B provider
1681 specifies the replication provider site containing the master content
1682 as an LDAP URI. If <port> is not given, the standard LDAP port number
1683 (389 or 636) is used.
1684
1685 The content of the
1686 .B syncrepl
1687 replica is defined using a search
1688 specification as its result set. The consumer
1689 .B slapd
1690 will send search requests to the provider
1691 .B slapd
1692 according to the search specification. The search specification includes
1693 .B searchbase, scope, filter, attrs, attrsonly, sizelimit,
1694 and
1695 .B timelimit
1696 parameters as in the normal search specification. The
1697 .B exattrs
1698 option may also be used to specify attributes that should be omitted
1699 from incoming entries.
1700 The \fBscope\fP defaults to \fBsub\fP, the \fBfilter\fP defaults to
1701 \fB(objectclass=*)\fP, and there is no default \fBsearchbase\fP. The
1702 \fBattrs\fP list defaults to \fB"*,+"\fP to return all user and operational
1703 attributes, and \fBattrsonly\fP and \fBexattrs\fP are unset by default.
1704 The \fBsizelimit\fP and \fBtimelimit\fP only
1705 accept "unlimited" and positive integers, and both default to "unlimited".
1706 Note, however, that any provider-side limits for the replication identity
1707 will be enforced by the provider regardless of the limits requested
1708 by the LDAP Content Synchronization operation, much like for any other
1709 search operation.
1710
1711 The LDAP Content Synchronization protocol has two operation types.
1712 In the
1713 .B refreshOnly
1714 operation, the next synchronization search operation
1715 is periodically rescheduled at an interval time (specified by 
1716 .B interval
1717 parameter; 1 day by default)
1718 after each synchronization operation finishes.
1719 In the
1720 .B refreshAndPersist
1721 operation, a synchronization search remains persistent in the provider slapd.
1722 Further updates to the master replica will generate
1723 .B searchResultEntry
1724 to the consumer slapd as the search responses to the persistent
1725 synchronization search.
1726
1727 If an error occurs during replication, the consumer will attempt to
1728 reconnect according to the
1729 .B retry
1730 parameter which is a list of the <retry interval> and <# of retries> pairs.
1731 For example, retry="60 10 300 3" lets the consumer retry every 60 seconds
1732 for the first 10 times and then retry every 300 seconds for the next 3
1733 times before stop retrying. The `+' in <# of retries> means indefinite
1734 number of retries until success.
1735
1736 The schema checking can be enforced at the LDAP Sync
1737 consumer site by turning on the
1738 .B schemachecking
1739 parameter. The default is off.
1740
1741 A
1742 .B bindmethod
1743 of 
1744 .B simple
1745 requires the options 
1746 .B binddn
1747 and 
1748 .B credentials
1749 and should only be used when adequate security services
1750 (e.g. TLS or IPSEC) are in place.
1751 A
1752 .B bindmethod
1753 of
1754 .B sasl
1755 requires the option
1756 .B saslmech.
1757 Depending on the mechanism, an authentication identity and/or
1758 credentials can be specified using
1759 .B authcid
1760 and
1761 .B credentials.
1762 The
1763 .B authzid
1764 parameter may be used to specify an authorization identity.
1765 Specific security properties (as with the
1766 .B sasl-secprops
1767 keyword above) for a SASL bind can be set with the
1768 .B secprops
1769 option. A non default SASL realm can be set with the
1770 .B realm 
1771 option.
1772 The provider, other than allow authentication of the syncrepl identity,
1773 should grant that identity appropriate access privileges to the data 
1774 that is being replicated (\fBaccess\fP directive), and appropriate time 
1775 and size limits (\fBlimits\fP directive).
1776
1777
1778 The
1779 .B starttls
1780 parameter specifies use of the StartTLS extended operation
1781 to establish a TLS session before Binding to the provider. If the
1782 .B critical
1783 argument is supplied, the session will be aborted if the StartTLS request
1784 fails. Otherwise the syncrepl session continues without TLS.  Note that the
1785 main slapd TLS settings are not used by the syncrepl engine;
1786 by default the TLS parameters from ETCDIR/ldap.conf will be used.
1787 TLS settings may be specified here, in which case the ldap.conf settings
1788 will be completely ignored.
1789
1790 Rather than replicating whole entries, the consumer can query logs of
1791 data modifications. This mode of operation is referred to as \fIdelta
1792 syncrepl\fP. In addition to the above parameters, the
1793 .B logbase
1794 and
1795 .B logfilter
1796 parameters must be set appropriately for the log that will be used. The
1797 .B syncdata
1798 parameter must be set to either "accesslog" if the log conforms to the
1799 .BR slapo-accesslog (5)
1800 log format, or "changelog" if the log conforms
1801 to the obsolete \fIchangelog\fP format. If the
1802 .B syncdata
1803 parameter is omitted or set to "default" then the log parameters are
1804 ignored.
1805 .RE
1806 .TP
1807 .B olcUpdateDN: <dn>
1808 This option is only applicable in a slave
1809 database.
1810 It specifies the DN permitted to update (subject to access controls)
1811 the replica (typically, this is the DN
1812 .BR slurpd (8)
1813 binds to update the replica).  Generally, this DN
1814 .I should not
1815 be the same as the
1816 .B rootdn 
1817 used at the master.
1818 .TP
1819 .B olcUpdateRef: <url>
1820 Specify the referral to pass back when
1821 .BR slapd (8)
1822 is asked to modify a replicated local database.
1823 If multiple values are specified, each url is provided.
1824
1825 .SH DATABASE-SPECIFIC OPTIONS
1826 Each database may allow specific configuration options; they are
1827 documented separately in the backends' manual pages. See the
1828 .BR slapd.backends (5)
1829 manual page for an overview of available backends.
1830 .SH OVERLAYS
1831 An overlay is a piece of
1832 code that intercepts database operations in order to extend or change
1833 them. Overlays are pushed onto
1834 a stack over the database, and so they will execute in the reverse
1835 of the order in which they were configured and the database itself
1836 will receive control last of all.
1837
1838 Overlays must be configured as child entries of a specific database. The
1839 entry's RDN must be of the form
1840 .B olcOverlay={x}<overlaytype>
1841 and the entry must have the olcOverlayConfig objectClass. Normally the
1842 config engine generates the "{x}" index in the RDN automatically, so
1843 it can be omitted when initially loading these entries.
1844
1845 See the
1846 .BR slapd.overlays (5)
1847 manual page for an overview of available overlays.
1848 .SH EXAMPLES
1849 .LP
1850 Here is a short example of a configuration in LDIF suitable for use with
1851 .BR slapadd (8)
1852 :
1853 .LP
1854 .RS
1855 .nf
1856 dn: cn=config
1857 objectClass: olcGlobal
1858 cn: config
1859 olcPidFile: LOCALSTATEDIR/slapd.pid
1860 olcAttributeOptions: x-hidden lang-
1861
1862 dn: cn=schema,cn=config
1863 objectClass: olcSchemaConfig
1864 cn: schema
1865
1866 include: SYSCONFDIR/schema/core.ldif
1867
1868 dn: olcDatabase=frontend,cn=config
1869 objectClass: olcDatabaseConfig
1870 objectClass: olcFrontendConfig
1871 olcDatabase: frontend
1872 # Subtypes of "name" (e.g. "cn" and "ou") with the
1873 # option ";x-hidden" can be searched for/compared,
1874 # but are not shown.  See \fBslapd.access\fP(5).
1875 olcAccess: to attrs=name;x-hidden by * =cs
1876 # Protect passwords.  See \fBslapd.access\fP(5).
1877 olcAccess: to attrs=userPassword  by * auth
1878 # Read access to other attributes and entries.
1879 olcAccess: to * by * read
1880
1881 # set a rootpw for the config database so we can bind.
1882 # deny access to everyone else.
1883 dn: olcDatabase=config,cn=config
1884 objectClass: olcDatabaseConfig
1885 olcDatabase: config
1886 olcRootPW: {SSHA}XKYnrjvGT3wZFQrDD5040US592LxsdLy
1887 olcAccess: to * by * none
1888
1889 dn: olcDatabase=bdb,cn=config
1890 objectClass: olcDatabaseConfig
1891 objectClass: olcBdbConfig
1892 olcDatabase: bdb
1893 olcSuffix: "dc=our-domain,dc=com"
1894 # The database directory MUST exist prior to
1895 # running slapd AND should only be accessible
1896 # by the slapd/tools. Mode 0700 recommended.
1897 olcDbDirectory: LOCALSTATEDIR/openldap-data
1898 # Indices to maintain
1899 olcDbIndex:     objectClass  eq
1900 olcDbIndex:     cn,sn,mail   pres,eq,approx,sub
1901
1902 # We serve small clients that do not handle referrals,
1903 # so handle remote lookups on their behalf.
1904 dn: olcDatabase=ldap,cn=config
1905 objectClass: olcDatabaseConfig
1906 objectClass: olcLdapConfig
1907 olcDatabase: ldap
1908 olcSuffix: ""
1909 olcDbUri: ldap://ldap.some-server.com/
1910 .fi
1911 .RE
1912 .LP
1913 Assuming the above data was saved in a file named "config.ldif" and the
1914 ETCDIR/slapd.d directory has been created, this command will initialize
1915 the configuration:
1916 .RS
1917 .nf
1918 slapadd -F ETCDIR/slapd.d -n 0 -l config.ldif
1919 .fi
1920 .RE
1921
1922 .LP
1923 "OpenLDAP Administrator's Guide" contains a longer annotated
1924 example of a slapd configuration.
1925
1926 Alternatively, an existing slapd.conf file can be converted to the new
1927 format using slapd or any of the slap tools:
1928 .RS
1929 .nf
1930 slaptest -f ETCDIR/slapd.conf -F ETCDIR/slapd.d
1931 .fi
1932 .RE
1933
1934 .SH FILES
1935 .TP
1936 ETCDIR/slapd.conf
1937 default slapd configuration file
1938 .TP
1939 ETCDIR/slapd.d
1940 default slapd configuration directory
1941 .SH SEE ALSO
1942 .BR ldap (3),
1943 .BR ldif (5),
1944 .BR slapd.access (5),
1945 .BR slapd.backends (5),
1946 .BR slapd.conf (5),
1947 .BR slapd.overlays (5),
1948 .BR slapd.plugin (5),
1949 .BR slapd.replog (5),
1950 .BR slapd (8),
1951 .BR slapacl (8),
1952 .BR slapadd (8),
1953 .BR slapauth (8),
1954 .BR slapcat (8),
1955 .BR slapdn (8),
1956 .BR slapindex (8),
1957 .BR slappasswd (8),
1958 .BR slaptest (8),
1959 .BR slurpd (8).
1960 .LP
1961 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1962 .SH ACKNOWLEDGEMENTS
1963 .B OpenLDAP
1964 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1965 .B OpenLDAP
1966 is derived from University of Michigan LDAP 3.3 Release.