slapd-meta(5) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | CONFIGURATION | SPECIAL CONFIGURATION DIRECTIVES | TARGET SPECIFICATION | SCENARIOS | ACLs | REWRITING | Passes | Pattern Matching Flags | Action Flags | Pattern matching: | Substitution Pattern Syntax: | Rewrite context: | Basic configuration syntax | Additional configuration syntax: | Configuration examples: | LDAP Proxy resolution (a possible evolution of slapd-ldap(5)): | ACCESS CONTROL | PROXY CACHE OVERLAY | DEPRECATED STATEMENTS | FILES | SEE ALSO | AUTHOR | COLOPHON

SLAPD-META(5)              File Formats Manual              SLAPD-META(5)

NAME         top

       slapd-meta - metadirectory backend to slapd

SYNOPSIS         top

       ETCDIR/slapd.conf

DESCRIPTION         top

       The meta backend to slapd(8) performs basic LDAP proxying with
       respect to a set of remote LDAP servers, called "targets".  The
       information contained in these servers can be presented as
       belonging to a single Directory Information Tree (DIT).

       A basic knowledge of the functionality of the slapd-ldap(5)
       backend is recommended.  This backend has been designed as an
       enhancement of the ldap backend.  The two backends share many
       features (actually they also share portions of code).  While the
       ldap backend is intended to proxy operations directed to a single
       server, the meta backend is mainly intended for proxying of
       multiple servers and possibly naming context masquerading.  These
       features, although useful in many scenarios, may result in
       excessive overhead for some applications, so its use should be
       carefully considered.  In the examples section, some typical
       scenarios will be discussed.

       The proxy instance of slapd(8) must contain schema information for
       the attributes and objectClasses used in filters, request DN and
       request-related data in general.  It should also contain schema
       information for the data returned by the proxied server.  It is
       the responsibility of the proxy administrator to keep the schema
       of the proxy lined up with that of the proxied server.

       Note: When looping back to the same instance of slapd(8), each
       connection requires a new thread; as a consequence, the slapd(8)
       threads parameter may need some tuning. In those cases, unless the
       multiple target feature is required, one may consider using
       slapd-relay(5) instead, which performs the relayed operation
       internally and thus reuses the same connection.

EXAMPLES         top

       There are examples in various places in this document, as well as
       in the slapd/back-meta/data/ directory in the OpenLDAP source
       tree.

CONFIGURATION         top

       These slapd.conf options apply to the META backend database.  That
       is, they must follow a "database meta" line and come before any
       subsequent "backend" or "database" lines.  Other database options
       are described in the slapd.conf(5) manual page.

       Note: In early versions of back-ldap and back-meta it was
       recommended to always set

              lastmod  off

       for ldap and meta databases.  This was required because
       operational attributes related to entry creation and modification
       should not be proxied, as they could be mistakenly written to the
       target server(s), generating an error.  The current implementation
       automatically sets lastmod to off, so its use is redundant and
       should be omitted.

SPECIAL CONFIGURATION DIRECTIVES         top

       Target configuration starts with the "uri" directive.  All the
       configuration directives that are not specific to targets should
       be defined first for clarity, including those that are common to
       all backends.  They are:

       conn-pool-max 
              This directive defines the maximum size of the privileged
              connections pool.

       conn-ttl 
              This directive causes a cached connection to be dropped an
              recreated after a given ttl, regardless of being idle or
              not.

       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; compare is not included, as well as
              bind since, 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|}
              This directive 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; forever means cache never expires;
              disabled means no DN caching; otherwise a valid ( > 0 ) ttl
              is required, in the format illustrated for the idle-timeout
              directive.

       onerr {CONTINUE|report|stop}
              This directive allows one to 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 to stop, 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 to report,
              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.

       norefs 
              If yes, do not return search reference responses.  By
              default, they are returned unless request is LDAPv2.  If
              set before any target specification, it affects all
              targets, unless overridden by any per-target directive.

       noundeffilter 
              If yes, 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}
              This directive indicates what protocol version must be used
              to contact the remote server.  If set to 0 (the default),
              the proxy uses the same protocol version used by the
              client, otherwise the requested protocol is used.  The
              proxy returns unwillingToPerform if 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}
              This directive, when set to yes, causes the authentication
              to the remote servers with the pseudo-root identity (the
              identity defined in each idassert-bind directive) to be
              deferred until actually needed by subsequent operations.
              Otherwise, all binds as the rootdn are propagated to the
              targets.

       quarantine ,[;,[...]]
              Turns on quarantine of URIs that returned LDAP_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 least
              interval seconds elapsed since last attempt, for exactly
              num times; then use the next pattern.  If num for 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, if
              chase-referrals is set to yes.

       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 setting protocol-version to 2.  If set before any
              target specification, it affects all targets, unless
              overridden by any per-target directive.

       single-conn {NO|yes}
              Discards current cached connection when the client rebinds.

       use-temporary-conn {NO|yes}
              when set to yes, create a temporary connection whenever
              competing with other threads for a shared one; otherwise,
              wait until the shared connection is available.

