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