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 is because operational attributes related to entry creation and
73 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 off, so its use
76 is redundant and should be omitted, because the lastmod directive will
77 be deprecated in the future.
81 LDAP server to use. Multiple URIs can be set in in a single
83 argument, resulting in the underlying library automatically
84 call the first server of the list that responds, e.g.
86 \fBuri "ldap://host/ ldap://backup-host/"\fP
88 The URI list is space- or comma-separated.
89 .\"This statement is mandatory.
91 .\".B server <hostport>
92 .\"Obsolete option; same as `uri ldap://<hostport>/'.
96 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
97 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
98 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
100 Allows to define the parameters of the authentication method that is
101 internally used by the proxy to collect info related to access control.
102 The identity defined by this directive, according to the properties
103 associated to the authentication method, is supposed to have read access
104 on the target server to attributes used on the proxy for ACL checking.
105 There is no risk of giving away such values; they are only used to
107 The default is to use
109 bind, with empty \fIbinddn\fP and \fIcredentials\fP,
110 which means that the related operations will be performed anonymously.
112 .B This identity is by no means implicitly used by the proxy
113 .B when the client connects anonymously.
116 feature, instead, in some cases can be crafted to implement that behavior,
117 which is \fIintrinsically unsafe and should be used with extreme care\fP.
118 This directive obsoletes
125 .B chase-referrals {YES|no}
126 enable/disable automatic referral chasing, which is delegated to the
127 underlying libldap, with rebinding eventually performed if the
128 \fBrebind-as-user\fP directive is used. The default is to chase referrals.
132 This directive causes a cached connection to be dropped an recreated
133 after a given ttl, regardless of being idle or not.
136 .B idassert-authzFrom <authz-regexp>
137 if defined, selects what
139 identities are authorized to exploit the identity assertion feature.
142 follows the rules defined for the
149 for details on the syntax of this field.
154 .B bindmethod=none|simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
155 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
156 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
157 .B [authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
159 Allows to define the parameters of the authentication method that is
160 internally used by the proxy to authorize connections that are
161 authenticated by other databases.
162 The identity defined by this directive, according to the properties
163 associated to the authentication method, is supposed to have auth access
164 on the target server to attributes used on the proxy for authentication
165 and authorization, and to be allowed to authorize the users.
166 This requires to have
168 privileges on a wide set of DNs, e.g.
169 .BR authzTo=dn.subtree:"" ,
170 and the remote server to have
178 for details on these statements and for remarks and drawbacks about
180 The supported bindmethods are
182 \fBnone|simple|sasl\fP
186 is the default, i.e. no \fIidentity assertion\fP is performed.
188 The authz parameter is used to instruct the SASL bind to exploit
190 SASL authorization, if available; since connections are cached,
191 this should only be used when authorizing with a fixed identity
192 (e.g. by means of the
197 Otherwise, the default
199 is used, i.e. the proxyAuthz control is added to all operations.
201 The supported modes are:
203 \fB<mode> := {legacy|anonymous|none|self}\fP
209 is given, the proxy always authorizes that identity.
210 .B <authorization ID>
217 The former is supposed to be expanded by the remote server according
218 to the authz rules; see
221 In the latter case, whether or not the
223 prefix is present, the string must pass DN validation and normalization.
227 which implies that the proxy will either perform a simple bind as the
229 or a SASL bind as the
231 and assert the client's identity when it is not anonymous.
232 Direct binds are always proxied.
233 The other modes imply that the proxy will always either perform a simple bind
236 or a SASL bind as the
239 .BR idassert-authzFrom
240 rules (see below), in which case the operation will fail;
241 eventually, it will assert some other identity according to
243 Other identity assertion modes are
247 which respectively mean that the
254 which means that no proxyAuthz control will be used, so the
258 identity will be asserted.
259 For all modes that require the use of the
261 control, on the remote server the proxy identity must have appropriate
263 permissions, or the asserted identities must have appropriate
265 permissions. Note, however, that the ID assertion feature is mostly
266 useful when the asserted identities do not exist on the remote server.
270 \fBoverride,{prescriptive|non-prescriptive}\fP
274 flag is used, identity assertion takes place even when the database
275 is authorizing for the identity of the client, i.e. after binding
276 with the provided identity, and thus authenticating it, the proxy
277 performs the identity assertion using the configured identity and
278 authentication method.
282 flag is used (the default), operations fail with
283 \fIinappropriateAuthentication\fP
284 for those identities whose assertion is not allowed by the
285 .B idassert-authzFrom
289 flag is used, operations are performed anonymously for those identities
290 whose assertion is not allowed by the
291 .B idassert-authzFrom
294 This directive obsoletes
295 .BR idassert-authcDN ,
296 .BR idassert-passwd ,
299 .BR idassert-method .
303 .B idle-timeout <time>
304 This directive causes a cached connection to be dropped an recreated
305 after it has been idle for the specified time.
308 .B protocol\-version {0,2,3}
309 This directive indicates what protocol version must be used to contact
311 If set to 0 (the default), the proxy uses the same protocol version
312 used by the client, otherwise the requested protocol is used.
313 The proxy returns \fIunwillingToPerform\fP if an operation that is
314 incompatible with the requested protocol is attempted.
317 .B proxy\-whoami {NO|yes}
318 Turns on proxying of the WhoAmI extended operation. If this option is
319 given, back-ldap will replace slapd's original WhoAmI routine with its
320 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
321 request will be forwarded to the remote LDAP server. Other sessions will
322 be handled by the local slapd, as before. This option is mainly useful
323 in conjunction with Proxy Authorization.
326 .B rebind-as-user {NO|yes}
327 If this option is given, the client's bind credentials are remembered
328 for rebinds when chasing referrals. Useful when
329 \fBchase-referrals\fP is set to \fByes\fP, useless otherwise.
332 .B t-f-support {NO|yes|discover}
333 enable if the remote server supports absolute filters
334 (see \fIdraft-zeilenga-ldap-t-f\fP for details).
337 support is detected by reading the remote server's root DSE.
340 .B timeout [{add|delete|modify|modrdn}=]<val> [...]
341 This directive allows to set per-operation timeouts.
342 If no operation is specified, it affects all.
343 Currently, only write operations are addressed, because searches
344 can already be limited by means of the
348 for details), and other operations are not supposed to incur into the
350 Note: if the timelimit is exceeded, the operation is abandoned;
351 the protocol does not provide any means to rollback the operation,
352 so the client will not know if the operation eventually succeeded or not.
355 .B tls {[try-]start|[try-]propagate}
356 execute the StartTLS extended operation when the connection is initialized;
357 only works if the URI directive protocol scheme is not \fBldaps://\fP.
358 \fBpropagate\fP issues the StartTLS operation only if the original
360 The \fBtry-\fP prefix instructs the proxy to continue operations
361 if the StartTLS operation failed; its use is highly deprecated.
363 .SH BACKWARD COMPATIBILITY
364 The LDAP backend has been heavily reworked between releases 2.2 and 2.3;
365 as a side-effect, some of the traditional directives have been
366 deprecated and should be no longer used, as they might disappear
370 .B server <hostname[:port]>
371 this directive is no longer supported. Use the
373 directive as described above.
376 .B acl-authcDN "<administrative DN for access control purposes>"
377 DN which is used to query the target server for acl checking; it
378 is supposed to have read access on the target server to attributes used
379 on the proxy for acl checking.
380 There is no risk of giving away such values; they are only used to
382 .B The acl-authcDN identity is by no means implicitly used by the proxy
383 .B when the client connects anonymously.
387 This directive is obsoleted by the
391 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
394 .B acl-passwd <password>
395 Password used with the above
398 This directive is obsoleted by the
402 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
405 .B idassert-authcDN "<administrative DN for proxyAuthz purposes>"
406 DN which is used to propagate the client's identity to the target
407 by means of the proxyAuthz control when the client does not
408 belong to the DIT fragment that is being proxied by back-ldap.
409 This directive is obsoleted by the
413 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
416 .B idassert-passwd <password>
417 Password used with the
420 This directive is obsoleted by the
424 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
427 .B idassert-mode <mode> [<flags>]
429 .I identity assertion
431 This directive is obsoleted by the
435 and will be dismissed in the future.
438 .B idassert-method <method> [<saslargs>]
439 This directive is obsoleted by the
443 and will be dismissed in the future.
446 .B suffixmassage, map, rewrite*
447 These directives are no longer supported by back-ldap; their
448 functionality is now delegated to the
450 overlay. Essentially, add a statement
454 first, and prefix all rewrite/map statements with
456 to obtain the original behavior.
460 .\" However, to ease update from existing configurations, back-ldap still
461 .\" recognizes them and automatically instantiates the
463 .\" overlay if available and not instantiated yet.
464 .\" This behavior may change in the future.
469 backend does not honor all ACL semantics as described in
470 .BR slapd.access (5).
471 In general, access checking is delegated to the remote server(s).
476 pseudo-attribute and to the other attribute values of the entries
479 operation is honored, which is performed by the frontend.
482 The LDAP backend provides basic proxying functionalities to many overlays.
485 overlay, described in
486 .BR slapo\-chain (5),
489 overlay, described in
490 .BR slapo\-translucent (5),
491 deserve a special mention.
493 Conversely, there are many overlays that are best used in conjunction
494 with the LDAP backend.
497 overlay allows caching of LDAP search requests (queries)
500 .BR slapo\-pcache (5)
504 overlay provides DN rewrite and attribute/objectClass mapping
505 capabilities to the underlying database.
513 default slapd configuration file
517 .BR slapo\-chain (5),
518 .BR slapo\-pcache (5),
520 .BR slapo\-translucent (5),
524 Howard Chu, with enhancements by Pierangelo Masarati