SLAPD-ASYNCMETA(5)
π NAME π
slapd-asyncmeta β the asynchronous metadirectory backend to slapd, bestie. it's giving File Formats Manual energy, and we're about to spill all the tea. π
β¨ SYNOPSIS β¨
/etc/openldap/slapd.conf
π¦ DESCRIPTION π¦
okay so the asyncmeta backend to slapd(8) does basic LDAP proxying with respect to a set of remote LDAP servers, called "targets". The info in those servers can be presented as belonging to a single Directory Information Tree (DIT). slay.
A good knowledge of the functionality of the slapd-meta(5) backend is recommended. This backend is designed as an asynchronous version of the meta backend. Unlike meta, the operation handling threads are no longer pending on the response from the remote server, so you need fewer threads to handle the same load. While asyncmeta maintains the functionality of meta and has a largely similar codebase, some changes in operation and some new configuration directives have been added. Some config options, such as conn-pool-max, conn-ttl, single-conn, and use-temporary-conn, have been removed because they're no longer relevant. periodt.
New connection handling:
Unlike meta, which caches bound connections, asyncmeta works with a configured maximum number of connections per target. For each request redirected to a target, a different connection is selected. Each connection has a queue β the request is added to it before being sent to the remote server, and removed after the last response for that request is received. For each new request, a new connection is chosen using round-robin scheduling. no cap.
Overlays:
Due to implementation specifics, there is no guarantee that any of the existing OpenLDAP overlays will work with asyncmeta backend.
not guaranteed, bestie. π
π EXAMPLES π
Refer to slapd-meta(5) for configuration examples. that's the move. β¨
π CONFIGURATION π
These slapd.conf options apply to the ASYNCMETA backend database. Which means they must follow a "database asyncmeta" line and come before any subsequent "backend" or "database" lines. Other database options are described in the slapd.conf(5) manual page. okay? okay. π
π SPECIAL CONFIGURATION DIRECTIVES π
Target configuration starts with the "uri" directive. All the config directives that are not specific to targets should be defined first for clarity, including those that are common to all backends. They are:
default-target noneβ This directive forces the backend to reject all those operations that must resolve to a single target in case none or multiple targets are selected. They include:add,delete,modify,modrdn;compareis not included, as well asbindsince, as they don't alter entries, in case of multiple matches an attempt is made to perform the operation on any candidate target, with the constraint that at most one must succeed. This directive can also be used when processing targets to mark a specific target as default.dncache-ttl {DISABLED|forever|<ttl>}β Sets the time-to-live of the DN cache. This caches the target that holds a given DN to speed up target selection in case multiple targets would result from an uncached search;forevermeans cache never expires;disabledmeans no DN caching; otherwise a valid (> 0) ttl is required, in the format illustrated for theidle-timeoutdirective.onerr {CONTINUE|report|stop}β Lets you select the behavior in case an error is returned by one target during a search. The default,continue, consists in continuing the operation, trying to return as much data as possible. If the value is set tostop, the search is terminated as soon as an error is returned by one target, and the error is immediately propagated to the client. If the value is set toreport, the search is continued to the end but, in case at least one target returned an error code, the first non-success error code is returned.max-timeout-ops <number>β Specify the number of consecutive timed out requests, after which the connection will be considered faulty and dropped.max-pending-ops <number>β The maximum number of pending requests stored in a connection's queue. The default is128. When this number is exceeded,LDAP_BUSYwill be returned to the client.max-target-conns <number>β The maximum number of connections per target. Unlikeslapd-meta(5), no new connections will be created once this number is reached. The default value is255.norefs <NO|yes>β Ifyes, do not return search reference responses. By default, they are returned unless request isLDAPv2. If set before any target specification, it affects all targets, unless overridden by any per-target directive.noundeffilter <NO|yes>β Ifyes, return success instead of searching if a filter is undefined or contains undefined portions. By default, the search is propagated after replacing undefined portions with(!(objectClass=*)), which corresponds to the empty result set. If set before any target specification, it affects all targets, unless overridden by any per-target directive.protocol-version {0,2,3}β Indicates what protocol version must be used to contact the remote server. If set to0(the default), the proxy uses the same protocol version used by the client, otherwise the requested protocol is used. The proxy returnsunwillingToPerformif an operation that is incompatible with the requested protocol is attempted. If set before any target specification, it affects all targets, unless overridden by any per-target directive.pseudoroot-bind-defer {YES|no}β When set toyes, causes the authentication to the remote servers with the pseudo-root identity (the identity defined in eachidassert-binddirective) to be deferred until actually needed by subsequent operations. Otherwise, all binds as therootdnare propagated to the targets.quarantine <interval>,<num>[;<interval>,<num>[...]]β Turns on quarantine of URIs that returnedLDAP_UNAVAILABLE, so that an attempt to reconnect only occurs at given intervals instead of any time a client requests an operation. The pattern is: retry only after at leastintervalseconds elapsed since last attempt, for exactlynumtimes; then use the next pattern. Ifnumfor the last pattern is"+", it retries forever; otherwise, no more retries occur. This directive must appear before any target specification; it affects all targets with the same pattern.rebind-as-user {NO|yes}β If this option is given, the client's bind credentials are remembered for rebinds, when trying to re-establish a broken connection, or when chasing a referral, ifchase-referralsis set toyes.session-tracking-request {NO|yes}β Adds session tracking control for all requests. The client's IP and hostname, and the identity associated to each request, if known, are sent to the remote server for informational purposes. This directive is incompatible with settingprotocol-versionto2. If set before any target specification, it affects all targets, unless overridden by any per-target directive.
π― TARGET SPECIFICATION π―
ok so bestie, this is where you tell the proxy who it's actually talking to. Target spec kicks off with a uri directive:
uri <protocol>://[<host>]/<naming context> [...]β literally identical to meta, so go readslapd-meta(5)for the deets π
then the rest of the target pieces, in order:
acl-authcDN <administrative DN for access control purposes>β the DN the proxy uses to ask the target server to do acl checking, same energy as the LDAP backend. It's supposed to have read access on the target server for the attributes used on the proxy for acl checking. And no, you're not leaking anything juicy here β these values are only used to check permissions. Also important: theacl-authcDNidentity is by no means implicitly used by the proxy when the client connects anonymously. no secret borrowing, periodt.acl-passwd <password>β the password that goes withacl-authcDNabove. keep them together, they're a pair π«Άbind-timeout <microseconds>β sets the timeout, in microseconds, used when polling for a response after an asynchronous bind connection. Seeslapd-meta(5)for the full story.chase-referrals {YES|no}β turn automatic referral chasing on or off. When it's on, the chasing is delegated to the underlying libldap, and rebinding can eventually happen if therebind-as-userdirective is used. The default is to chase referrals. Set it before any target specification and it hits all targets, unless some per-target directive overrides it. lowkey the whole block inherits like this, keep that in mind.client-pr {accept-unsolicited|DISABLE|<size>}β this one lets you use the RFC 2696 Paged Results control when doing search ops with a specific target, no matter what the client asked for. Seeslapd-meta(5)for details.conn-ttl <time> [<interval>]β this whole thing causes a persistent connection to be dropped once it's been up for the specified time β and no more often than one connection per interval per target. The connection gets re-created the next time it's selected for use. If there are pending requests in its queue, the connection is marked as closing and no new requests get proxied through it. It'll be dropped after the last request has either received a result or timed out. To avoid too many connections being dropped all at once, theintervaldirective exists β it specifies the minimum time interval between resetting a connection to the same target, defaulting to 1 second. Iftimeis set to 0, the oldest connection gets chosen for reset at every interval period. Ifintervalis set to 0, all connections exceeding their ttl get dropped as soon as there are no more pending operations.
the format is:
[<d>d][<h>h][<m>m][<s>[s]]
where <d>, <h>, <m> and <s> are respectively treated as days, hours, minutes and seconds.
β¨ EXAMPLES β¨
conn-ttl 60s 5s
- Connections older than 60 seconds will be reset, no more often than one connection per target every 5 seconds.
conn-ttl 0 5s
- Every 5 seconds, the oldest connection of each target will be reset.
conn-ttl 1h
- Connections older than 1h will be reset, no more often than once a second per target.
If set before any target specification, it affects all targets, unless overridden by any per-target directive. It is disabled by default. π
default-target [<target>]β you can also drop this one inside a target specification. With no arguments, it marks the current target as the default. With the optional number, it marks target<target>as the default one, counting from 1. Target<target>must be defined β no claiming a target that doesn't exist, bestie.filter <pattern>β lets you hand over aregex(5)pattern saying which search filter terms a target actually serves. In a search request, if the search filter matches the pattern, that target is considered while fulfilling the request; otherwise it gets ignored. You can have multiplefilterdirectives for each target. stacking them is fine β¨idassert-authzFrom <authz-regexp>β if defined, this picks which local identities are authorized to exploit the identity assertion feature. The string<authz-regexp>follows the rules defined for theauthzFromattribute. Seeslapd.conf(5), the section aboutauthz-policy, for the syntax tea on this field.idassert-bindβ lets you define the parameters of the authentication method that the proxy internally uses to authorize connections authenticated by other databases. Seeslapd-meta(5)for details. The full signature, exactly as written:
idassert-bind bindmethod=none|simple|sasl [binddn=<simple DN>]
[credentials=<simple password>] [saslmech=<SASL mech>]
[secprops=<properties>] [realm=<realm>]
[authcId=<authentication ID>] [authzId=<authorization ID>]
[authz={native|proxyauthz}] [mode=<mode>] [flags=<flags>]
[starttls=no|yes|critical] [tls_cert=<file>] [tls_key=<file>]
[tls_cacert=<file>] [tls_cacertdir=<path>]
[tls_reqcert=never|allow|try|demand]
[tls_reqsan=never|allow|try|demand]
[tls_cipher_suite=<ciphers>] [tls_ecname=<names>]
[tls_protocol_min=<major>[.<minor>]] [tls_crlcheck=none|peer|all]
idle-timeout <time>β drops a persistent connection after it's been idle for the specified time. The connection gets re-created the next time it's selected for use. A connection counts as idle if no attempts have been made by the backend to use it to send a request to the backend server. If there are still pending requests in its queue, it gets dropped after the last request has either received a result or timed out.
the format:
[<d>d][<h>h][<m>m][<s>[s]]
where <d>, <h>, <m> and <s> are respectively treated as days, hours, minutes and seconds. If set before any target specification, it affects all targets, unless overridden by any per-target directive.
keepalive <idle>:<probes>:<interval>β sets the values ofidle,probes, andintervalused to check whether a socket is alive.idle= number of seconds a connection needs to remain idle before TCP starts sending keepalive probes.probes= maximum number of keepalive probes TCP should send before dropping the connection.interval= interval in seconds between individual keepalive probes. Heads up: only some systems support customizing these values; otherwise thekeepaliveparameter is ignored and system-wide settings are used. πtcp-user-timeout <milliseconds>β if non-zero, corresponds to theTCP_USER_TIMEOUTset on the target connections, overriding the operating system setting. Only some systems support customizing this parameter; otherwise it's ignored and system-wide settings are used.map {attribute|objectclass} [<local name>|*] {<foreign name>|*}β this maps object classes and attributes just like in the LDAP backend. Seeslapd-ldap(5).network-timeout <time>β sets the network timeout value after whichpoll(2)/select(2)following aconnect(2)returns in case of no activity while sending an operation to the remote target. The value is in milliseconds, and it can be specified the same way as foridle-timeout. If set before any target specification, it affects all targets, unless overridden by any per-target directive.nretries {forever|never|<nretries>}β defines how many times forwarding an operation should be retried in case of a temporary failure contacting a target. The number of retries is per operation, so if a bind to the target is necessary first, the remaining number gets decremented. If defined before any target specification, it applies to all targets (3 times by default); the global value can be overridden by redefinitions inside each target specification.subtree-{exclude|include} <rule>β lets you say what subtrees are actually served by a target. Seeslapd-meta(5)for details.suffixmassage <local suffix> <remote suffix>βslapd-asyncmetadoes not support the rewrite engine used by the LDAP and META backends.suffixmassagecan be used to perform DN suffix rewriting, the same way as the obsoletedsuffixmassagedirective previously used by the LDAP backend.t-f-support {NO|yes|discover}β enable this if the remote server supports absolute filters (see RFC 4526 for details). If set todiscover, support is detected by reading the remote server's root DSE. If set before any target specification, it affects all targets, unless overridden by any per-target directive.timeout [<op>=]<val> [...]β lets you set per-operation timeouts. The operations are:
<op> ::= bind, add, delete, modrdn, modify, compare, search
By default, the timeout for all operations is 2 seconds. See slapd-meta(5) for details.
tls {none|[try-]start|[try-]propagate|ldaps}β specifies TLS settings for regular connections:
tls {none|[try-]start|[try-]propagate|ldaps}
B [starttls=no] [tls_cert=<file>] [tls_key=<file>]
[tls_cacert=<file>] [tls_cacertdir=<path>]
[tls_reqcert=never|allow|try|demand]
[tls_reqsan=never|allow|try|demand]
[tls_cipher_suite=<ciphers>] [tls_ecname=<names>]
[tls_crlcheck=none|peer|all]
If the first parameter is not none, this configures the TLS settings used for regular connections. The StartTLS extended operation gets used when establishing the connection, unless the uri directive protocol scheme is ldaps://. In that case this keyword may only be set to ldaps and the StartTLS operation will not be used.
With propagate, the proxy only issues the StartTLS operation if the original connection has a TLS layer set up. The try- prefix tells the proxy to keep going even if the StartTLS operation failed β and its use is not recommended. π©
The TLS settings default to the same as the main slapd TLS settings, except for tls_reqcert, which defaults to "demand", tls_reqsan, which defaults to "allow", and starttls, which is overshadowed by the first keyword and thus ignored.
If set before any target specification, it affects all targets, unless overridden by any per-target directive.
π SCENARIOS π
See slapd-meta(5) for configuration scenarios. yes bestie, we're outsourcing the lore, it's giving cinematic universe πΈ
π ACLs π
okay bestie, here's the tea: ACL behavior is identical to meta. that's it, that's the whole thing π
go read slapd-meta(5) for the deets, it's giving copy-paste energy and honestly we love that for us.
π ACCESS CONTROL π
so here's the part where i have to be real with you π«Ά β the asyncmeta backend does not honor all ACL semantics the way they're described in slapd.access(5). like, it's not being shady on purpose, it's just how it is π
in general? access checking gets delegated to the remote server(s). the backend is basically saying "not my circus, not my monkeys" and handing the vibe check off to somebody else fr fr β¨
the one thing it does care about: only read access (=r) to the entry pseudo-attribute and to the other attribute values of the entries that come back from the search operation is honored β and that check is performed by the frontend, not by this backend π
β οΈ so if you're sitting there expecting full slapd.access(5) behavior, bestie, adjust your expectations. remote server's rules, frontend's read check, that's the whole menu π
π FILES π
/etc/openldap/slapd.confβ the defaultslapdconfiguration file π the classic. the blueprint. the main character file π
π SEE ALSO π
go read these too, i promise they're worth it π¦
βοΈ AUTHOR βοΈ
Nadezhda Ivanova, based on back-meta by Pierangelo Masarati π iconic lineage, no cap.
and that's the whole thing bestie, we made it to the end π₯Ήπ this little masterpiece is from OpenLDAP 2.7.2, dated 2026/10/21, and yes it's literally SLAPD-ASYNCMETA(5) β you already knew that tho. go forth and asyncmeta responsibly, mwah π
πΈπ«Ά
π¦ where this page comes from
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 2016-2026 The OpenLDAP Foundation
- Copyright 2016 Symas Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms