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