.TH SLAPD-META 5 "RELEASEDATE" "OpenLDAP LDVERSION" .\" Copyright 1998-2006 The OpenLDAP Foundation, All Rights Reserved. .\" Copying restrictions apply. See the COPYRIGHT file. .\" Copyright 2001, Pierangelo Masarati, All rights reserved. .\" $OpenLDAP$ .\" .\" Portions of this document should probably be moved to slapd-ldap(5) .\" and maybe manual pages for librewrite. .\" .SH NAME slapd-meta \- metadirectory backend .SH SYNOPSIS ETCDIR/slapd.conf .SH DESCRIPTION The .B meta backend to .BR 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). .LP A basic knowledge of the functionality of the .BR 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 .B ldap backend is intended to proxy operations directed to a single server, the .B 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. .LP Note: When looping back to the same instance of \fBslapd\fP(8), each connection requires a new thread; as a consequence, \fBslapd\fP(8) must be compiled with thread support, and the \fBthreads\fP parameter may need some tuning; in those cases, unless the multiple target feature is required, one may consider using \fBslapd-relay\fP(5) instead, which performs the relayed operation internally and thus reuses the same connection. .SH EXAMPLES There are examples in various places in this document, as well as in the slapd/back-meta/data/ directory in the OpenLDAP source tree. .SH CONFIGURATION These .B 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 .BR slapd.conf (5) manual page. .LP Note: In early versions of back-ldap and back-meta it was recommended to always set .LP .RS .nf lastmod off .fi .RE .LP for every .B ldap and .B meta database. This is 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, because the lastmod directive will be deprecated in the future. .SH SPECIAL CONFIGURATION DIRECTIVES 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: .TP .B 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. .TP .B 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 .B idle-timeout directive. .TP .B onerr {CONTINUE|stop} This directive allows to select the behavior in case an error is returned by one target during a search. The default, \fBcontinue\fP, consists in continuing the operation, trying to return as much data as possible. If this statement is set to \fBstop\fP, the search is terminated as soon as an error is returned by one target, and the error is immediately propagated to the client. .TP .B pseudoroot-bind-defer {NO|yes} This directive, when set to .BR yes , causes the authentication to the remote servers with the pseudo-root identity to be deferred until actually needed by subsequent operations. .TP .B rebind-as-user {NO|yes} If this option is given, the client's bind credentials are remembered for rebinds when chasing referrals. .SH TARGET SPECIFICATION Target specification starts with a "uri" directive: .TP .B uri ://[[:]]/ The "server" directive that was allowed in the LDAP backend (although deprecated) has been completely discarded in the Meta backend. The part can be anything .BR ldap_initialize (3) accepts ({ldap|ldaps|ldapi} and variants); and may be omitted, defaulting to whatever is set in .BR ldap.conf (5). The part is mandatory. It must end with one of the naming contexts defined for the backend, e.g.: .LP .RS .nf suffix "\fBdc=foo,dc=com\fP" uri "ldap://x.foo.com/dc=x,\fBdc=foo,dc=com\fP" .fi .RE .RS 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 argument. The URIs must be separated by TABs (e.g. '\\t'; commas or spaces, unlike back-ldap, will not work, because they are legal in the , and we don't want to use URL-encoded s), and the additional URIs must have no part. This causes the underlying library to contact the first server of the list that responds. For example, if \fIl1.foo.com\fP and \fIl2.foo.com\fP are shadows of the same server, the directive .LP .nf suffix "\fBdc=foo,dc=com\fP" uri "ldap://l1.foo.com/\fBdc=foo,dc=com\fP ldap://l2.foo.com/" .fi .RE .RS causes \fIl2.foo.com\fP to be contacted whenever \fIl1.foo.com\fP does not respond. .RE .TP .B 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. .B The acl-authcDN identity is by no means implicitly used by the proxy .B when the client connects anonymously. .TP .B acl-passwd Password used with the .B acl-authcDN above. .TP .B 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 .BR bind-timeout . The default value is used also for subsequent calls if .B bind-timeout is not specified. If set before any target specification, it affects all targets, unless overridden by any per-target directive. .TP .B chase-referrals {YES|no} enable/disable automatic referral chasing, which is delegated to the underlying libldap, with rebinding eventually performed if the \fBrebind-as-user\fP 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. .TP .B 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. .TP .B idle-timeout