1 .TH SLAPD-LDAP 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2012 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 slapd\-ldap \- LDAP backend to slapd
12 is not an actual database; instead it acts as a proxy to forward incoming
13 requests to another LDAP server. While processing requests it will also
14 chase referrals, so that referrals are fully processed instead of being
15 returned to the slapd client.
17 Sessions that explicitly Bind to the back-ldap database always create their
18 own private connection to the remote LDAP server. Anonymous sessions will
19 share a single anonymous connection to the remote server. For sessions bound
20 through other mechanisms, all sessions with the same DN will share the
21 same connection. This connection pooling strategy can enhance the proxy's
22 efficiency by reducing the overhead of repeatedly making/breaking multiple
25 The ldap database can also act as an information service, i.e. the identity
26 of locally authenticated clients is asserted to the remote server, possibly
27 in some modified form.
28 For this purpose, the proxy binds to the remote server with some
29 administrative identity, and, if required, authorizes the asserted identity.
33 The administrative identity of the proxy, on the remote server, must be
34 allowed to authorize by means of appropriate
42 must contain schema information for the attributes and objectClasses
43 used in filters, request DNs and request-related data in general.
44 It should also contain schema information for the data returned
45 by the proxied server.
46 It is the responsibility of the proxy administrator to keep the schema
47 of the proxy lined up with that of the proxied server.
50 Note: When looping back to the same instance of
52 each connection requires a new thread; as a consequence,
54 must be compiled with thread support, and the \fBthreads\fP parameter
55 may need some tuning; in those cases, one may consider using
57 instead, which performs the relayed operation
58 internally and thus reuses the same connection.
63 options apply to the LDAP backend database.
64 That is, they must follow a "database ldap" line and come before any
65 subsequent "backend" or "database" lines.
66 Other database options are described in the
71 Note: In early versions of back-ldap it was recommended to always set
84 This was required because operational attributes related to entry creation
85 and modification should not be proxied, as they could be mistakenly written
86 to the target server(s), generating an error.
87 The current implementation automatically sets lastmod to \fBoff\fP,
88 so its use is redundant and should be omitted.
92 LDAP server to use. Multiple URIs can be set in a single
94 argument, resulting in the underlying library automatically
95 calling the first server of the list that responds, e.g.
97 \fBuri "ldap://host/ ldap://backup\-host/"\fP
99 The URI list is space- or comma-separated.
100 Whenever the server that responds is not the first one in the list,
101 the list is rearranged and the responsive server is moved to the head,
102 so that it will be first contacted the next time a connection
107 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
108 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
109 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
110 .B [starttls=no|yes|critical]
113 .B [tls_cacert=<file>]
114 .B [tls_cacertdir=<path>]
115 .B [tls_reqcert=never|allow|try|demand]
116 .B [tls_ciphersuite=<ciphers>]
117 .B [tls_protocol_min=<version>]
118 .B [tls_crlcheck=none|peer|all]
120 Allows to define the parameters of the authentication method that is
121 internally used by the proxy to collect info related to access control,
122 and whenever an operation occurs with the identity of the rootdn
123 of the LDAP proxy database.
124 The identity defined by this directive, according to the properties
125 associated to the authentication method, is supposed to have read access
126 on the target server to attributes used on the proxy for ACL checking.
128 There is no risk of giving away such values; they are only used to
130 The default is to use
132 bind, with empty \fIbinddn\fP and \fIcredentials\fP,
133 which means that the related operations will be performed anonymously.
134 If not set, and if \fBidassert\-bind\fP is defined, this latter identity
135 is used instead. See \fBidassert\-bind\fP for details.
137 The connection between the proxy database and the remote server
138 associated to this identity is cached regardless of the lifespan
139 of the client-proxy connection that first established it.
141 .B This identity is not implicitly used by the proxy
142 .B when the client connects anonymously.
145 feature, instead, in some cases can be crafted to implement that behavior,
146 which is \fIintrinsically unsafe and should be used with extreme care\fP.
147 This directive obsoletes
152 The TLS settings default to the same as the main slapd TLS settings,
155 which defaults to "demand".
159 .B cancel {ABANDON|ignore|exop[\-discover]}
160 Defines how to handle operation cancellation.
163 is invoked, so the operation is abandoned immediately.
166 no action is taken and any further response is ignored; this may result
167 in further response messages to be queued for that connection, so it is
168 recommended that long lasting connections are timed out either by
172 so that resources eventually get released.
177 operation (RFC 3909) is issued, resulting in the cancellation
178 of the current operation; the
180 operation waits for remote server response, so its use
181 may not be recommended.
186 extended operation is detected by reading the remote server's root DSE.
189 .B chase\-referrals {YES|no}
190 enable/disable automatic referral chasing, which is delegated to the
191 underlying libldap, with rebinding eventually performed if the
192 \fBrebind\-as\-user\fP directive is used. The default is to chase referrals.
196 This directive causes a cached connection to be dropped and recreated
197 after a given ttl, regardless of being idle or not.
200 .B idassert\-authzFrom <authz-regexp>
201 if defined, selects what
203 identities are authorized to exploit the identity assertion feature.
206 follows the rules defined for the
213 for details on the syntax of this field.
218 .B bindmethod=none|simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
219 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
220 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
221 .B [authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
222 .B [starttls=no|yes|critical]
225 .B [tls_cacert=<file>]
226 .B [tls_cacertdir=<path>]
227 .B [tls_reqcert=never|allow|try|demand]
228 .B [tls_ciphersuite=<ciphers>]
229 .B [tls_protocol_min=<version>]
230 .B [tls_crlcheck=none|peer|all]
232 Allows to define the parameters of the authentication method that is
233 internally used by the proxy to authorize connections that are
234 authenticated by other databases.
235 Direct binds are always proxied without any idassert handling.
237 The identity defined by this directive, according to the properties
238 associated to the authentication method, is supposed to have auth access
239 on the target server to attributes used on the proxy for authentication
240 and authorization, and to be allowed to authorize the users.
241 This requires to have
243 privileges on a wide set of DNs, e.g.
244 .BR authzTo=dn.subtree:"" ,
245 and the remote server to have
253 for details on these statements and for remarks and drawbacks about
255 The supported bindmethods are
257 \fBnone|simple|sasl\fP
261 is the default, i.e. no \fIidentity assertion\fP is performed.
263 The authz parameter is used to instruct the SASL bind to exploit
265 SASL authorization, if available; since connections are cached,
266 this should only be used when authorizing with a fixed identity
267 (e.g. by means of the
272 Otherwise, the default
274 is used, i.e. the proxyAuthz control (Proxied Authorization, RFC 4370)
275 is added to all operations.
277 The supported modes are:
279 \fB<mode> := {legacy|anonymous|none|self}\fP
285 is given, the proxy always authorizes that identity.
286 .B <authorization ID>
293 The former is supposed to be expanded by the remote server according
294 to the authz rules; see
297 In the latter case, whether or not the
299 prefix is present, the string must pass DN validation and normalization.
303 which implies that the proxy will either perform a simple bind as the
305 or a SASL bind as the
307 and assert the client's identity when it is not anonymous.
308 The other modes imply that the proxy will always either perform a simple bind
311 or a SASL bind as the
314 .BR idassert\-authzFrom
315 rules (see below), in which case the operation will fail;
316 eventually, it will assert some other identity according to
318 Other identity assertion modes are
322 which respectively mean that the
329 which means that no proxyAuthz control will be used, so the
333 identity will be asserted.
334 For all modes that require the use of the
336 control, on the remote server the proxy identity must have appropriate
338 permissions, or the asserted identities must have appropriate
340 permissions. Note, however, that the ID assertion feature is mostly
341 useful when the asserted identities do not exist on the remote server.
345 \fBoverride,[non\-]prescriptive,proxy\-authz\-[non\-]critical,dn\-{authzid|whoami}\fP
349 flag is used, identity assertion takes place even when the database
350 is authorizing for the identity of the client, i.e. after binding
351 with the provided identity, and thus authenticating it, the proxy
352 performs the identity assertion using the configured identity and
353 authentication method.
357 flag is used (the default), operations fail with
358 \fIinappropriateAuthentication\fP
359 for those identities whose assertion is not allowed by the
360 .B idassert\-authzFrom
364 flag is used, operations are performed anonymously for those identities
365 whose assertion is not allowed by the
366 .B idassert\-authzFrom
370 .B proxy\-authz\-non\-critical
371 flag is used (the default), the proxyAuthz control is not marked as critical,
372 in violation of RFC 4370. Use of
373 .B proxy\-authz\-critical
378 flag is used, RFC 3829 LDAP Authorization Identity Controls
379 is used to retrieve the identity associated to the SASL identity;
382 flag is used, RFC 4532 LDAP Who am I? Operation is performed
383 after the bind for the same purpose.
385 The TLS settings default to the same as the main slapd TLS settings,
388 which defaults to "demand".
390 The identity associated to this directive is also used for privileged
391 operations whenever \fBidassert\-bind\fP is defined and \fBacl\-bind\fP
392 is not. See \fBacl\-bind\fP for details.
394 This directive obsoletes
395 .BR idassert\-authcDN ,
396 .BR idassert\-passwd ,
399 .BR idassert\-method .
403 .B idassert-passthru <authz-regexp>
404 if defined, selects what
406 identities bypass the identity assertion feature.
407 Those identities need to be known by the remote host.
410 follows the rules defined for the
417 for details on the syntax of this field.
421 .B idle\-timeout <time>
422 This directive causes a cached connection to be dropped an recreated
423 after it has been idle for the specified time.
426 .B network\-timeout <time>
427 Sets the network timeout value after which
428 .BR poll (2)/ select (2)
431 returns in case of no activity.
432 The value is in seconds, and it can be specified as for
439 do not return search reference responses.
440 By default, they are returned unless request is LDAPv2.
443 .B noundeffilter <NO|yes>
446 return success instead of searching if a filter is undefined or contains
448 By default, the search is propagated after replacing undefined portions
450 .BR (!(objectClass=*)) ,
451 which corresponds to the empty result set.
454 .B protocol\-version {0,2,3}
455 This directive indicates what protocol version must be used to contact
457 If set to 0 (the default), the proxy uses the same protocol version
458 used by the client, otherwise the requested protocol is used.
459 The proxy returns \fIunwillingToPerform\fP if an operation that is
460 incompatible with the requested protocol is attempted.
463 .B proxy\-whoami {NO|yes}
464 Turns on proxying of the WhoAmI extended operation. If this option is
465 given, back-ldap will replace slapd's original WhoAmI routine with its
466 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
467 request will be forwarded to the remote LDAP server. Other sessions will
468 be handled by the local slapd, as before. This option is mainly useful
469 in conjunction with Proxy Authorization.
472 .B quarantine <interval>,<num>[;<interval>,<num>[...]]
473 Turns on quarantine of URIs that returned
474 .IR LDAP_UNAVAILABLE ,
475 so that an attempt to reconnect only occurs at given intervals instead
476 of any time a client requests an operation.
477 The pattern is: retry only after at least
479 seconds elapsed since last attempt, for exactly
481 times; then use the next pattern.
484 for the last pattern is "\fB+\fP", it retries forever; otherwise,
485 no more retries occur.
486 The process can be restarted by resetting the \fIolcDbQuarantine\fP
487 attribute of the database entry in the configuration backend.
490 .B rebind\-as\-user {NO|yes}
491 If this option is given, the client's bind credentials are remembered
492 for rebinds, when trying to re-establish a broken connection,
493 or when chasing a referral, if
499 .B session\-tracking\-request {NO|yes}
500 Adds session tracking control for all requests.
501 The client's IP and hostname, and the identity associated to each request,
502 if known, are sent to the remote server for informational purposes.
503 This directive is incompatible with setting \fIprotocol\-version\fP to 2.
506 .B single\-conn {NO|yes}
507 Discards current cached connection when the client rebinds.
510 .B t\-f\-support {NO|yes|discover}
511 enable if the remote server supports absolute filters
512 (see \fIRFC 4526\fP for details).
515 support is detected by reading the remote server's root DSE.
518 .B timeout [<op>=]<val> [...]
519 This directive allows to set per-operation timeouts.
522 \fB<op> ::= bind, add, delete, modrdn, modify, compare, search\fP
524 The overall duration of the \fBsearch\fP operation is controlled either
525 by the \fBtimelimit\fP parameter or by server-side enforced
526 time limits (see \fBtimelimit\fP and \fBlimits\fP in
529 This \fBtimeout\fP parameter controls how long the target can be
530 irresponsive before the operation is aborted.
531 Timeout is meaningless for the remaining operations,
532 \fBunbind\fP and \fBabandon\fP, which do not imply any response,
533 while it is not yet implemented in currently supported \fBextended\fP
535 If no operation is specified, the timeout \fBval\fP affects all
536 supported operations.
538 Note: if the timelimit is exceeded, the operation is cancelled
539 (according to the \fBcancel\fP directive);
540 the protocol does not provide any means to rollback operations,
541 so the client will not be notified about the result of the operation,
542 which may eventually succeeded or not.
543 In case the timeout is exceeded during a bind operation, the connection
544 is destroyed, according to RFC4511.
546 Note: in some cases, this backend may issue binds prior
547 to other operations (e.g. to bind anonymously or with some prescribed
548 identity according to the \fBidassert\-bind\fP directive).
549 In this case, the timeout of the operation that resulted in the bind
554 .B tls {[try\-]start|[try\-]propagate|ldaps}
557 .B [tls_cacert=<file>]
558 .B [tls_cacertdir=<path>]
559 .B [tls_reqcert=never|allow|try|demand]
560 .B [tls_ciphersuite=<ciphers>]
561 .B [tls_crlcheck=none|peer|all]
563 Specify the use of TLS when a regular connection is initialized. The
564 StartTLS extended operation will be used unless the URI directive protocol
565 scheme is \fBldaps://\fP. In that case this keyword may only be
566 set to "ldaps" and the StartTLS operation will not be used.
567 \fBpropagate\fP issues the StartTLS operation only if the original
569 The \fBtry\-\fP prefix instructs the proxy to continue operations
570 if the StartTLS operation failed; its use is \fBnot\fP recommended.
572 The TLS settings default to the same as the main slapd TLS settings,
575 which defaults to "demand".
579 .B use\-temporary\-conn {NO|yes}
582 create a temporary connection whenever competing with other threads
583 for a shared one; otherwise, wait until the shared connection is available.
585 .SH BACKWARD COMPATIBILITY
586 The LDAP backend has been heavily reworked between releases 2.2 and 2.3,
587 and subsequently between 2.3 and 2.4.
588 As a side-effect, some of the traditional directives have been
589 deprecated and should be no longer used, as they might disappear
593 .B acl\-authcDN "<administrative DN for access control purposes>"
594 Formerly known as the
596 it is the DN that is used to query the target server for acl checking;
597 it is supposed to have read access on the target server to attributes used
598 on the proxy for acl checking.
599 There is no risk of giving away such values; they are only used to
602 .B The acl\-authcDN identity is by no means implicitly used by the proxy
603 .B when the client connects anonymously.
606 feature can be used (at own risk) for that purpose instead.
608 This directive is obsoleted by the
612 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
615 .B acl\-passwd <password>
616 Formerly known as the
618 it is the password used with the above
621 This directive is obsoleted by the
625 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
628 .B idassert\-authcDN "<administrative DN for proxyAuthz purposes>"
629 DN which is used to propagate the client's identity to the target
630 by means of the proxyAuthz control when the client does not
631 belong to the DIT fragment that is being proxied by back-ldap.
632 This directive is obsoleted by the
636 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
639 .B idassert\-passwd <password>
640 Password used with the
643 This directive is obsoleted by the
647 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
650 .B idassert\-mode <mode> [<flags>]
652 .I identity assertion
654 This directive is obsoleted by the
658 and will be dismissed in the future.
661 .B idassert\-method <method> [<saslargs>]
662 This directive is obsoleted by the
666 and will be dismissed in the future.
670 this directive is no longer supported. Use the
672 directive as described above.
675 .B server <hostname[:port]>
676 this directive is no longer supported. Use the
678 directive as described above.
681 .B suffixmassage, map, rewrite*
682 These directives are no longer supported by back-ldap; their
683 functionality is now delegated to the
685 overlay. Essentially, add a statement
689 first, and prefix all rewrite/map statements with
691 to obtain the original behavior.
695 .\" However, to ease update from existing configurations, back-ldap still
696 .\" recognizes them and automatically instantiates the
698 .\" overlay if available and not instantiated yet.
699 .\" This behavior may change in the future.
704 backend does not honor all ACL semantics as described in
705 .BR slapd.access (5).
706 In general, access checking is delegated to the remote server(s).
711 pseudo-attribute and to the other attribute values of the entries
714 operation is honored, which is performed by the frontend.
717 The LDAP backend provides basic proxying functionalities to many overlays.
720 overlay, described in
721 .BR slapo\-chain (5),
724 overlay, described in
725 .BR slapo\-translucent (5),
726 deserve a special mention.
728 Conversely, there are many overlays that are best used in conjunction
729 with the LDAP backend.
732 overlay allows caching of LDAP search requests (queries)
735 .BR slapo\-pcache (5)
739 overlay provides DN rewrite and attribute/objectClass mapping
740 capabilities to the underlying database.
748 default slapd configuration file
751 .BR slapd\-config (5),
753 .BR slapo\-chain (5),
754 .BR slapo\-pcache (5),
756 .BR slapo\-translucent (5),
760 Howard Chu, with enhancements by Pierangelo Masarati