]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-ldap.5
StartTLS cleanup
[openldap] / doc / man / man5 / slapd-ldap.5
1 .TH SLAPD-LDAP 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2005 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 .SH CONFIGURATION
41 These
42 .B slapd.conf
43 options apply to the LDAP backend database.
44 That is, they must follow a "database ldap" line and come before any
45 subsequent "backend" or "database" lines.
46 Other database options are described in the
47 .BR slapd.conf (5)
48 manual page.
49 .LP
50 Note: In early versions of back-ldap it was recommended to always set
51 .LP
52 .RS
53 .nf
54 lastmod  off
55 .fi
56 .RE
57 .LP
58 for every
59 .B ldap
60 and
61 .B meta
62 database.
63 This is because operational attributes related to entry creation and
64 modification should not be proxied, as they could be mistakenly written
65 to the target server(s), generating an error.
66 The current implementation automatically sets lastmod to off, so its use
67 is redundant and should be omitted, because the lastmod directive will
68 be deprecated in the future.
69
70 .TP
71 .B uri <ldapurl>
72 LDAP server to use.  Multiple URIs can be set in in a single
73 .B ldapurl
74 argument, resulting in the underlying library automatically 
75 call the first server of the list that responds, e.g. 
76
77 \fBuri "ldap://host/ ldap://backup-host"\fP
78
79 The URI list is space- or comma-separated.
80 This statement is mandatory.
81 .\".TP
82 .\".B server <hostport>
83 .\"Obsolete option; same as `uri ldap://<hostport>/'.
84 .HP
85 .hy 0
86 .B acl-bind
87 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
88 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
89 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
90 .RS
91 Allows to define the parameters of the authentication method that is 
92 internally used by the proxy to collect info related to access control.
93 The identity defined by this directive, according to the properties
94 associated to the authentication method, is supposed to have read access 
95 on the target server to attributes used on the proxy for ACL checking.
96 There is no risk of giving away such values; they are only used to
97 check permissions.
98 The default is to use
99 .BR simple 
100 bind, with empty \fIbinddn\fP and \fIcredentials\fP,
101 which means that the related operations will be performed anonymously.
102
103 .B This identity is by no means implicitly used by the proxy 
104 .B when the client connects anonymously.
105 The
106 .B idassert-bind
107 feature, instead, in some cases can be crafted to implement that behavior,
108 which is \fIintrinsically unsafe and should be used with extreme care\fP.
109 This directive obsoletes
110 .BR acl-authcDN ,
111 and
112 .BR acl-passwd .
113 .RE
114
115 .HP
116 .hy 0
117 .B idassert-bind
118 .B bindmethod=none|simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
119 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
120 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
121 .B [authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
122 .RS
123 Allows to define the parameters of the authentication method that is 
124 internally used by the proxy to authorize connections that are 
125 authenticated by other databases.
126 The identity defined by this directive, according to the properties
127 associated to the authentication method, is supposed to have auth access 
128 on the target server to attributes used on the proxy for authentication
129 and authorization, and to be allowed to authorize the users.
130 This requires to have
131 .B proxyAuthz
132 privileges on a wide set of DNs, e.g.
133 .BR authzTo=dn.subtree:"" ,
134 and the remote server to have
135 .B authz-policy
136 set to
137 .B to
138 or
139 .BR both .
140 See
141 .BR slapd.conf (5)
142 for details on these statements and for remarks and drawbacks about
143 their usage.
144 The supported bindmethods are
145
146 \fBnone|simple|sasl\fP
147
148 where
149 .B none
150 is the default, i.e. no \fIidentity assertion\fP is performed.
151
152 The authz parameter is used to instruct the SASL bind to exploit 
153 .B native 
154 SASL authorization, if available; since connections are cached,
155 this should only be used when authorizing with a fixed identity
156 (e.g. by means of the 
157 .B authzDN
158 or
159 .B authzID
160 parameters).
161 Otherwise, the default
162 .B proxyauthz
163 is used, i.e. the proxyAuthz control is added to all operations.
164
165 The supported modes are:
166
167 \fB<mode> := {legacy|anonymous|none|self}\fP
168
169 If 
170 .B <mode>
171 is not present, and 
172 .B authzId
173 is given, the proxy always authorizes that identity.
174 .B <authorization ID>
175 can be 
176
177 \fBu:<user>\fP
178
179 \fB[dn:]<DN>\fP
180
181 The former is supposed to be expanded by the remote server according 
182 to the authz rules; see
183 .BR slapd.conf (5)
184 for details.
185 In the latter case, whether or not the 
186 .B dn:
187 prefix is present, the string must pass DN validation and normalization.
188
189 The default mode is 
190 .BR legacy ,
191 which implies that the proxy will either perform a simple bind as the
192 .I authcDN
193 or a SASL bind as the
194 .I authcID
195 and assert the client's identity when it is not anonymous.
196 Direct binds are always proxied.
197 The other modes imply that the proxy will always either perform a simple bind 
198 as the
199 .IR authcDN
200 or a SASL bind as the
201 .IR authcID ,
202 unless restricted by
203 .BR idassert-authzFrom
204 rules (see below), in which case the operation will fail;
205 eventually, it will assert some other identity according to
206 .BR <mode> .
207 Other identity assertion modes are
208 .BR anonymous
209 and
210 .BR self ,
211 which respectively mean that the 
212 .I empty 
213 or the 
214 .IR client 's 
215 identity
216 will be asserted;
217 .BR none ,
218 which means that no proxyAuthz control will be used, so the
219 .I authcDN
220 or the
221 .I authcID
222 identity will be asserted.
223 For all modes that require the use of the
224 .I proxyAuthz 
225 control, on the remote server the proxy identity must have appropriate 
226 .I authzTo
227 permissions, or the asserted identities must have appropriate
228 .I authzFrom 
229 permissions.  Note, however, that the ID assertion feature is mostly 
230 useful when the asserted identities do not exist on the remote server.
231
232 Flags can be
233
234 \fBoverride,{prescriptive|non-prescriptive}\fP
235
236 When the 
237 .B override
238 flag is used, identity assertion takes place even when the database
239 is authorizing for the identity of the client, i.e. after binding
240 with the provided identity, and thus authenticating it, the proxy
241 performs the identity assertion using the configured identity and
242 authentication method.
243
244 When the
245 .B prescriptive
246 flag is used (the default), operations fail with
247 \fIinappropriateAuthentication\fP
248 for those identities whose assertion is not allowed by the
249 .B idassert-authzFrom
250 patterns.
251 If the 
252 .B non-prescriptive
253 flag is used, operations are performed anonymously for those identities 
254 whose assertion is not allowed by the
255 .B idassert-authzFrom
256 patterns.
257
258 This directive obsoletes
259 .BR idassert-authcDN ,
260 .BR idassert-passwd ,
261 .BR idassert-mode ,
262 and
263 .BR idassert-method .
264 .RE
265
266 .TP
267 .B idassert-authzFrom <authz-regexp>
268 if defined, selects what
269 .I local
270 identities are authorized to exploit the identity assertion feature.
271 The string
272 .B <authz-regexp>
273 follows the rules defined for the
274 .I authzFrom
275 attribute.
276 See 
277 .BR slapd.conf (5),
278 section related to
279 .BR authz-policy ,
280 for details on the syntax of this field.
281
282 .TP
283 .B proxy-whoami {NO|yes}
284 Turns on proxying of the WhoAmI extended operation. If this option is
285 given, back-ldap will replace slapd's original WhoAmI routine with its
286 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
287 request will be forwarded to the remote LDAP server. Other sessions will
288 be handled by the local slapd, as before. This option is mainly useful
289 in conjunction with Proxy Authorization.
290
291 .TP
292 .B rebind-as-user {NO|yes}
293 If this option is given, the client's bind credentials are remembered
294 for rebinds when chasing referrals.  Useful when
295 \fBchase-referrals\fP is set to \fByes\fP, useless otherwise.
296
297 .TP
298 .B chase-referrals {YES|no}
299 enable/disable automatic referral chasing, which is delegated to the
300 underlying libldap, with rebinding eventually performed if the
301 \fBrebind-as-user\fP directive is used.  The default is to chase referrals.
302
303 .TP
304 .B tls {[try-]start|[try-]propagate}
305 execute the StartTLS extended operation when the connection is initialized;
306 only works if the URI directive protocol scheme is not \fBldaps://\fP.
307 \fBpropagate\fP issues the StartTLS operation only if the original
308 connection did.
309 The \fBtry-\fP prefix instructs the proxy to continue operations
310 if the StartTLS operation failed; its use is highly deprecated.
311
312 .TP
313 .B t-f-support {NO|yes|discover}
314 enable if the remote server supports absolute filters
315 (see \fIdraft-zeilenga-ldap-t-f\fP for details).
316 If set to
317 .BR discover ,
318 support is detected by reading the remote server's root DSE.
319
320 .TP
321 .B timeout [{add|delete|modify|modrdn}=]<val> [...]
322 This directive allows to set per-operation timeouts.
323 If no operation is specified, it affects all.
324 Currently, only write operations are addressed, because searches
325 can already be limited by means of the
326 .B limits
327 directive (see 
328 .BR slapd.conf (5)
329 for details), and other operations are not supposed to incur into the
330 need for timeouts.
331 Note: if the timelimit is exceeded, the operation is abandoned;
332 the protocol does not provide any means to rollback the operation,
333 so the client will not know if the operation eventually succeeded or not.
334
335 .TP
336 .B idle-timeout <time>
337 This directive causes a cached connection to be dropped an recreated
338 after it has been idle for the specified time.
339
340 .SH BACKWARD COMPATIBILITY
341 The LDAP backend has been heavily reworked between releases 2.2 and 2.3;
342 as a side-effect, some of the traditional directives have been
343 deprecated and should be no longer used.
344
345 .TP
346 .B server <hostname[:port]>
347 this directive is no longer supported.  Use the 
348 .B uri
349 directive as described above.
350
351 .TP
352 .B acl-authcDN "<administrative DN for access control purposes>"
353 DN which is used to query the target server for acl checking; it
354 is supposed to have read access on the target server to attributes used
355 on the proxy for acl checking.
356 There is no risk of giving away such values; they are only used to
357 check permissions.
358 .B The acl-authcDN identity is by no means implicitly used by the proxy 
359 .B when the client connects anonymously.
360 See the
361 .B idassert-*
362 feature instead.
363 This directive is obsoleted by
364 .BR acl-bind ,
365 and may dismissed in the future.
366
367 .TP
368 .B acl-passwd <password>
369 Password used with the
370 .B 
371 acl-authcDN
372 above.
373 This directive is obsoleted by
374 .BR acl-bind ,
375 and may be dismissed in the future.
376
377 .TP
378 .B idassert-authcDN "<administrative DN for proxyAuthz purposes>"
379 DN which is used to propagate the client's identity to the target
380 by means of the proxyAuthz control when the client does not
381 belong to the DIT fragment that is being proxied by back-ldap.
382 This directive is obsoleted by
383 .BR idassert-bind ,
384 and may be dismissed in the future.
385
386 .TP
387 .B idassert-passwd <password>
388 Password used with the
389 .B idassert-authcDN
390 above.
391 This directive is obsoleted by
392 .BR idassert-bind ,
393 and may be dismissed in the future.
394
395 .TP
396 .B idassert-mode <mode> [<flags>]
397 defines what type of
398 .I identity assertion
399 is used.
400 This directive is obsoleted by
401 .BR idassert-bind ,
402 and may be dismissed in the future.
403
404 .TP
405 .B idassert-method <method> [<saslargs>]
406 This directive is obsoleted by
407 .BR idassert-bind ,
408 and may be dismissed in the future.
409
410 .TP
411 .B suffixmassage, map, rewrite*
412 These directives are no longer supported by back-ldap; their 
413 functionality is now delegated to the
414 .B rwm
415 overlay.  Essentially, add a statement
416
417 .B overlay rwm
418
419 first, and prefix all rewrite/map statements with
420 .B rwm-
421 to obtain the original behavior.
422 See
423 .BR slapo-rwm (5)
424 for details.
425 .\" However, to ease update from existing configurations, back-ldap still 
426 .\" recognizes them and automatically instantiates the
427 .\" .B rwm
428 .\" overlay if available and not instantiated yet.
429 .\" This behavior may change in the future.
430
431 .SH ACCESS CONTROL
432 The
433 .B ldap
434 backend does not honor all ACL semantics as described in
435 .BR slapd.access (5).
436 In general, access checking is delegated to the remote server(s).
437 Only
438 .B read (=r)
439 access to the
440 .B entry
441 pseudo-attribute and to the other attribute values of the entries
442 returned by the
443 .B search
444 operation is honored, which is performed by the frontend.
445
446 .SH OVERLAYS
447 The LDAP backend provides basic proxying functionalities to many overlays.
448 The 
449 .B chain
450 overlay, described in
451 .BR slapo\-chain (5),
452 and the
453 .B translucent
454 overlay, described in
455 .BR slapo\-translucent (5),
456 deserve a special mention.
457
458 Conversely, there are many overlays that are best used in conjunction
459 with the LDAP backend.
460 The
461 .B proxycache 
462 overlay allows caching of LDAP search requests (queries) 
463 in a local database.
464 See 
465 .BR slapo\-pcache (5)
466 for details.
467 The
468 .B rwm
469 overlay provides DN rewrite and attribute/objectClass mapping
470 capabilities to the underlying database.
471 See 
472 .BR slapo\-rwm (5)
473 for details.
474
475 .SH FILES
476 .TP
477 ETCDIR/slapd.conf
478 default slapd configuration file
479 .SH SEE ALSO
480 .BR slapd.conf (5),
481 .BR slapd\-meta (5),
482 .BR slapo\-chain (5),
483 .BR slapo\-pcache (5),
484 .BR slapo\-rwm (5),
485 .BR slapo\-translucent (5),
486 .BR slapd (8),
487 .BR ldap (3).
488 .SH AUTHOR
489 Howard Chu, with enhancements by Pierangelo Masarati