]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
Add sasl-host directive
[openldap] / doc / man / man5 / slapd.conf.5
1 .TH SLAPD.CONF 5 "23 August 2000" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The file
11 .B ETCDIR/slapd.conf
12 contains configuration information for the
13 .BR slapd (8)
14 daemon.  This configuration file is also used by the
15 .BR slurpd (8)
16 replication daemon and by the SLAPD tools
17 .BR slapadd (8),
18 .BR slapcat (8),
19 and
20 .BR slapindex (8).
21 .LP
22 The
23 .B slapd.conf
24 file consists of a series of global configuration options that apply to
25 .B slapd
26 as a whole (including all backends), followed by zero or more database
27 backend definitions that contain information specific to a backend
28 instance.
29 .LP
30 The general format of
31 .B slapd.conf
32 is as follows:
33 .LP
34 .nf
35     # comment - these options apply to every database
36     <global configuration options>
37     # first database definition & configuration options
38     database    <backend 1 type>
39     <configuration options specific to backend 1>
40     # subsequent database definitions & configuration options
41     ...
42 .fi
43 .LP
44 As many backend-specific sections as desired may be included.  Global
45 options can be overridden in a backend (for options that appear more
46 than once, the last appearance in the
47 .B slapd.conf
48 file is used).  Blank lines and comment lines beginning with a `#'
49 character are ignored. If a line begins with white space, it is
50 considered a continuation of the previous line.
51 .LP
52 Arguments on configuration lines are separated by white space. If an
53 argument contains white space, the argument should be enclosed in
54 double quotes.  If an argument contains a double quote (`"') or a
55 backslash character (`\\'), the character should be preceded by a
56 backslash character.
57 .LP
58 The specific configuration options available are discussed below in the
59 Global Configuration Options, General Backend Options, LDBM
60 Backend-Specific Options, Shell Backend-Specific Options, and Password
61 Backend-Specific Options sections.  Refer to the "OpenLDAP
62 Administrator's Guide" for more details on the slapd configuration
63 file.
64 .SH GLOBAL CONFIGURATION OPTIONS
65 Options described in this section apply to all backends, unless specifically 
66 overridden in a backend definition. Arguments that should be replaced by 
67 actual text are shown in brackets <>.
68 .TP
69 .B access to <what> [ by <who> <access> <control> ]+
70 Grant access (specified by <access>) to a set of entries and/or
71 attributes (specified by <what>) by one or more requestors (specified
72 by <who>).
73 See the "OpenLDAP's Administrator's Guide" for details.
74 .TP
75 .B argsfile <filename>
76 The ( absolute ) name of a file that will hold the 
77 .B slapd
78 server's command line options
79 if started without the debugging command line option.
80 .HP
81 .hy 0
82 .B attributetype (\ <oid> [NAME\ <name>] [OBSOLETE]\
83  [DESC\ <description>]\
84  [SUP\ <oid>] [EQUALITY\ <oid>] [ORDERING\ <oid>]\
85  [SUBSTR\ <oid>] [SYNTAX\ <oidlen>] [SINGLE\-VALUE] [COLLECTIVE]\
86  [NO\-USER\-MODIFICATION] [USAGE\ <attributeUsage>]\ )
87 .RS
88 Specify an attribute type using the LDAPv3 syntax defined in RFC 2252.
89 The slapd parser extends the RFC 2252 definition by allowing string
90 forms as well as numeric OIDs to be used for the attribute OID and
91 attribute syntax OID.
92 (See the
93 .B objectidentifier
94 description.) Currently the syntax name parser is case-sensitive.
95 The known syntax names are:
96 .RS
97 .RS
98 .PD 0
99 AttributeTypeDescription Audio Binary BitString Certificate CertificateList
100 CertificatePair DN DeliveryMethod DirectoryString DITContentRuleDescription
101 DITStructureRuleDescription EnhancedGuide FacsimileTelephoneNumber
102 GeneralizedTime Guide IA5String Integer MatchingRuleDescription
103 MatchingRuleUseDescription MailPreference NameAndOptionalUUID
104 NameFormDescription NumericString ObjectClassDescription OID
105 OtherMailbox OctetString PostalAddress ProtocolInformation
106 PresentationAddress PrintableString SupportedAlgorithm TelephoneNumber
107 TeletexTerminalIdentifier TelexNumber UTCTime LDAPSyntaxDescription
108 SubstringAssertion NISnetgrouptriple Bootparameter
109 .PD
110 .RE
111 .RE
112 .RE
113 .TP
114 .B concurrency <integer>
115 Specify a desired level of concurrency.  Provided to the underlying
116 thread system as a hint.  The default is not to provdide any hint.
117 .HP
118 .B defaultaccess { none | auth | compare | search | read | write }
119 .RS
120 Specify the default access level to grant requestors when
121 no access directives were provided for the database.
122 The default behavior is to grant 'read' access.  It is
123 recommended that
124 .B access
125 directives be used instead.
126 .RE
127 .TP
128 .B disallow <features>
129 Specify a set of features (separated by white space) to disallow.
130 .B bind_v2
131 disables acceptance of LDAPv2 bind requests.
132 .B bind_anon
133 disables acceptance of anonymous bind requests.
134 .B bind_anon_cred
135 disables anonymous bind creditials are not empty (e.g. when
136 DN is empty).
137 .B bind_anon_dn
138 disables anonymous bind when DN is not empty.
139 .TP
140 .B idletimeout <integer>
141 Specify the number of seconds to wait before forcibly closing
142 an idle client connections.  A idletimeout of 0 disables this
143 feature.  The default is 0.
144 .TP
145 .B include <filename>
146 Read additional configuration information from the given file before
147 continuing with the next line of the current file.
148 .TP
149 .B loglevel <integer>
150 Specify the level at which debugging statements and operation 
151 statistics should be syslogged (currently logged to the
152 .BR syslogd (8) 
153 LOG_LOCAL4 facility).  Log levels are additive, and available levels
154 are:
155 .RS
156 .RS
157 .PD 0
158 .TP
159 .B 1
160 trace function calls
161 .TP
162 .B 2
163 debug packet handling
164 .TP
165 .B 4
166 heavy trace debugging
167 .TP
168 .B 8
169 connection management
170 .TP
171 .B 16
172 print out packets sent and received
173 .TP
174 .B 32
175 search filter processing
176 .TP
177 .B 64
178 configuration file processing
179 .TP
180 .B 128
181 access control list processing
182 .TP
183 .B 256
184 stats log connections/operations/results
185 .TP
186 .B 512
187 stats log entries sent
188 .TP
189 .B 1024
190 print communication with shell backends
191 .TP
192 .B 2048
193 entry parsing
194 .PD
195 .RE
196 .RE
197 .HP
198 .B objectclass ( <oid> [NAME <name>] [DESC <description] [OBSOLETE]\
199  [SUP <oids>] [{ ABSTRACT | STRUCTURAL | AUXILIARY }] [MUST <oids>]\
200  [MAY <oids>] )
201 .RS
202 Specify an objectclass using the LDAPv3 syntax defined in RFC 2252.
203 The slapd parser extends the RFC 2252 definition by allowing string
204 forms as well as numeric OIDs to be used for the object class OID.
205 (See the
206 .B
207 objectidentifier
208 description.)  Object classes are "STRUCTURAL" by default.
209 .RE
210 .TP
211 .B objectidentifier <name> { <oid> | <name>[:<suffix>] }
212 Define a string name that equates to the given OID. The string can be used
213 in place of the numeric OID in objectclass and attribute definitions. The
214 name can also be used with a suffix of the form ":xx" in which case the
215 value "oid.xx" will be used.
216 .TP
217 .B pidfile <filename>
218 The ( absolute ) name of a file that will hold the 
219 .B slapd
220 server's process ID ( see
221 .BR getpid (2)
222 ) if started without the debugging command line option.
223 .TP
224 .B password-hash <hash>
225 The <hash> to use for userPassword generation.  One of
226 .BR {SSHA} ,
227 .BR {SHA} ,
228 .BR {SMD5} ,
229 .BR {MD5} ,
230 .BR {CRYPT} ,
231 .BR {KERBEROS} ,
232 .BR {SASL} ,
233 and
234 .BR {UNIX} .
235 The default is
236 .BR {SSHA} .
237 .TP
238 .B referral <url>
239 Specify the referral to pass back when
240 .BR slapd (8)
241 cannot find a local database to handle a request.
242 If specified multiple times, each url is provided.
243 .TP
244 .B require <conditions>
245 Specify a set of conditions (separated by white space) to require.
246 The directive may be specified globally and/or per-database.
247 .B bind
248 requires bind operation prior to directory operations.
249 .B LDAPv3
250 requires session to be using LDAP version 3.
251 .B authc
252 requires authentication prior to directory operations.
253 .B SASL
254 requires SASL authentication prior to directory operations.
255 .B strong
256 requires strong authentication prior to directory operations.
257 Currently
258 .B SASL
259 and
260 .B strong
261 conditions are currently same.
262 .B none
263 may be used to require no conditions (useful for clearly globally
264 set conditions within a particular database).
265 .TP
266 .B sasl-host <fqdn>
267 Used to specify the fully qualified domain name used for SASL processing.
268 .TP
269 .B sasl-realm <string>
270 Used to specify Cyrus SASL realm.
271 .TP
272 .B sasl-secprops <properties>
273 Used to specify Cyrus SASL security properties.
274 The
275 .B none
276 flag (without any other properities) causes the flag properites
277 defaults ("noanonymous,noplain") to be cleared.
278 The
279 .B noplain
280 flag disables mechanisms susceptible to simple passive attacks.
281 The
282 .B noactive
283 flag disables mechanisms susceptible to active attacks.
284 The
285 .B nodict
286 flag disables mechanisms susceptible to passive dictionary attacks.
287 The
288 .B noanonyous
289 flag disables mechanisms which support anonymous login.
290 The
291 .B forwardsec
292 flag require forward secrecy between sessions.
293 The
294 .B passcred
295 require mechanisms which pass client credentials (and allow
296 mechanisms which can pass credentials to do so).
297 The
298 .B minssf=<factor> 
299 property specifies the minimum acceptable
300 .I security strength factor
301 as an integer approximate to effective key length used for
302 encryption.  0 (zero) implies no protection, 1 implies integrity
303 protection only, 56 allows DES or other weak ciphers, 112
304 allows triple DES and other strong ciphers, 128 allows RC4,
305 Blowfish and other modern strong ciphers.  The default is 0.
306 The
307 .B maxssf=<factor> 
308 property specifies the maximum acceptable
309 .I security strength factor
310 as an integer (see minssf description).  The default is INT_MAX.
311 The
312 .B maxbufsize=<factor> 
313 property specifies the maximum security layer receive buffer
314 size allowed.  0 disables security layers.  The default is 65536.
315 .TP
316 .B schemacheck { on | off }
317 Turn schema checking on or off. The default is on.
318 .TP
319 .B security <factors>
320 Specify a set of factors (separated by white space) to require.
321 An integer value is associated with each factor and is roughly
322 equivalent of the encryption key length to require.  A value
323 of 112 is equivalent to 3DES, 128 to Blowfish, etc..
324 The directive may be specified globally and/or per-database.
325 .B ssf=<n>
326 specifies the overall security strength factor.
327 .B transport=<n>
328 specifies the transport security strength factor.
329 .B tls=<n>
330 specifies the TLS security strength factor.
331 .B sasl=<n>
332 specifies the SASL security strength factor.
333 .B update_ssf=<n>
334 specifies the overall security strength factor to require for
335 directory updates.
336 .B update_transport=<n>
337 specifies the transport security strength factor to require for
338 directory updates.
339 .B update_tls=<n>
340 specifies the TLS security strength factor to require for
341 directory updates.
342 .B update_sasl=<n>
343 specifies the SASL security strength factor to require for
344 directory updates.
345 Note that the
346 .B transport
347 factor is measure of security provided by the underlying transport,
348 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
349 .TP
350 .B sizelimit <integer>
351 Specify the maximum number of entries to return from a search operation.
352 The default size limit is 500.
353 .TP
354 .B srvtab <filename>
355 Specify the srvtab file in which the kerberos keys necessary for
356 authenticating clients using kerberos can be found. This option is only
357 meaningful if you are using Kerberos authentication.
358 .TP
359 .B timelimit <integer>
360 Specify the maximum number of seconds (in real time)
361 require forward secrecy between sessions.
362 .TP
363 .B schemacheck { on | off }
364 Turn schema checking on or off. The default is on.
365 .TP
366 .B sizelimit <integer>
367 Specify the maximum number of entries to return from a search operation.
368 The default size limit is 500.
369 .TP
370 .B sasl-realm <realm>
371 Specify SASL realm.  Default is empty.
372 .TP
373 .B sasl-secprops <props>
374 Cyrus SASL security properties.  Default is "noanonymous,noplain".
375 .TP
376 .B srvtab <filename>
377 Specify the srvtab file in which the kerberos keys necessary for
378 authenticating clients using kerberos can be found. This option is only
379 meaningful if you are using Kerberos authentication.
380 .TP
381 .B timelimit <integer>
382 Specify the maximum number of seconds (in real time)
383 .B slapd
384 will spend answering a search request.  The default time limit is 3600.
385 .SH TLS OPTIONS
386 If
387 .B slapd
388 is build with support for Transport Layer Security, there are more options
389 you can specify.
390 .TP
391 .B TLSCipherSuite <cipher-suite-spec>
392 Permits configuring what ciphers will be accepted and the preference order.
393 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
394
395 TLSCipherSuite HIGH:MEDIUM:+SSLv2
396
397 To check what ciphers a given spec selects, use:
398
399 openssl ciphers -v <cipher-suite-spec>
400 .TP
401 .B TLSCertificateFile <filename>
402 Specifies the file that contains the
403 .B slapd
404 server certificate.
405 .TP
406 .B TLSCertificateKeyFile <filename>
407 Specifies the file that contains the
408 .B slapd
409 server private key that matches the certificate stored in the
410 .B TLSCertificateFile
411 file.  Currently, the private key must not be protected with a password, so
412 it is of critical importance that it is protected carefully. 
413 .SH GENERAL BACKEND OPTIONS
414 Options in this section only apply to the configuration file section
415 for the backend in which they are defined.  They are supported by every
416 type of backend.
417 .TP
418 .B database <databasetype>
419 Mark the beginning of a new database instance definition. <databasetype>
420 should be one of
421 .B ldbm,
422 .B shell,
423 or
424 .B passwd
425 depending on which backend will serve the database.
426 .TP
427 .B lastmod on | off
428 Controls whether
429 .B slapd
430 will automatically maintain the 
431 modifiersName, modifyTimestamp, creatorsName, and 
432 createTimestamp attributes for entries.  By default, lastmod is on.
433 .TP
434 .B readonly on | off
435 This option puts the database into "read-only" mode.  Any attempts to 
436 modify the database will return an "unwilling to perform" error.  By
437 default, readonly is off.
438 .HP
439 .B replica host=<hostname>[:port] bindmethod=simple|sasl
440 .B [binddn=<simple DN>] [credentials=<simple password>]
441 .B [saslmech=<SASL mech>] [authcId=<authentication ID>]
442 .RS
443 Specify a replication site for this database.  Refer to the "OpenLDAP 
444 Administrator's Guide" for detailed information on setting up a replicated
445 .B slapd
446 directory service. A
447 .B bindmethod
448 of
449 .B simple
450 requires the options
451 .B binddn 
452 and
453 .B credentials  
454 and should only be used when adequate security services 
455 (e.g TLS or IPSEC) are in place. A
456 .B bindmethod 
457 of
458 .B sasl 
459 requires the option
460 .B saslmech. 
461 If the 
462 .B mechanism
463 will use Kerberos, a kerberos instance should be given in 
464 .B authcId.
465 .RE
466 .TP
467 .B replogfile <filename>
468 Specify the name of the replication log file to log changes to.  
469 The replication log is typically written by
470 .BR slapd (8)
471 and read by
472 .BR slurpd (8).
473 See
474 .BR slapd.replog (5)
475 for more information.
476 .TP
477 .B rootdn <dn>
478 Specify the distinguished name that is not subject to access control 
479 or administrative limit restrictions for operations on this database.
480 This DN may or may not be associated with an entry.  An empty root
481 DN, the default, specifies no root access is to be granted.
482 .TP
483 .B rootpw <password>
484 Specify a password (or hash of the password) for the rootdn.
485 This option accepts all RFC 2307 userPassword formats known to
486 the server (see 
487 .B password-hash
488 desription) as well as cleartext.
489 .BR slappasswd (8) 
490 may be used to generate a hash of a password.  Cleartext
491 and \fB{CRYPT}\fP passwords are not recommended.  The default
492 is empty imply authentication of the root DN is by other means
493 (e.g. SASL).  Use of SASL is encouraged.
494 .TP
495 .B suffix <dn suffix>
496 Specify the DN suffix of queries that will be passed to this 
497 backend database.  Multiple suffix lines can be given and at least one is 
498 required for each database definition.
499 .TP
500 .B updatedn <dn>
501 This option is only applicable in a slave
502 .B slapd.
503 It specifies the DN allowed to make changes to the replica (typically,
504 this is the DN
505 .BR slurpd (8)
506 binds as when making changes to the replica).
507 .TP
508 .B updateref <url>
509 Specify the referral to pass back when
510 .BR slapd (8)
511 is asked to modify a replicated local database.
512 If specified multiple times, each url is provided.
513 .SH LDBM BACKEND-SPECIFIC OPTIONS
514 Options in this category only apply to the LDBM backend database. That is,
515 they must follow a "database ldbm" line and come before any subsequent
516 "database" lines.  The LDBM backend is a high-performance database that
517 makes extensive use of indexing and caching to speed data access. 
518 .TP
519 .B cachesize <integer>
520 Specify the size in entries of the in-memory cache maintained 
521 by the LDBM backend database instance.  The default is 1000 entries.
522 .TP
523 .B dbcachesize <integer>
524 Specify the size in bytes of the in-memory cache associated 
525 with each open index file. If not supported by the underlying database 
526 method, this option is ignored without comment.  The default is 100000 bytes.
527 .TP
528 .B dbnolocking
529 Specify that no database locking should be performed.  
530 Enabling this option may improve performance at the expense of data security.
531 .B dbnosync
532 Specify that on-disk database contents should not be immediately
533 synchronized with in memory changes.  Enabling this option may improve
534 performance at the expense of data security.
535 .TP
536 .B directory <directory>
537 Specify the directory where the LDBM files containing this database and
538 associated indexes live.  A separate directory must be specified for
539 each database.  The default is
540 .BR LOCALSTATEDIR/openldap-ldbm .
541 .TP
542 .B
543 index {<attrlist>|default} [pres,eq,approx,sub,<special>]
544 Specify the indexes to maintain for the given attribute. If only 
545 an <attr> is given, the indices specified for \fBdefault\fR
546 are maintained.  A number of special index parameters may be
547 specified.
548 The index type
549 .B sub
550 can be decomposed into
551 .BR subinitial ,
552 .BR subany ,\ and
553 .B subfinal
554 indices.
555 The special type
556 .B lang
557 may be specified to allow use of this index by language subtypes.
558 The special type
559 .B autolang
560 may be specified to automatically maintain separate indices for each
561 language subtypes.
562 The special type
563 .B subtypes
564 may be specified to allow use of this index by named subtypes.
565 The special type
566 .B autosubtypes
567 may be specified to automatically maintain separate indices for each
568 other subtypes.
569 .TP
570 .B mode <integer>
571 Specify the file protection mode that newly created database 
572 index files should have.  The default is 0600.
573 .SH SHELL BACKEND-SPECIFIC OPTIONS
574 Options in this category only apply to the SHELL backend database. That is,
575 they must follow a "database shell" line and come before any subsequent
576 "database" lines.  The Shell backend executes external programs to
577 implement operations, and is designed to make it easy to tie an existing
578 database to the
579 .B slapd
580 front-end.
581 .TP
582 .B bind <pathname>
583 .TP
584 .B unbind <pathname>
585 .TP
586 .B search <pathname>
587 .TP
588 .B compare <pathname>
589 .TP
590 .B modify <pathname>
591 .TP
592 .B modrdn <pathname>
593 .TP
594 .B add <pathname>
595 .TP
596 .B delete <pathname>
597 .TP
598 .B abandon <pathname>
599 These options specify the pathname of the command to execute in response 
600 to the given LDAP operation.
601 .LP
602 Note that you need only supply configuration lines for those commands you
603 want the backend to handle. Operations for which a command is not
604 supplied will be refused with an "unwilling to perform" error.
605 .SH PASSWORD BACKEND-SPECIFIC OPTIONS
606 Options in this category only apply to the PASSWD backend database.
607 That is, they must follow a "database passwd" line and come before any
608 subsequent "database" lines.  The PASSWD database serves up the user
609 account information listed in the system
610 .BR passwd (5)
611 file.
612 .TP
613 .B file <filename>
614 Specifies an alternate passwd file to use.  The default is
615 .B /etc/passwd.
616 .SH EXAMPLE
617 "OpenLDAP Administrator's Guide" contains an annotated
618 example of a configuration file.
619 .SH FILES
620 ETCDIR/slapd.conf
621 .SH SEE ALSO
622 .BR ldap (3),
623 .BR slapd.replog (5),
624 .BR locale (5),
625 .BR passwd (5),
626 .BR slapd (8),
627 .BR slapadd (8),
628 .BR slapcat (8),
629 .BR slapindex (8),
630 .BR slappassword (8),
631 .BR slurpd (8),
632 .LP
633 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
634 .SH ACKNOWLEDGEMENTS
635 .B      OpenLDAP
636 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
637 .B      OpenLDAP
638 is derived from University of Michigan LDAP 3.3 Release.