TARGET SPECIFICATION         top

       Target specification starts with a "uri" directive:

       uri ://[]/ [...]
              The  part can be anything ldap_initialize(3)
              accepts ({ldap|ldaps|ldapi} and variants); the  may
              be omitted, defaulting to whatever is set in ldap.conf(5).
              The  part is mandatory for the first URI,
              but it must be omitted for subsequent ones, if any.  The
              naming context part must be within the naming context
              defined for the backend, e.g.:

              suffix "dc=foo,dc=com"
              uri    "ldap://x.foo.com/dc=x,dc=foo,dc=com"

              The  part doesn't need to be unique across
              the targets; it may also match one of the values of the
              "suffix" directive.  Multiple URIs may be defined in a
              single URI statement.  The additional URIs must be separate
              arguments and must not have any  part.
              This causes the underlying library to contact the first
              server of the list that responds.  For example, if
              l1.foo.com and l2.foo.com are shadows of the same server,
              the directive

              suffix "dc=foo,dc=com"
              uri    "ldap://l1.foo.com/dc=foo,dc=com" "ldap://l2.foo.com/"

              causes l2.foo.com to be contacted whenever l1.foo.com does
              not respond.  In that case, the URI list is internally
              rearranged, by moving unavailable URIs to the end, so that
              further connection attempts occur with respect to the last
              URI that succeeded.

       acl-authcDN 
              DN which is used to query the target server for acl
              checking, as in the LDAP backend; it is supposed to have
              read access on the target server to attributes used on the
              proxy for acl checking.  There is no risk of giving away
              such values; they are only used to check permissions.  The
              acl-authcDN identity is by no means implicitly used by the
              proxy when the client connects anonymously.

       acl-passwd 
              Password used with the acl-authcDN above.

       bind-timeout 
              This directive defines the timeout, in microseconds, used
              when polling for response after an asynchronous bind
              connection.  The initial call to ldap_result(3) is
              performed with a trade-off timeout of 100000 us; if that
              results in a timeout exceeded, subsequent calls use the
              value provided with bind-timeout.  The default value is
              used also for subsequent calls if bind-timeout is not
              specified.  If set before any target specification, it
              affects all targets, unless overridden by any per-target
              directive.

       chase-referrals {YES|no}
              enable/disable automatic referral chasing, which is
              delegated to the underlying libldap, with rebinding
              eventually performed if the rebind-as-user directive is
              used.  The default is to chase referrals.  If set before
              any target specification, it affects all targets, unless
              overridden by any per-target directive.

       client-pr {accept-unsolicited|DISABLE|}
              This feature allows one to use RFC 2696 Paged Results
              control when performing search operations with a specific
              target, irrespective of the client's request.  When set to
              a numeric value, Paged Results control is always used with
              size as the page size.  When set to accept-unsolicited,
              unsolicited Paged Results control responses are accepted
              and honored for compatibility with broken remote DSAs.  The
              client is not exposed to paged results handling between
              slapd-meta(5) and the remote servers.  By default
              (disabled), Paged Results control is not used and responses
              are not accepted.  If set before any target specification,
              it affects all targets, unless overridden by any per-target
              directive.

       default-target []
              The "default-target" directive can also be used during
              target specification.  With no arguments it marks the
              current target as the default.  The optional number marks
              target  as the default one, starting from 1.
              Target  must be defined.

       filter 
              This directive allows specifying a regex(5) pattern to
              indicate what search filter terms are actually served by a
              target.

              In a search request, if the search filter matches the
              pattern the target is considered while fulfilling the
              request; otherwise the target is ignored. There may be
              multiple occurrences of the filter directive for each
              target.

       idassert-authzFrom 
              if defined, selects what local identities are authorized to
              exploit the identity assertion feature.  The string
               follows the rules defined for the authzFrom
              attribute.  See slapd.conf(5), section related to
              authz-policy, for details on the syntax of this field.

       idassert-bind bindmethod=none|simple|sasl [binddn=]
              [credentials=] [saslmech=]
              [secprops=] [realm=]
              [authcId=] [authzId=]
              [authz={native|proxyauthz}] [mode=] [flags=]
              [starttls=no|yes|critical] [tls_cert=]
              [tls_key=] [tls_cacert=] [tls_cacertdir=]
              [tls_reqcert=never|allow|try|demand]
              [tls_reqsan=never|allow|try|demand]
              [tls_cipher_suite=] [tls_ecname=]
              [tls_protocol_min=[.]]
              [tls_crlcheck=none|peer|all]
              Allows one to define the parameters of the authentication
              method that is internally used by the proxy to authorize
              connections that are authenticated by other databases.  The
              identity defined by this directive, according to the
              properties associated to the authentication method, is
              supposed to have auth access on the target server to
              attributes used on the proxy for authentication and
              authorization, and to be allowed to authorize the users.
              This requires to have proxyAuthz privileges on a wide set
              of DNs, e.g.  authzTo=dn.subtree:"", and the remote server
              to have authz-policy set to to or both.  See slapd.conf(5)
              for details on these statements and for remarks and
              drawbacks about their usage.  The supported bindmethods are

              none|simple|sasl

              where none is the default, i.e. no identity assertion is
              performed.

              The authz parameter is used to instruct the SASL bind to
              exploit native SASL authorization, if available; since
              connections are cached, this should only be used when
              authorizing with a fixed identity (e.g. by means of the
              authzDN or authzID parameters).  Otherwise, the default
              proxyauthz is used, i.e. the proxyAuthz control (Proxied
              Authorization, RFC 4370) is added to all operations.

              The supported modes are:

               := {legacy|anonymous|none|self}

              If  is not present, and authzId is given, the proxy
              always authorizes that identity.   can be

              u:

              [dn:]

              The former is supposed to be expanded by the remote server
              according to the authz rules; see slapd.conf(5) for
              details.  In the latter case, whether or not the dn: prefix
              is present, the string must pass DN validation and
              normalization.

              The default mode is legacy, which implies that the proxy
              will either perform a simple bind as the authcDN or a SASL
              bind as the authcID and assert the client's identity when
              it is not anonymous.  Direct binds are always proxied.  The
              other modes imply that the proxy will always either perform
              a simple bind as the authcDN or a SASL bind as the authcID,
              unless restricted by idassert-authzFrom rules (see below),
              in which case the operation will fail; eventually, it will
              assert some other identity according to .  Other
              identity assertion modes are anonymous and self, which
              respectively mean that the empty or the client's identity
              will be asserted; none, which means that no proxyAuthz
              control will be used, so the authcDN or the authcID
              identity will be asserted.  For all modes that require the
              use of the proxyAuthz control, on the remote server the
              proxy identity must have appropriate authzTo permissions,
              or the asserted identities must have appropriate authzFrom
              permissions.  Note, however, that the ID assertion feature
              is mostly useful when the asserted identities do not exist
              on the remote server.  When bindmethod is SASL, the authcDN
              must be specified in addition to the authcID, although it
              is not used within the authentication process.

              Flags can be

              override,[non-]prescriptive,proxy-authz-[non-]critical

              When the override flag is used, identity assertion takes
              place even when the database is authorizing for the
              identity of the client, i.e. after binding with the
              provided identity, and thus authenticating it, the proxy
              performs the identity assertion using the configured
              identity and authentication method.

              When the prescriptive flag is used (the default),
              operations fail with inappropriateAuthentication for those
              identities whose assertion is not allowed by the
              idassert-authzFrom patterns.  If the non-prescriptive flag
              is used, operations are performed anonymously for those
              identities whose assertion is not allowed by the
              idassert-authzFrom patterns.

              When the proxy-authz-non-critical flag is used (the
              default), the proxyAuthz control is not marked as critical,
              in violation of RFC 4370.  Use of proxy-authz-critical is
              recommended.

              The TLS settings default to the same as the main slapd TLS
              settings, except for tls_reqcert which defaults to
              "demand", and tls_reqsan which defaults to "allow"..

              The identity associated to this directive is also used for
              privileged operations whenever idassert-bind is defined and
              acl-bind is not.  See acl-bind for details.

       idle-timeout 
              This directive causes a cached connection to be dropped an
              recreated after it has been idle for the specified time.
              The value can be specified as

              [d][h][m][[s]]

              where , ,  and  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 ::
              The keepalive parameter sets the values of idle, probes,
              and interval used to check whether a socket is alive; idle
              is the number of seconds a connection needs to remain idle
              before TCP starts sending keepalive probes; probes is the
              maximum number of keepalive probes TCP should send before
              dropping the connection; interval is interval in seconds
              between individual keepalive probes.  Only some systems
              support the customization of these values; the keepalive
              parameter is ignored otherwise, and system-wide settings
              are used.

       tcp-user-timeout 
              If non-zero, corresponds to the TCP_USER_TIMEOUT set on the
              target connections, overriding the operating system
              setting.  Only some systems support the customization of
              this parameter, it is ignored otherwise and system-wide
              settings are used.

       map {attribute|objectclass} [|*] {|*}
              This maps object classes and attributes as in the LDAP
              backend.  See slapd-ldap(5).

       network-timeout 
              Sets the network timeout value after which
              poll(2)/select(2) following a connect(2) returns in case of
              no activity.  The value is in seconds, and it can be
              specified as for idle-timeout.  If set before any target
              specification, it affects all targets, unless overridden by
              any per-target directive.

       nretries {forever|never|}
              This directive defines how many times a bind should be
              retried in case of temporary failure in contacting a
              target.  If defined before any target specification, it
              applies to all targets (by default, 3 times); the global
              value can be overridden by redefinitions inside each target
              specification.

       rewrite* ...
              The rewrite options are described in the "REWRITING"
              section.

       subtree-{exclude|include} 
              This directive allows one to indicate what subtrees are
              actually served by a target.  The syntax of the supported
              rules is

              : [dn[.