1 .TH SLAPD-LDAP 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2006 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
41 Note: When looping back to the same instance of \fBslapd\fP(8),
42 each connection requires a new thread; as a consequence, \fBslapd\fP(8)
43 must be compiled with thread support, and the \fBthreads\fP parameter
44 may need some tuning; in those cases, one may consider using
45 \fBslapd-relay\fP(5) instead, which performs the relayed operation
46 internally and thus reuses the same connection.
51 options apply to the LDAP backend database.
52 That is, they must follow a "database ldap" line and come before any
53 subsequent "backend" or "database" lines.
54 Other database options are described in the
59 Note: In early versions of back-ldap it was recommended to always set
72 This was required because operational attributes related to entry creation
73 and modification should not be proxied, as they could be mistakenly written
74 to the target server(s), generating an error.
75 The current implementation automatically sets lastmod to \fBoff\fP,
76 so its use is redundant and should be omitted.
80 LDAP server to use. Multiple URIs can be set in a single
82 argument, resulting in the underlying library automatically
83 call the first server of the list that responds, e.g.
85 \fBuri "ldap://host/ ldap://backup-host/"\fP
87 The URI list is space- or comma-separated.
88 Whenever the server that responds is not the first one in the list,
89 the list is rearranged and the responsive server is moved to the head,
90 so that it will be first contacted the next time a connection
95 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
96 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
97 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
99 Allows to define the parameters of the authentication method that is
100 internally used by the proxy to collect info related to access control,
101 and whenever an operation occurs with the identity of the rootdn
102 of the LDAP proxy database.
103 The identity defined by this directive, according to the properties
104 associated to the authentication method, is supposed to have read access
105 on the target server to attributes used on the proxy for ACL checking.
107 There is no risk of giving away such values; they are only used to
109 The default is to use
111 bind, with empty \fIbinddn\fP and \fIcredentials\fP,
112 which means that the related operations will be performed anonymously.
113 If not set, and if \fBidassert-bind\fP is defined, this latter identity
114 is used instead. See \fBidassert-bind\fP for details.
116 The connection between the proxy database and the remote server
117 associated to this identity is cached regardless of the lifespan
118 of the client-proxy connection that first established it.
120 .B This identity is by no means implicitly used by the proxy
121 .B when the client connects anonymously.
124 feature, instead, in some cases can be crafted to implement that behavior,
125 which is \fIintrinsically unsafe and should be used with extreme care\fP.
126 This directive obsoletes
133 .B cancel {ABANDON|ignore|exop[-discover]}
134 Defines how to handle operation cancellation.
137 is invoked, so the operation is abandoned immediately.
140 no action is taken and any further response is ignored; this may result
141 in further response messages to be queued for that connection, so it is
142 recommended that long lasting connections are timed out either by
146 so that resources eventually get released.
151 operation (RFC 3909) is issued, resulting in the cancellation
152 of the current operation; the
154 operation waits for remote server response, so its use
155 may not be recommended.
160 extended operation is detected by reading the remote server's root DSE.
163 .B chase-referrals {YES|no}
164 enable/disable automatic referral chasing, which is delegated to the
165 underlying libldap, with rebinding eventually performed if the
166 \fBrebind-as-user\fP directive is used. The default is to chase referrals.
170 This directive causes a cached connection to be dropped an recreated
171 after a given ttl, regardless of being idle or not.
174 .B idassert-authzFrom <authz-regexp>
175 if defined, selects what
177 identities are authorized to exploit the identity assertion feature.
180 follows the rules defined for the
187 for details on the syntax of this field.
192 .B bindmethod=none|simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
193 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
194 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
195 .B [authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
197 Allows to define the parameters of the authentication method that is
198 internally used by the proxy to authorize connections that are
199 authenticated by other databases.
200 The identity defined by this directive, according to the properties
201 associated to the authentication method, is supposed to have auth access
202 on the target server to attributes used on the proxy for authentication
203 and authorization, and to be allowed to authorize the users.
204 This requires to have
206 privileges on a wide set of DNs, e.g.
207 .BR authzTo=dn.subtree:"" ,
208 and the remote server to have
216 for details on these statements and for remarks and drawbacks about
218 The supported bindmethods are
220 \fBnone|simple|sasl\fP
224 is the default, i.e. no \fIidentity assertion\fP is performed.
226 The authz parameter is used to instruct the SASL bind to exploit
228 SASL authorization, if available; since connections are cached,
229 this should only be used when authorizing with a fixed identity
230 (e.g. by means of the
235 Otherwise, the default
237 is used, i.e. the proxyAuthz control (Proxied Authorization, RFC 4370)
238 is added to all operations.
240 The supported modes are:
242 \fB<mode> := {legacy|anonymous|none|self}\fP
248 is given, the proxy always authorizes that identity.
249 .B <authorization ID>
256 The former is supposed to be expanded by the remote server according
257 to the authz rules; see
260 In the latter case, whether or not the
262 prefix is present, the string must pass DN validation and normalization.
266 which implies that the proxy will either perform a simple bind as the
268 or a SASL bind as the
270 and assert the client's identity when it is not anonymous.
271 Direct binds are always proxied.
272 The other modes imply that the proxy will always either perform a simple bind
275 or a SASL bind as the
278 .BR idassert-authzFrom
279 rules (see below), in which case the operation will fail;
280 eventually, it will assert some other identity according to
282 Other identity assertion modes are
286 which respectively mean that the
293 which means that no proxyAuthz control will be used, so the
297 identity will be asserted.
298 For all modes that require the use of the
300 control, on the remote server the proxy identity must have appropriate
302 permissions, or the asserted identities must have appropriate
304 permissions. Note, however, that the ID assertion feature is mostly
305 useful when the asserted identities do not exist on the remote server.
309 \fBoverride,[non-]prescriptive\fP
313 flag is used, identity assertion takes place even when the database
314 is authorizing for the identity of the client, i.e. after binding
315 with the provided identity, and thus authenticating it, the proxy
316 performs the identity assertion using the configured identity and
317 authentication method.
321 flag is used (the default), operations fail with
322 \fIinappropriateAuthentication\fP
323 for those identities whose assertion is not allowed by the
324 .B idassert-authzFrom
328 flag is used, operations are performed anonymously for those identities
329 whose assertion is not allowed by the
330 .B idassert-authzFrom
333 The identity associated to this directive is also used for privileged
334 operations whenever \fBidassert-bind\fP is defined and \fBacl-bind\fP
335 is not. See \fBacl-bind\fP for details.
337 This directive obsoletes
338 .BR idassert-authcDN ,
339 .BR idassert-passwd ,
342 .BR idassert-method .
346 .B idle-timeout <time>
347 This directive causes a cached connection to be dropped an recreated
348 after it has been idle for the specified time.
351 .B protocol\-version {0,2,3}
352 This directive indicates what protocol version must be used to contact
354 If set to 0 (the default), the proxy uses the same protocol version
355 used by the client, otherwise the requested protocol is used.
356 The proxy returns \fIunwillingToPerform\fP if an operation that is
357 incompatible with the requested protocol is attempted.
360 .B proxy\-whoami {NO|yes}
361 Turns on proxying of the WhoAmI extended operation. If this option is
362 given, back-ldap will replace slapd's original WhoAmI routine with its
363 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
364 request will be forwarded to the remote LDAP server. Other sessions will
365 be handled by the local slapd, as before. This option is mainly useful
366 in conjunction with Proxy Authorization.
369 .B quarantine <interval>,<num>[;<interval>,<num>[...]]
370 Turns on quarantine of URIs that returned
371 .IR LDAP_UNAVAILABLE ,
372 so that an attempt to reconnect only occurs at given intervals instead
373 of any time a client requests an operation.
374 The pattern is: retry only after at least
376 seconds elapsed since last attempt, for exactly
378 times; then use the next pattern.
381 for the last pattern is "\fB+\fP", it retries forever; otherwise,
382 no more retries occur.
383 The process can be restarted by resetting the \fIolcDbQuarantine\fP
384 attribute of the database entry in the configuration backend.
387 .B rebind-as-user {NO|yes}
388 If this option is given, the client's bind credentials are remembered
389 for rebinds when chasing referrals. Useful when
390 \fBchase-referrals\fP is set to \fByes\fP, useless otherwise.
393 .B single\-conn {NO|yes}
394 Discards current cached connection when the client rebinds.
397 .B t-f-support {NO|yes|discover}
398 enable if the remote server supports absolute filters
399 (see \fIdraft-zeilenga-ldap-t-f\fP for details).
402 support is detected by reading the remote server's root DSE.
405 .B timeout [<op>=]<val> [...]
406 This directive allows to set per-operation timeouts.
409 \fB<op> ::= bind, add, delete, modrdn, modify, compare\fP
411 The \fBsearch\fP operation is already controlled either
412 by the \fBtimelimit\fP parameter or by server-side enforced
413 time limits (see \fBtimelimit\fP and \fBlimits\fP in
416 Timeout is meaningless for the remaining operations,
417 \fBunbind\fP and \fBabandon\fP, which do not imply any response,
418 while it is not yet implemented in currently supported \fBextended\fP
420 If no operation is specified, the timeout \fBval\fP affects all
421 supported operations.
423 Note: if the timelimit is exceeded, the operation is cancelled
424 (according to the \fBcancel\fP directive);
425 the protocol does not provide any means to rollback operations,
426 so the client will not be notified about the result of the operation,
427 which may eventually succeeded or not.
428 In case the timeout is exceeded during a bind operation, the connection
429 is destroyed, according to RFC4511.
431 Note: in some cases, this backend may issue binds prior
432 to other operations (e.g. to bind anonymously or with some prescribed
433 identity according to the \fBidassert-bind\fP directive).
434 In this case, the timeout of the operation that resulted in the bind
438 .B tls {[try-]start|[try-]propagate}
439 execute the StartTLS extended operation when the connection is initialized;
440 only works if the URI directive protocol scheme is not \fBldaps://\fP.
441 \fBpropagate\fP issues the StartTLS operation only if the original
443 The \fBtry-\fP prefix instructs the proxy to continue operations
444 if the StartTLS operation failed; its use is \fBnot\fP recommended.
446 .SH BACKWARD COMPATIBILITY
447 The LDAP backend has been heavily reworked between releases 2.2 and 2.3,
448 and subsequently between 2.3 and 2.4.
449 As a side-effect, some of the traditional directives have been
450 deprecated and should be no longer used, as they might disappear
454 .B acl-authcDN "<administrative DN for access control purposes>"
455 Formerly known as the
457 it is the DN that is used to query the target server for acl checking;
458 it is supposed to have read access on the target server to attributes used
459 on the proxy for acl checking.
460 There is no risk of giving away such values; they are only used to
463 .B The acl-authcDN identity is by no means implicitly used by the proxy
464 .B when the client connects anonymously.
467 feature can be used (at own risk) for that purpose instead.
469 This directive is obsoleted by the
473 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
476 .B acl-passwd <password>
477 Formerly known as the
479 it is the password used with the above
482 This directive is obsoleted by the
486 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
489 .B idassert-authcDN "<administrative DN for proxyAuthz purposes>"
490 DN which is used to propagate the client's identity to the target
491 by means of the proxyAuthz control when the client does not
492 belong to the DIT fragment that is being proxied by back-ldap.
493 This directive is obsoleted by the
497 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
500 .B idassert-passwd <password>
501 Password used with the
504 This directive is obsoleted by the
508 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
511 .B idassert-mode <mode> [<flags>]
513 .I identity assertion
515 This directive is obsoleted by the
519 and will be dismissed in the future.
522 .B idassert-method <method> [<saslargs>]
523 This directive is obsoleted by the
527 and will be dismissed in the future.
531 this directive is no longer supported. Use the
533 directive as described above.
536 .B server <hostname[:port]>
537 this directive is no longer supported. Use the
539 directive as described above.
542 .B suffixmassage, map, rewrite*
543 These directives are no longer supported by back-ldap; their
544 functionality is now delegated to the
546 overlay. Essentially, add a statement
550 first, and prefix all rewrite/map statements with
552 to obtain the original behavior.
556 .\" However, to ease update from existing configurations, back-ldap still
557 .\" recognizes them and automatically instantiates the
559 .\" overlay if available and not instantiated yet.
560 .\" This behavior may change in the future.
565 backend does not honor all ACL semantics as described in
566 .BR slapd.access (5).
567 In general, access checking is delegated to the remote server(s).
572 pseudo-attribute and to the other attribute values of the entries
575 operation is honored, which is performed by the frontend.
578 The LDAP backend provides basic proxying functionalities to many overlays.
581 overlay, described in
582 .BR slapo\-chain (5),
585 overlay, described in
586 .BR slapo\-translucent (5),
587 deserve a special mention.
589 Conversely, there are many overlays that are best used in conjunction
590 with the LDAP backend.
593 overlay allows caching of LDAP search requests (queries)
596 .BR slapo\-pcache (5)
600 overlay provides DN rewrite and attribute/objectClass mapping
601 capabilities to the underlying database.
609 default slapd configuration file
613 .BR slapo\-chain (5),
614 .BR slapo\-pcache (5),
616 .BR slapo\-translucent (5),
620 Howard Chu, with enhancements by Pierangelo Masarati