Copying restrictions apply. See COPYRIGHT/LICENSE.
$OpenLDAP$
This backend and the above mentioned overlay are experimental.
relay <real naming context> The naming context of the database that is presented under a virtual naming context. The presence of this directive implies that one specific database, i.e. the one serving the "real naming context" , will be presented under a virtual naming context.
If no relay directive is given, the relay database does not refer to any specific database, but the most appropriate one is looked-up after rewriting the request DN for the operation that is being handled.
This allows one to write carefully crafted rewrite rules that cause some of the requests to be directed to one database, and some to another; e.g., authentication can be mapped to one database, and searches to another, or different target databases can be selected based on the DN of the request, and so.
Another possibility is to map the same operation to different databases based on details of the virtual naming context, e.g. groups on one database and persons on another.
database relay suffix "dc=virtual,dc=naming,dc=context" relay "dc=real,dc=naming,dc=context" overlay rwm rwm-suffixmassage "dc=real,dc=naming,dc=context"
To implement a plain virtual naming context mapping that looks up the real naming context for each operation, use
database relay suffix "dc=virtual,dc=naming,dc=context" overlay rwm rwm-suffixmassage "dc=real,dc=naming,dc=context"
This is useful, for instance, to relay different databases that share the terminal portion of the naming context (the one that is rewritten).
To implement the old-fashioned suffixalias, e.g. mapping the virtual to the real naming context, but not the results back from the real to the virtual naming context, use
database relay suffix "dc=virtual,dc=naming,dc=context" relay "dc=real,dc=naming,dc=context" overlay rwm rwm-rewriteEngine on rwm-rewriteContext default rwm-rewriteRule "dc=virtual,dc=naming,dc=context" "dc=real,dc=naming,dc=context" ":@" rwm-rewriteContext searchFilter rwm-rewriteContext searchEntryDN rwm-rewriteContext searchAttrDN rwm-rewriteContext matchedDN
Note that the slapo-rwm (5) overlay is instantiated, but the rewrite rules are written explicitly, rather than automatically as with the rwm-suffixmassage statement, to map all the virtual to real naming context data flow, but none of the real to virtual.
Access rules:
database mdb suffix "dc=example,dc=com" # skip... access to dn.subtree="dc=example,dc=com" by dn.exact="cn=Supervisor,dc=example,dc=com" write by * read database relay suffix "o=Example,c=US" relay "dc=example,dc=com" overlay rwm rwm-suffixmassage "dc=example,dc=com" # skip ... access to dn.subtree="o=Example,c=US" by dn.exact="cn=Supervisor,dc=example,dc=com" write by dn.exact="cn=Relay Supervisor,dc=example,dc=com" write by * read
Note that, in both databases, the identities (the <who> clause) are in the "real naming context" , i.e. "`dc=example,dc=com'" , while the targets (the <what> clause) are in the real and in the "virtual naming context" , respectively.
ETCDIR/slapd.conf default slapd configuration file