1SLAPD-LDAP(5) File Formats Manual SLAPD-LDAP(5)
2
3
4
6 slapd-ldap - LDAP backend to slapd
7
9 /etc/openldap/slapd.conf
10
12 The LDAP backend to slapd(8) is not an actual database; instead it acts
13 as a proxy to forward incoming requests to another LDAP server. While
14 processing requests it will also chase referrals, so that referrals are
15 fully processed instead of being returned to the slapd client.
16
17 Sessions that explicitly Bind to the back-ldap database always create
18 their own private connection to the remote LDAP server. Anonymous ses‐
19 sions will share a single anonymous connection to the remote server.
20 For sessions bound through other mechanisms, all sessions with the same
21 DN will share the same connection. This connection pooling strategy can
22 enhance the proxy's efficiency by reducing the overhead of repeatedly
23 making/breaking multiple connections.
24
25 The ldap database can also act as an information service, i.e. the
26 identity of locally authenticated clients is asserted to the remote
27 server, possibly in some modified form. For this purpose, the proxy
28 binds to the remote server with some administrative identity, and, if
29 required, authorizes the asserted identity. See the idassert-* rules
30 below. The administrative identity of the proxy, on the remote server,
31 must be allowed to authorize by means of appropriate authzTo rules; see
32 slapd.conf(5) for details.
33
34 The proxy instance of slapd(8) must contain schema information for the
35 attributes and objectClasses used in filters, request DNs and request-
36 related data in general. It should also contain schema information for
37 the data returned by the proxied server. It is the responsibility of
38 the proxy administrator to keep the schema of the proxy lined up with
39 that of the proxied server.
40
41
42 Note: When looping back to the same instance of slapd(8), each connec‐
43 tion requires a new thread; as a consequence, the slapd(8) threads pa‐
44 rameter may need some tuning. In those cases, one may consider using
45 slapd-relay(5) instead, which performs the relayed operation internally
46 and thus reuses the same connection.
47
48
50 These slapd.conf options apply to the LDAP backend database. That is,
51 they must follow a "database ldap" line and come before any subsequent
52 "backend" or "database" lines. Other database options are described in
53 the slapd.conf(5) manual page.
54
55
56 Note: In early versions of back-ldap it was recommended to always set
57
58 lastmod off
59
60 for ldap and meta databases. This was required because operational at‐
61 tributes related to entry creation and modification should not be prox‐
62 ied, as they could be mistakenly written to the target server(s), gen‐
63 erating an error. The current implementation automatically sets last‐
64 mod to off, so its use is redundant and should be omitted.
65
66
67 uri <ldapurl>
68 LDAP server to use. Multiple URIs can be set in a single lda‐
69 purl argument, resulting in the underlying library automatically
70 calling the first server of the list that responds, e.g.
71
72 uri "ldap://host/ ldap://backup-host/"
73
74 The URI list is space- or comma-separated. Whenever the server
75 that responds is not the first one in the list, the list is re‐
76 arranged and the responsive server is moved to the head, so that
77 it will be first contacted the next time a connection needs to
78 be created.
79
80 acl-bind bindmethod=simple|sasl [binddn=<simple DN>]
81 [credentials=<simple password>] [saslmech=<SASL mech>]
82 [secprops=<properties>] [realm=<realm>] [authcId=<authentication
83 ID>] [authzId=<authorization ID>] [starttls=no|yes|critical]
84 [tls_cert=<file>] [tls_key=<file>] [tls_cacert=<file>]
85 [tls_cacertdir=<path>] [tls_reqcert=never|allow|try|demand]
86 [tls_reqsan=never|allow|try|demand] [tls_cipher_suite=<ciphers>]
87 [tls_ecname=<names>] [tls_protocol_min=<major>[.<minor>]]
88 [tls_crlcheck=none|peer|all]
89 Allows one to define the parameters of the authentication method
90 that is internally used by the proxy to collect info related to
91 access control, and whenever an operation occurs with the
92 identity of the rootdn of the LDAP proxy database. The identity
93 defined by this directive, according to the properties
94 associated to the authentication method, is supposed to have
95 read access on the target server to attributes used on the proxy
96 for ACL checking.
97
98 There is no risk of giving away such values; they are only used
99 to check permissions. The default is to use simple bind, with
100 empty binddn and credentials, which means that the related
101 operations will be performed anonymously. If not set, and if
102 idassert-bind is defined, this latter identity is used instead.
103 See idassert-bind for details.
104
105 The connection between the proxy database and the remote server
106 associated to this identity is cached regardless of the lifespan
107 of the client-proxy connection that first established it.
108
109 This identity is not implicitly used by the proxy when the
110 client connects anonymously. The idassert-bind feature,
111 instead, in some cases can be crafted to implement that
112 behavior, which is intrinsically unsafe and should be used with
113 extreme care.
114
115 The TLS settings default to the same as the main slapd TLS
116 settings, except for tls_reqcert which defaults to "demand", and
117 tls_reqsan which defaults to "allow".
118
119
120 cancel {ABANDON|ignore|exop[-discover]}
121 Defines how to handle operation cancellation. By default,
122 abandon is invoked, so the operation is abandoned immediately.
123 If set to ignore, no action is taken and any further response is
124 ignored; this may result in further response messages to be
125 queued for that connection, so it is recommended that long
126 lasting connections are timed out either by idle-timeout or
127 conn-ttl, so that resources eventually get released. If set to
128 exop, a cancel operation (RFC 3909) is issued, resulting in the
129 cancellation of the current operation; the cancel operation
130 waits for remote server response, so its use may not be
131 recommended. If set to exop-discover, support of the cancel
132 extended operation is detected by reading the remote server's
133 root DSE.
134
135
136 chase-referrals {YES|no}
137 enable/disable automatic referral chasing, which is delegated to
138 the underlying libldap, with rebinding eventually performed if
139 the rebind-as-user directive is used. The default is to chase
140 referrals.
141
142
143 conn-pool-max <int>
144 This directive defines the maximum size of the privileged
145 connections pool.
146
147
148 conn-ttl <time>
149 This directive causes a cached connection to be dropped after a
150 given ttl, regardless of being idle or not. If a client
151 connection outlives the remote connection, the client will
152 receive LDAP_UNAVAILABLE when it executes the next operation.
153
154
155
156 idassert-authzFrom <authz-regexp>
157 if defined, selects what local identities are authorized to
158 exploit the identity assertion feature. The string <authz-
159 regexp> mostly follows the rules defined for the authzFrom
160 attribute. See slapd.conf(5), section related to authz-policy,
161 for details on the syntax of this field. This parameter differs
162 from the documented behavior in relation to the meaning of *,
163 which in this case allows anonymous rather than denies.
164
165
166 idassert-bind bindmethod=none|simple|sasl [binddn=<simple DN>]
167 [credentials=<simple password>] [saslmech=<SASL mech>]
168 [secprops=<properties>] [realm=<realm>] [authcId=<authentication
169 ID>] [authzId=<authorization ID>] [authz={native|proxyauthz}]
170 [mode=<mode>] [flags=<flags>] [starttls=no|yes|critical]
171 [tls_cert=<file>] [tls_key=<file>] [tls_cacert=<file>]
172 [tls_cacertdir=<path>] [tls_reqcert=never|allow|try|demand]
173 [tls_reqsan=never|allow|try|demand] [tls_cipher_suite=<ciphers>]
174 [tls_ecname=<names>] [tls_protocol_min=<version>]
175 [tls_crlcheck=none|peer|all]
176 Allows one to define the parameters of the authentication method
177 that is internally used by the proxy to authorize connections
178 that are authenticated by other databases. Direct binds are
179 always proxied without any idassert handling.
180
181 The identity defined by this directive, according to the
182 properties associated to the authentication method, is supposed
183 to have auth access on the target server to attributes used on
184 the proxy for authentication and authorization, and to be
185 allowed to authorize the users. This requires to have
186 proxyAuthz privileges on a wide set of DNs, e.g.
187 authzTo=dn.subtree:"", and the remote server to have
188 authz-policy set to to or both. See slapd.conf(5) for details
189 on these statements and for remarks and drawbacks about their
190 usage. The supported bindmethods are
191
192 none|simple|sasl
193
194 where none is the default, i.e. no identity assertion is
195 performed.
196
197 The authz parameter is used to instruct the SASL bind to exploit
198 native SASL authorization, if available; since connections are
199 cached, this should only be used when authorizing with a fixed
200 identity (e.g. by means of the authzDN or authzID parameters).
201 Otherwise, the default proxyauthz is used, i.e. the proxyAuthz
202 control (Proxied Authorization, RFC 4370) is added to all
203 operations.
204
205 The supported modes are:
206
207 <mode> := {legacy|anonymous|none|self}
208
209 If <mode> is not present, and authzId is given, the proxy always
210 authorizes that identity. <authorization ID> can be
211
212 u:<user>
213
214 [dn:]<DN>
215
216 The former is supposed to be expanded by the remote server
217 according to the authz rules; see slapd.conf(5) for details. In
218 the latter case, whether or not the dn: prefix is present, the
219 string must pass DN validation and normalization.
220
221 The default mode is legacy, which implies that the proxy will
222 either perform a simple bind as the authcDN or a SASL bind as
223 the authcID and assert the client's identity when it is not
224 anonymous. The other modes imply that the proxy will always
225 either perform a simple bind as the authcDN or a SASL bind as
226 the authcID, unless restricted by idassert-authzFrom rules (see
227 below), in which case the operation will fail; eventually, it
228 will assert some other identity according to <mode>. Other
229 identity assertion modes are anonymous and self, which
230 respectively mean that the empty or the client's identity will
231 be asserted; none, which means that no proxyAuthz control will
232 be used, so the authcDN or the authcID identity will be
233 asserted. For all modes that require the use of the proxyAuthz
234 control, on the remote server the proxy identity must have
235 appropriate authzTo permissions, or the asserted identities must
236 have appropriate authzFrom permissions. Note, however, that the
237 ID assertion feature is mostly useful when the asserted
238 identities do not exist on the remote server.
239
240 Flags can be
241
242 override,[non-]prescriptive,proxy-authz-[non-]critical,dn-{authzid|whoami}
243
244 When the override flag is used, identity assertion takes place
245 even when the database is authorizing for the identity of the
246 client, i.e. after binding with the provided identity, and thus
247 authenticating it, the proxy performs the identity assertion
248 using the configured identity and authentication method.
249
250 When the prescriptive flag is used (the default), operations
251 fail with inappropriateAuthentication for those identities whose
252 assertion is not allowed by the idassert-authzFrom patterns. If
253 the non-prescriptive flag is used, operations are performed
254 anonymously for those identities whose assertion is not allowed
255 by the idassert-authzFrom patterns.
256
257 When the proxy-authz-non-critical flag is used (the default),
258 the proxyAuthz control is not marked as critical, in violation
259 of RFC 4370. Use of proxy-authz-critical is recommended.
260
261 When the dn-authzid flag is used, RFC 3829 LDAP Authorization
262 Identity Controls is used to retrieve the identity associated to
263 the SASL identity; when the dn-whoami flag is used, RFC 4532
264 LDAP Who am I? Operation is performed after the bind for the
265 same purpose.
266
267 The TLS settings default to the same as the main slapd TLS
268 settings, except for tls_reqcert which defaults to "demand", and
269 tls_reqsan which defaults to "allow".
270
271 The identity associated to this directive is also used for
272 privileged operations whenever idassert-bind is defined and
273 acl-bind is not. See acl-bind for details.
274
275
276 idassert-passthru <authz-regexp>
277 if defined, selects what local identities bypass the identity
278 assertion feature. Those identities need to be known by the
279 remote host. The string <authz-regexp> follows the rules
280 defined for the authzFrom attribute. See slapd.conf(5), section
281 related to authz-policy, for details on the syntax of this
282 field.
283
284
285 idle-timeout <time>
286 This directive causes a cached connection to be dropped after it
287 has been idle for the specified time. If a client connection
288 outlives the remote connection, the client will receive
289 LDAP_UNAVAILABLE when it executes the next operation.
290
291
292 keepalive <idle>:<probes>:<interval>
293 The keepalive parameter sets the values of idle, probes, and
294 interval used to check whether a socket is alive; idle is the
295 number of seconds a connection needs to remain idle before TCP
296 starts sending keepalive probes; probes is the maximum number of
297 keepalive probes TCP should send before dropping the connection;
298 interval is interval in seconds between individual keepalive
299 probes. Only some systems support the customization of these
300 values; the keepalive parameter is ignored otherwise, and
301 system-wide settings are used.
302
303
304 tcp-user-timeout <milliseconds>
305 If non-zero, corresponds to the TCP_USER_TIMEOUT set on the
306 target connections, overriding the operating system setting.
307 Only some systems support the customization of this parameter,
308 it is ignored otherwise and system-wide settings are used.
309
310
311 network-timeout <time>
312 Sets the network timeout value after which poll(2)/select(2)
313 following a connect(2) returns in case of no activity. The
314 value is in seconds, and it can be specified as for
315 idle-timeout.
316
317
318 norefs <NO|yes>
319 If yes, do not return search reference responses. By default,
320 they are returned unless request is LDAPv2.
321
322
323 omit-unknown-schema <NO|yes>
324 If yes, do not return objectClasses or attributes that are not
325 known to the local server. The default is to return all schema
326 elements.
327
328
329 noundeffilter <NO|yes>
330 If yes, return success instead of searching if a filter is
331 undefined or contains undefined portions. By default, the
332 search is propagated after replacing undefined portions with
333 (!(objectClass=*)), which corresponds to the empty result set.
334
335
336 onerr {CONTINUE|stop}
337 This directive allows one to select the behavior in case an
338 error is returned by the remote server during a search. The
339 default, continue, consists in returning success. If the value
340 is set to stop, the error is returned to the client.
341
342
343 protocol-version {0,2,3}
344 This directive indicates what protocol version must be used to
345 contact the remote server. If set to 0 (the default), the proxy
346 uses the same protocol version used by the client, otherwise the
347 requested protocol is used. The proxy returns
348 unwillingToPerform if an operation that is incompatible with the
349 requested protocol is attempted.
350
351
352 proxy-whoami {NO|yes}
353 Turns on proxying of the WhoAmI extended operation. If this
354 option is given, back-ldap will replace slapd's original WhoAmI
355 routine with its own. On slapd sessions that were authenticated
356 by back-ldap, the WhoAmI request will be forwarded to the remote
357 LDAP server. Other sessions will be handled by the local slapd,
358 as before. This option is mainly useful in conjunction with
359 Proxy Authorization.
360
361
362 quarantine <interval>,<num>[;<interval>,<num>[...]]
363 Turns on quarantine of URIs that returned LDAP_UNAVAILABLE, so
364 that an attempt to reconnect only occurs at given intervals
365 instead of any time a client requests an operation. The pattern
366 is: retry only after at least interval seconds elapsed since
367 last attempt, for exactly num times; then use the next pattern.
368 If num for the last pattern is "+", it retries forever;
369 otherwise, no more retries occur. The process can be restarted
370 by resetting the olcDbQuarantine attribute of the database entry
371 in the configuration backend.
372
373
374 rebind-as-user {NO|yes}
375 If this option is given, the client's bind credentials are
376 remembered for rebinds, when trying to re-establish a broken
377 connection, or when chasing a referral, if chase-referrals is
378 set to yes. Note, however, that connection is not re-
379 established automatically after it was dropped due to
380 idle-timeout or conn-ttl .
381
382
383 session-tracking-request {NO|yes}
384 Adds session tracking control for all requests. The client's IP
385 and hostname, and the identity associated to each request, if
386 known, are sent to the remote server for informational purposes.
387 This directive is incompatible with setting protocol-version to
388 2.
389
390
391 single-conn {NO|yes}
392 Discards current cached connection when the client rebinds.
393
394
395 t-f-support {NO|yes|discover}
396 enable if the remote server supports absolute filters (see RFC
397 4526 for details). If set to discover, support is detected by
398 reading the remote server's root DSE.
399
400
401 timeout [<op>=]<val> [...]
402 This directive allows one to set per-operation timeouts.
403 Operations can be
404
405 <op> ::= bind, add, delete, modrdn, modify, compare, search
406
407 The overall duration of the search operation is controlled
408 either by the timelimit parameter or by server-side enforced
409 time limits (see timelimit and limits in slapd.conf(5) for
410 details). This timeout parameter controls how long the target
411 can be irresponsive before the operation is aborted. Timeout is
412 meaningless for the remaining operations, unbind and abandon,
413 which do not imply any response, while it is not yet implemented
414 in currently supported extended operations. If no operation is
415 specified, the timeout val affects all supported operations.
416
417 Note: if the timelimit is exceeded, the operation is cancelled
418 (according to the cancel directive); the protocol does not
419 provide any means to rollback operations, so the client will not
420 be notified about the result of the operation, which may
421 eventually succeeded or not. In case the timeout is exceeded
422 during a bind operation, the connection is destroyed, according
423 to RFC4511.
424
425 Note: in some cases, this backend may issue binds prior to other
426 operations (e.g. to bind anonymously or with some prescribed
427 identity according to the idassert-bind directive). In this
428 case, the timeout of the operation that resulted in the bind is
429 used.
430
431
432 tls {none|[try-]start|[try-]propagate|ldaps} [starttls=no]
433 [tls_cert=<file>] [tls_key=<file>] [tls_cacert=<file>]
434 [tls_cacertdir=<path>] [tls_reqcert=never|allow|try|demand]
435 [tls_reqsan=never|allow|try|demand] [tls_cipher_suite=<ciphers>]
436 [tls_ecname=<names>] [tls_crlcheck=none|peer|all]
437 Specify TLS settings for regular connections.
438
439 If the first parameter is not "none" then this configures the
440 TLS settings to be used for regular connections. The StartTLS
441 extended operation will be used when establishing the connection
442 unless the URI directive protocol scheme is ldaps://. In that
443 case this keyword may only be set to "ldaps" and the StartTLS
444 operation will not be used.
445
446 With propagate, the proxy issues the StartTLS operation only if
447 the original connection has a TLS layer set up. The try- prefix
448 instructs the proxy to continue operations if the StartTLS
449 operation failed; its use is not recommended.
450
451 The TLS settings default to the same as the main slapd TLS
452 settings, except for tls_reqcert which defaults to "demand",
453 tls_reqsan which defaults to "allow", and starttls which is
454 overshadowed by the first keyword and thus ignored.
455
456
457 use-temporary-conn {NO|yes}
458 when set to yes, create a temporary connection whenever
459 competing with other threads for a shared one; otherwise, wait
460 until the shared connection is available.
461
462
464 The ldap backend does not honor all ACL semantics as described in
465 slapd.access(5). In general, access checking is delegated to the
466 remote server(s). Only read (=r) access to the entry pseudo-attribute
467 and to the other attribute values of the entries returned by the search
468 operation is honored, which is performed by the frontend.
469
470
472 The LDAP backend provides basic proxying functionalities to many
473 overlays. The chain overlay, described in slapo-chain(5), and the
474 translucent overlay, described in slapo-translucent(5), deserve a
475 special mention.
476
477 Conversely, there are many overlays that are best used in conjunction
478 with the LDAP backend. The proxycache overlay allows caching of LDAP
479 search requests (queries) in a local database. See slapo-pcache(5) for
480 details. The rwm overlay provides DN rewrite and attribute/objectClass
481 mapping capabilities to the underlying database. See slapo-rwm(5) for
482 details.
483
484
486 /etc/openldap/slapd.conf
487 default slapd configuration file
488
490 slapd.conf(5), slapd-config(5), slapd-meta(5), slapo-chain(5),
491 slapo-pcache(5), slapo-rwm(5), slapo-translucent(5), slapd(8), ldap(3).
492
494 Howard Chu, with enhancements by Pierangelo Masarati
495
496
497
498OpenLDAP 2.6.6 2023/07/31 SLAPD-LDAP(5)