]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-ldap.5
Update RFC references
[openldap] / doc / man / man5 / slapd-ldap.5
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.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd-ldap \- LDAP backend to slapd
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The LDAP backend to
11 .BR slapd (8)
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.
16
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
23 connections.
24
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.
30 See the 
31 .IR idassert- *
32 rules below.
33 The administrative identity of the proxy, on the remote server, must be 
34 allowed to authorize by means of appropriate
35 .B authzTo
36 rules; see 
37 .BR slapd.conf (5)
38 for details.
39
40 .LP
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.
47
48 .SH CONFIGURATION
49 These
50 .B slapd.conf
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
55 .BR slapd.conf (5)
56 manual page.
57
58 .LP
59 Note: In early versions of back-ldap it was recommended to always set
60 .LP
61 .RS
62 .nf
63 lastmod  off
64 .fi
65 .RE
66 .LP
67 for every
68 .B ldap
69 and
70 .B meta
71 database.
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.
78
79 .TP
80 .B uri <ldapurl>
81 LDAP server to use.  Multiple URIs can be set in in a single
82 .B ldapurl
83 argument, resulting in the underlying library automatically 
84 call the first server of the list that responds, e.g. 
85
86 \fBuri "ldap://host/ ldap://backup-host/"\fP
87
88 The URI list is space- or comma-separated.
89 .\"This statement is mandatory.
90 .\".TP
91 .\".B server <hostport>
92 .\"Obsolete option; same as `uri ldap://<hostport>/'.
93 .HP
94 .hy 0
95 .B acl-bind
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>]
99 .RS
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
106 check permissions.
107 The default is to use
108 .BR simple 
109 bind, with empty \fIbinddn\fP and \fIcredentials\fP,
110 which means that the related operations will be performed anonymously.
111
112 .B This identity is by no means implicitly used by the proxy 
113 .B when the client connects anonymously.
114 The
115 .B idassert-bind
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
119 .BR acl-authcDN ,
120 and
121 .BR acl-passwd .
122 .RE
123
124 .TP
125 .B cancel {ABANDON|ignore|exop[-discover]}
126 Defines how to handle operation cancellation.
127 By default,
128 .B abandon
129 is invoked, so the operation is abandoned immediately.
130 If set to
131 .BR ignore ,
132 no action is taken and any further response is ignored; this may result
133 in further response messages to be queued for that connection, so it is
134 recommended that long lasting connections are timed out either by
135 .I idle-timeout
136 or
137 .IR conn-ttl ,
138 so that resources eventually get released.
139 If set to
140 .BR exop ,
141 a
142 .I cancel
143 operation (RFC 3909) is issued, resulting in the cancellation 
144 of the current operation; the
145 .I cancel
146 operation waits for remote server response, so its use 
147 may not be recommended.
148 If set to
149 .BR exop-discover ,
150 support of the
151 .I cancel 
152 extended operation is detected by reading the remote server's root DSE.
153
154 .TP
155 .B chase-referrals {YES|no}
156 enable/disable automatic referral chasing, which is delegated to the
157 underlying libldap, with rebinding eventually performed if the
158 \fBrebind-as-user\fP directive is used.  The default is to chase referrals.
159
160 .TP
161 .B conn-ttl <time>
162 This directive causes a cached connection to be dropped an recreated
163 after a given ttl, regardless of being idle or not.
164
165 .TP
166 .B idassert-authzFrom <authz-regexp>
167 if defined, selects what
168 .I local
169 identities are authorized to exploit the identity assertion feature.
170 The string
171 .B <authz-regexp>
172 follows the rules defined for the
173 .I authzFrom
174 attribute.
175 See 
176 .BR slapd.conf (5),
177 section related to
178 .BR authz-policy ,
179 for details on the syntax of this field.
180
181 .HP
182 .hy 0
183 .B idassert-bind
184 .B bindmethod=none|simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
185 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
186 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
187 .B [authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
188 .RS
189 Allows to define the parameters of the authentication method that is 
190 internally used by the proxy to authorize connections that are 
191 authenticated by other databases.
192 The identity defined by this directive, according to the properties
193 associated to the authentication method, is supposed to have auth access 
194 on the target server to attributes used on the proxy for authentication
195 and authorization, and to be allowed to authorize the users.
196 This requires to have
197 .B proxyAuthz
198 privileges on a wide set of DNs, e.g.
199 .BR authzTo=dn.subtree:"" ,
200 and the remote server to have
201 .B authz-policy
202 set to
203 .B to
204 or
205 .BR both .
206 See
207 .BR slapd.conf (5)
208 for details on these statements and for remarks and drawbacks about
209 their usage.
210 The supported bindmethods are
211
212 \fBnone|simple|sasl\fP
213
214 where
215 .B none
216 is the default, i.e. no \fIidentity assertion\fP is performed.
217
218 The authz parameter is used to instruct the SASL bind to exploit 
219 .B native 
220 SASL authorization, if available; since connections are cached,
221 this should only be used when authorizing with a fixed identity
222 (e.g. by means of the 
223 .B authzDN
224 or
225 .B authzID
226 parameters).
227 Otherwise, the default
228 .B proxyauthz
229 is used, i.e. the proxyAuthz control is added to all operations.
230
231 The supported modes are:
232
233 \fB<mode> := {legacy|anonymous|none|self}\fP
234
235 If 
236 .B <mode>
237 is not present, and 
238 .B authzId
239 is given, the proxy always authorizes that identity.
240 .B <authorization ID>
241 can be 
242
243 \fBu:<user>\fP
244
245 \fB[dn:]<DN>\fP
246
247 The former is supposed to be expanded by the remote server according 
248 to the authz rules; see
249 .BR slapd.conf (5)
250 for details.
251 In the latter case, whether or not the 
252 .B dn:
253 prefix is present, the string must pass DN validation and normalization.
254
255 The default mode is 
256 .BR legacy ,
257 which implies that the proxy will either perform a simple bind as the
258 .I authcDN
259 or a SASL bind as the
260 .I authcID
261 and assert the client's identity when it is not anonymous.
262 Direct binds are always proxied.
263 The other modes imply that the proxy will always either perform a simple bind 
264 as the
265 .IR authcDN
266 or a SASL bind as the
267 .IR authcID ,
268 unless restricted by
269 .BR idassert-authzFrom
270 rules (see below), in which case the operation will fail;
271 eventually, it will assert some other identity according to
272 .BR <mode> .
273 Other identity assertion modes are
274 .BR anonymous
275 and
276 .BR self ,
277 which respectively mean that the 
278 .I empty 
279 or the 
280 .IR client 's 
281 identity
282 will be asserted;
283 .BR none ,
284 which means that no proxyAuthz control will be used, so the
285 .I authcDN
286 or the
287 .I authcID
288 identity will be asserted.
289 For all modes that require the use of the
290 .I proxyAuthz 
291 control, on the remote server the proxy identity must have appropriate 
292 .I authzTo
293 permissions, or the asserted identities must have appropriate
294 .I authzFrom 
295 permissions.  Note, however, that the ID assertion feature is mostly 
296 useful when the asserted identities do not exist on the remote server.
297
298 Flags can be
299
300 \fBoverride,{prescriptive|non-prescriptive}\fP
301
302 When the 
303 .B override
304 flag is used, identity assertion takes place even when the database
305 is authorizing for the identity of the client, i.e. after binding
306 with the provided identity, and thus authenticating it, the proxy
307 performs the identity assertion using the configured identity and
308 authentication method.
309
310 When the
311 .B prescriptive
312 flag is used (the default), operations fail with
313 \fIinappropriateAuthentication\fP
314 for those identities whose assertion is not allowed by the
315 .B idassert-authzFrom
316 patterns.
317 If the 
318 .B non-prescriptive
319 flag is used, operations are performed anonymously for those identities 
320 whose assertion is not allowed by the
321 .B idassert-authzFrom
322 patterns.
323
324 This directive obsoletes
325 .BR idassert-authcDN ,
326 .BR idassert-passwd ,
327 .BR idassert-mode ,
328 and
329 .BR idassert-method .
330 .RE
331
332 .TP
333 .B idle-timeout <time>
334 This directive causes a cached connection to be dropped an recreated
335 after it has been idle for the specified time.
336
337 .TP
338 .B protocol\-version {0,2,3}
339 This directive indicates what protocol version must be used to contact
340 the remote server.
341 If set to 0 (the default), the proxy uses the same protocol version 
342 used by the client, otherwise the requested protocol is used.
343 The proxy returns \fIunwillingToPerform\fP if an operation that is 
344 incompatible with the requested protocol is attempted.
345
346 .TP
347 .B proxy\-whoami {NO|yes}
348 Turns on proxying of the WhoAmI extended operation. If this option is
349 given, back-ldap will replace slapd's original WhoAmI routine with its
350 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
351 request will be forwarded to the remote LDAP server. Other sessions will
352 be handled by the local slapd, as before. This option is mainly useful
353 in conjunction with Proxy Authorization.
354
355 .TP
356 .B quarantine <interval>,<num>[;<interval>,<num>[...]]
357 Turns on quarantine of URIs that returned
358 .IR LDAP_UNAVAILABLE ,
359 so that an attempt to reconnect only occurs at given intervals instead
360 of any time a client requests an operation.
361 The pattern is: retry only after at least
362 .I interval
363 seconds elapsed since last attempt, for exactly
364 .I num
365 times; then use the next pattern.
366 If
367 .I num
368 for the last pattern is "\fB+\fP", it retries forever; otherwise, 
369 no more retries occur.
370 The process can be restarted by resetting the \fIolcDbQuarantine\fP
371 attribute of the database entry in the configuration backend.
372
373 .TP
374 .B rebind-as-user {NO|yes}
375 If this option is given, the client's bind credentials are remembered
376 for rebinds when chasing referrals.  Useful when
377 \fBchase-referrals\fP is set to \fByes\fP, useless otherwise.
378
379 .TP
380 .B single\-conn {NO|yes}
381 Discards current cached connection when the client rebinds.
382
383 .TP
384 .B t-f-support {NO|yes|discover}
385 enable if the remote server supports absolute filters
386 (see \fIdraft-zeilenga-ldap-t-f\fP for details).
387 If set to
388 .BR discover ,
389 support is detected by reading the remote server's root DSE.
390
391 .TP
392 .B timeout [{add|delete|modify|modrdn}=]<val> [...]
393 This directive allows to set per-operation timeouts.
394 If no operation is specified, it affects all.
395 Currently, only write operations are addressed, because searches
396 can already be limited by means of the
397 .B limits
398 directive (see 
399 .BR slapd.conf (5)
400 for details), and other operations are not supposed to incur into the
401 need for timeouts.
402 Note: if the timelimit is exceeded, the operation is abandoned;
403 the protocol does not provide any means to rollback the operation,
404 so the client will not know if the operation eventually succeeded or not.
405
406 .TP
407 .B tls {[try-]start|[try-]propagate}
408 execute the StartTLS extended operation when the connection is initialized;
409 only works if the URI directive protocol scheme is not \fBldaps://\fP.
410 \fBpropagate\fP issues the StartTLS operation only if the original
411 connection did.
412 The \fBtry-\fP prefix instructs the proxy to continue operations
413 if the StartTLS operation failed; its use is highly deprecated.
414
415 .SH BACKWARD COMPATIBILITY
416 The LDAP backend has been heavily reworked between releases 2.2 and 2.3;
417 as a side-effect, some of the traditional directives have been
418 deprecated and should be no longer used, as they might disappear
419 in future releases.
420
421 .TP
422 .B acl-authcDN "<administrative DN for access control purposes>"
423 DN which is used to query the target server for acl checking; it
424 is supposed to have read access on the target server to attributes used
425 on the proxy for acl checking.
426 There is no risk of giving away such values; they are only used to
427 check permissions.
428 .B The acl-authcDN identity is by no means implicitly used by the proxy 
429 .B when the client connects anonymously.
430 See the
431 .B idassert-*
432 feature instead.
433 This directive is obsoleted by the
434 .B binddn
435 arg of
436 .B acl-bind
437 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
438
439 .TP
440 .B acl-passwd <password>
441 Password used with the above
442 .B acl-authcDN
443 directive.
444 This directive is obsoleted by the
445 .B binddn
446 arg of
447 .B acl-bind
448 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
449
450 .TP
451 .B idassert-authcDN "<administrative DN for proxyAuthz purposes>"
452 DN which is used to propagate the client's identity to the target
453 by means of the proxyAuthz control when the client does not
454 belong to the DIT fragment that is being proxied by back-ldap.
455 This directive is obsoleted by the
456 .B binddn
457 arg of
458 .BR idassert-bind
459 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
460
461 .TP
462 .B idassert-passwd <password>
463 Password used with the
464 .B idassert-authcDN
465 above.
466 This directive is obsoleted by the
467 .B crendentials
468 of
469 .B idassert-bind
470 when \fIbindmethod\fP=\fBsimple\fP, and will be dismissed in the future.
471
472 .TP
473 .B idassert-mode <mode> [<flags>]
474 defines what type of
475 .I identity assertion
476 is used.
477 This directive is obsoleted by the
478 .B mode
479 arg of 
480 .BR idassert-bind ,
481 and will be dismissed in the future.
482
483 .TP
484 .B idassert-method <method> [<saslargs>]
485 This directive is obsoleted by the
486 .B bindmethod
487 arg of
488 .BR idassert-bind ,
489 and will be dismissed in the future.
490
491 .TP
492 .B server <hostname[:port]>
493 this directive is no longer supported.  Use the 
494 .B uri
495 directive as described above.
496
497 .TP
498 .B suffixmassage, map, rewrite*
499 These directives are no longer supported by back-ldap; their 
500 functionality is now delegated to the
501 .B rwm
502 overlay.  Essentially, add a statement
503
504 .B overlay rwm
505
506 first, and prefix all rewrite/map statements with
507 .B rwm-
508 to obtain the original behavior.
509 See
510 .BR slapo-rwm (5)
511 for details.
512 .\" However, to ease update from existing configurations, back-ldap still 
513 .\" recognizes them and automatically instantiates the
514 .\" .B rwm
515 .\" overlay if available and not instantiated yet.
516 .\" This behavior may change in the future.
517
518 .SH ACCESS CONTROL
519 The
520 .B ldap
521 backend does not honor all ACL semantics as described in
522 .BR slapd.access (5).
523 In general, access checking is delegated to the remote server(s).
524 Only
525 .B read (=r)
526 access to the
527 .B entry
528 pseudo-attribute and to the other attribute values of the entries
529 returned by the
530 .B search
531 operation is honored, which is performed by the frontend.
532
533 .SH OVERLAYS
534 The LDAP backend provides basic proxying functionalities to many overlays.
535 The 
536 .B chain
537 overlay, described in
538 .BR slapo\-chain (5),
539 and the
540 .B translucent
541 overlay, described in
542 .BR slapo\-translucent (5),
543 deserve a special mention.
544
545 Conversely, there are many overlays that are best used in conjunction
546 with the LDAP backend.
547 The
548 .B proxycache 
549 overlay allows caching of LDAP search requests (queries) 
550 in a local database.
551 See 
552 .BR slapo\-pcache (5)
553 for details.
554 The
555 .B rwm
556 overlay provides DN rewrite and attribute/objectClass mapping
557 capabilities to the underlying database.
558 See 
559 .BR slapo\-rwm (5)
560 for details.
561
562 .SH FILES
563 .TP
564 ETCDIR/slapd.conf
565 default slapd configuration file
566 .SH SEE ALSO
567 .BR slapd.conf (5),
568 .BR slapd\-meta (5),
569 .BR slapo\-chain (5),
570 .BR slapo\-pcache (5),
571 .BR slapo\-rwm (5),
572 .BR slapo\-translucent (5),
573 .BR slapd (8),
574 .BR ldap (3).
575 .SH AUTHOR
576 Howard Chu, with enhancements by Pierangelo Masarati