1 .TH SLAPD-LDAP 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2008 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 DN 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 call 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>]
112 .B [tls_cacert=<file>]
113 .B [tls_cacertdir=<path>]
114 .B [tls_reqcert=never|allow|try|demand]
115 .B [tls_ciphersuite=<ciphers>]
116 .B [tls_crlcheck=none|peer|all]
118 Allows to define the parameters of the authentication method that is
119 internally used by the proxy to collect info related to access control,
120 and whenever an operation occurs with the identity of the rootdn
121 of the LDAP proxy database.
122 The identity defined by this directive, according to the properties
123 associated to the authentication method, is supposed to have read access
124 on the target server to attributes used on the proxy for ACL checking.
126 There is no risk of giving away such values; they are only used to
128 The default is to use
130 bind, with empty \fIbinddn\fP and \fIcredentials\fP,
131 which means that the related operations will be performed anonymously.
132 If not set, and if \fBidassert-bind\fP is defined, this latter identity
133 is used instead. See \fBidassert-bind\fP for details.
135 The connection between the proxy database and the remote server
136 associated to this identity is cached regardless of the lifespan
137 of the client-proxy connection that first established it.
139 .B This identity is by no means implicitly used by the proxy
140 .B when the client connects anonymously.
143 feature, instead, in some cases can be crafted to implement that behavior,
144 which is \fIintrinsically unsafe and should be used with extreme care\fP.
145 This directive obsoletes
150 The TLS settings default to the same as the main slapd TLS settings,
153 which defaults to "demand".
157 .B cancel {ABANDON|ignore|exop[-discover]}
158 Defines how to handle operation cancellation.
161 is invoked, so the operation is abandoned immediately.
164 no action is taken and any further response is ignored; this may result
165 in further response messages to be queued for that connection, so it is
166 recommended that long lasting connections are timed out either by
170 so that resources eventually get released.
175 operation (RFC 3909) is issued, resulting in the cancellation
176 of the current operation; the
178 operation waits for remote server response, so its use
179 may not be recommended.
184 extended operation is detected by reading the remote server's root DSE.
187 .B chase-referrals {YES|no}
188 enable/disable automatic referral chasing, which is delegated to the
189 underlying libldap, with rebinding eventually performed if the
190 \fBrebind-as-user\fP directive is used. The default is to chase referrals.
194 This directive causes a cached connection to be dropped an recreated
195 after a given ttl, regardless of being idle or not.
198 .B idassert-authzFrom <authz-regexp>
199 if defined, selects what
201 identities are authorized to exploit the identity assertion feature.
204 follows the rules defined for the
211 for details on the syntax of this field.
216 .B bindmethod=none|simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
217 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
218 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
219 .B [authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
222 .B [tls_cacert=<file>]
223 .B [tls_cacertdir=<path>]
224 .B [tls_reqcert=never|allow|try|demand]
225 .B [tls_ciphersuite=<ciphers>]
226 .B [tls_crlcheck=none|peer|all]
228 Allows to define the parameters of the authentication method that is
229 internally used by the proxy to authorize connections that are
230 authenticated by other databases.
231 The identity defined by this directive, according to the properties
232 associated to the authentication method, is supposed to have auth access
233 on the target server to attributes used on the proxy for authentication
234 and authorization, and to be allowed to authorize the users.
235 This requires to have
237 privileges on a wide set of DNs, e.g.
238 .BR authzTo=dn.subtree:"" ,
239 and the remote server to have
247 for details on these statements and for remarks and drawbacks about
249 The supported bindmethods are
251 \fBnone|simple|sasl\fP
255 is the default, i.e. no \fIidentity assertion\fP is performed.
257 The authz parameter is used to instruct the SASL bind to exploit
259 SASL authorization, if available; since connections are cached,
260 this should only be used when authorizing with a fixed identity
261 (e.g. by means of the
266 Otherwise, the default
268 is used, i.e. the proxyAuthz control (Proxied Authorization, RFC 4370)
269 is added to all operations.
271 The supported modes are:
273 \fB<mode> := {legacy|anonymous|none|self}\fP
279 is given, the proxy always authorizes that identity.
280 .B <authorization ID>
287 The former is supposed to be expanded by the remote server according
288 to the authz rules; see
291 In the latter case, whether or not the
293 prefix is present, the string must pass DN validation and normalization.
297 which implies that the proxy will either perform a simple bind as the
299 or a SASL bind as the
301 and assert the client's identity when it is not anonymous.
302 Direct binds are always proxied.
303 The other modes imply that the proxy will always either perform a simple bind
306 or a SASL bind as the
309 .BR idassert-authzFrom
310 rules (see below), in which case the operation will fail;
311 eventually, it will assert some other identity according to
313 Other identity assertion modes are
317 which respectively mean that the
324 which means that no proxyAuthz control will be used, so the
328 identity will be asserted.
329 For all modes that require the use of the
331 control, on the remote server the proxy identity must have appropriate
333 permissions, or the asserted identities must have appropriate
335 permissions. Note, however, that the ID assertion feature is mostly
336 useful when the asserted identities do not exist on the remote server.
340 \fBoverride,[non-]prescriptive\fP
344 flag is used, identity assertion takes place even when the database
345 is authorizing for the identity of the client, i.e. after binding
346 with the provided identity, and thus authenticating it, the proxy
347 performs the identity assertion using the configured identity and
348 authentication method.
352 flag is used (the default), operations fail with
353 \fIinappropriateAuthentication\fP
354 for those identities whose assertion is not allowed by the
355 .B idassert-authzFrom
359 flag is used, operations are performed anonymously for those identities
360 whose assertion is not allowed by the
361 .B idassert-authzFrom
364 The TLS settings default to the same as the main slapd TLS settings,
367 which defaults to "demand".
369 The identity associated to this directive is also used for privileged
370 operations whenever \fBidassert-bind\fP is defined and \fBacl-bind\fP
371 is not. See \fBacl-bind\fP for details.
373 This directive obsoletes
374 .BR idassert-authcDN ,
375 .BR idassert-passwd ,
378 .BR idassert-method .
382 .B idle-timeout <time>
383 This directive causes a cached connection to be dropped an recreated
384 after it has been idle for the specified time.
387 .B network-timeout <time>
388 Sets the network timeout value after which
389 .BR poll (2)/ select (2)
392 returns in case of no activity.
393 The value is in seconds, and it can be specified as for
400 do not return search reference responses.
401 By default, they are returned unless request is LDAPv2.
404 .B noundeffilter <NO|yes>
407 return success instead of searching if a filter is undefined or contains
409 By default, the search is propagated after replacing undefined portions
411 .BR (!(objectClass=*)) ,
412 which corresponds to the empty result set.
415 .B protocol\-version {0,2,3}
416 This directive indicates what protocol version must be used to contact
418 If set to 0 (the default), the proxy uses the same protocol version
419 used by the client, otherwise the requested protocol is used.
420 The proxy returns \fIunwillingToPerform\fP if an operation that is
421 incompatible with the requested protocol is attempted.
424 .B proxy\-whoami {NO|yes}
425 Turns on proxying of the WhoAmI extended operation. If this option is
426 given, back-ldap will replace slapd's original WhoAmI routine with its
427 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
428 request will be forwarded to the remote LDAP server. Other sessions will
429 be handled by the local slapd, as before. This option is mainly useful
430 in conjunction with Proxy Authorization.
433 .B quarantine <interval>,<num>[;<interval>,<num>[...]]
434 Turns on quarantine of URIs that returned
435 .IR LDAP_UNAVAILABLE ,
436 so that an attempt to reconnect only occurs at given intervals instead
437 of any time a client requests an operation.
438 The pattern is: retry only after at least
440 seconds elapsed since last attempt, for exactly
442 times; then use the next pattern.
445 for the last pattern is "\fB+\fP", it retries forever; otherwise,
446 no more retries occur.
447 The process can be restarted by resetting the \fIolcDbQuarantine\fP
448 attribute of the database entry in the configuration backend.
451 .B rebind-as-user {NO|yes}
452 If this option is given, the client's bind credentials are remembered
453 for rebinds, when trying to re-establish a broken connection,
454 or when chasing a referral, if
460 .B session\-tracking\-request {NO|yes}
461 Adds session tracking control for all requests.
462 The client's IP and hostname, and the identity associated to each request,
463 if known, are sent to the remote server for informational purposes.
464 This directive is incompatible with setting \fIprotocol\-version\fP to 2.
467 .B single\-conn {NO|yes}
468 Discards current cached connection when the client rebinds.
471 .B t-f-support {NO|yes|discover}
472 enable if the remote server supports absolute filters
473 (see \fIdraft-zeilenga-ldap-t-f\fP for details).
476 support is detected by reading the remote server's root DSE.
479 .B timeout [<op>=]<val> [...]
480 This directive allows to set per-operation timeouts.
483 \fB<op> ::= bind, add, delete, modrdn, modify, compare, search\fP
485 The overall duration of the \fBsearch\fP operation is controlled either
486 by the \fBtimelimit\fP parameter or by server-side enforced
487 time limits (see \fBtimelimit\fP and \fBlimits\fP in
490 This \fBtimeout\fP parameter controls how long the target can be
491 irresponsive before the operation is aborted.
492 Timeout is meaningless for the remaining operations,
493 \fBunbind\fP and \fBabandon\fP, which do not imply any response,
494 while it is not yet implemented in currently supported \fBextended\fP
496 If no operation is specified, the timeout \fBval\fP affects all
497 supported operations.
499 Note: if the timelimit is exceeded, the operation is cancelled
500 (according to the \fBcancel\fP directive);
501 the protocol does not provide any means to rollback operations,
502 so the client will not be notified about the result of the operation,
503 which may eventually succeeded or not.
504 In case the timeout is exceeded during a bind operation, the connection
505 is destroyed, according to RFC4511.
507 Note: in some cases, this backend may issue binds prior
508 to other operations (e.g. to bind anonymously or with some prescribed
509 identity according to the \fBidassert-bind\fP directive).
510 In this case, the timeout of the operation that resulted in the bind
515 .B tls {[try-]start|[try-]propagate|ldaps}
518 .B [tls_cacert=<file>]
519 .B [tls_cacertdir=<path>]
520 .B [tls_reqcert=never|allow|try|demand]
521 .B [tls_ciphersuite=<ciphers>]
522 .B [tls_crlcheck=none|peer|all]
524 Specify the use of TLS when a regular connection is initialized. The
525 StartTLS extended operation will be used unless the URI directive protocol
526 scheme is \fBldaps://\fP. In that case this keyword may only be
527 set to "ldaps" and the StartTLS operation will not be used.
528 \fBpropagate\fP issues the StartTLS operation only if the original
530 The \fBtry-\fP prefix instructs the proxy to continue operations
531 if the StartTLS operation failed; its use is \fBnot\fP recommended.
533 The TLS settings default to the same as the main slapd TLS settings,
536 which defaults to "demand".
540 .B use-temporary-conn {NO|yes}
543 create a temporary connection whenever competing with other threads
544 for a shared one; otherwise, wait until the shared connection is available.
546 .SH BACKWARD COMPATIBILITY
547 The LDAP backend has been heavily reworked between releases 2.2 and 2.3,
548 and subsequently between 2.3 and 2.4.
549 As a side-effect, some of the traditional directives have been
550 deprecated and should be no longer used, as they might disappear
554 .B acl-authcDN "<administrative DN for access control purposes>"
555 Formerly known as the
557 it is the DN that is used to query the target server for acl checking;
558 it is supposed to have read access on the target server to attributes used
559 on the proxy for acl checking.
560 There is no risk of giving away such values; they are only used to
563 .B The acl-authcDN identity is by no means implicitly used by the proxy
564 .B when the client connects anonymously.
567 feature can be used (at own risk) for that purpose instead.
569 This directive is obsoleted by the
573 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
576 .B acl-passwd <password>
577 Formerly known as the
579 it is the password used with the above
582 This directive is obsoleted by the
586 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
589 .B idassert-authcDN "<administrative DN for proxyAuthz purposes>"
590 DN which is used to propagate the client's identity to the target
591 by means of the proxyAuthz control when the client does not
592 belong to the DIT fragment that is being proxied by back-ldap.
593 This directive is obsoleted by the
597 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
600 .B idassert-passwd <password>
601 Password used with the
604 This directive is obsoleted by the
608 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
611 .B idassert-mode <mode> [<flags>]
613 .I identity assertion
615 This directive is obsoleted by the
619 and will be dismissed in the future.
622 .B idassert-method <method> [<saslargs>]
623 This directive is obsoleted by the
627 and will be dismissed in the future.
631 this directive is no longer supported. Use the
633 directive as described above.
636 .B server <hostname[:port]>
637 this directive is no longer supported. Use the
639 directive as described above.
642 .B suffixmassage, map, rewrite*
643 These directives are no longer supported by back-ldap; their
644 functionality is now delegated to the
646 overlay. Essentially, add a statement
650 first, and prefix all rewrite/map statements with
652 to obtain the original behavior.
656 .\" However, to ease update from existing configurations, back-ldap still
657 .\" recognizes them and automatically instantiates the
659 .\" overlay if available and not instantiated yet.
660 .\" This behavior may change in the future.
665 backend does not honor all ACL semantics as described in
666 .BR slapd.access (5).
667 In general, access checking is delegated to the remote server(s).
672 pseudo-attribute and to the other attribute values of the entries
675 operation is honored, which is performed by the frontend.
678 The LDAP backend provides basic proxying functionalities to many overlays.
681 overlay, described in
682 .BR slapo\-chain (5),
685 overlay, described in
686 .BR slapo\-translucent (5),
687 deserve a special mention.
689 Conversely, there are many overlays that are best used in conjunction
690 with the LDAP backend.
693 overlay allows caching of LDAP search requests (queries)
696 .BR slapo\-pcache (5)
700 overlay provides DN rewrite and attribute/objectClass mapping
701 capabilities to the underlying database.
709 default slapd configuration file
713 .BR slapo\-chain (5),
714 .BR slapo\-pcache (5),
716 .BR slapo\-translucent (5),
720 Howard Chu, with enhancements by Pierangelo Masarati