NAME
slapd-relay - relay backend to slapd
SYNOPSIS
/etc/openldap/slapd.confDESCRIPTION
The primary purpose of this ssllaappdd(8) backend is to map a naming contextdefined in a database running in the same ssllaappdd(8) instance into a vir-
tual naming context, with attributeType and objectClass manipulation, if required. It requires the rrwwmm oovveerrllaayy. This backend and the above mentioned overlay are experimental. CCOONNFFIIGGUURRAATTIIOONNThe following ssllaappdd..ccoonnff directives apply to the relay backend data-
base. That is, they must follow a "database relay" line and come before any subsequent "backend" or "database" lines. Other database options are described in the ssllaappdd..ccoonnff(5) manual page; only the ssuuffffiixx directive is required by the relay backend. rreellaayy <> [[mmaassssaaggee]] 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 rreeaall nnaammiinngg ccoonntteexxtt, will be presented under a virtual naming context. This directive automatically instantiates the rwm overlay. If the optional mmaassssaaggee keyword is present, the suffix massaging is automatically configured as well; otherwise, specific massaging instructions are required by means of the rewrite directives described in ssllaappoo-rrwwmm(5).
AACCCCEESSSS RRUULLEESS One important issue is that access rules are based on the identity that issued the operation. After massaging from the virtual to the real naming context, the frontend sees the operation as performed by theidentity in the real naming context. Moreover, since bbaacckk-rreellaayy
bypasses the real database frontend operations by short-circuiting
operations thru the internal backend API, the original database access rules do not apply but in selected cases, i.e. when the backend itself applies access control. As a consequence, the instances of the relay database must provide own access rules that are consistent with thoseof the original database, possibly adding further specific restric-
tions. So, access rules in the rreellaayy database must refer to identitiesin the real naming context. Examples are reported in the EXAMPLES sec-
tion. SSCCEENNAARRIIOOSS If no rreellaayy directive is given, the relay database does not refer toany specific database, but the most appropriate one is looked-up after
rewriting the request DN for the operation that is being handled. This allows 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. CCaavveeaattss The rrwwmm oovveerrllaayy is experimental. EEXXAAMMPPLLEESS To implement a plain virtual naming context mapping that refers to a single database, use database relay suffix "dc=virtual,dc=naming,dc=context" relay "dc=real,dc=naming,dc=context" massage 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 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" rewriteEngine on rewriteContext default rewriteRule "dc=virtual,dc=naming,dc=context" "dc=real,dc=naming,dc=context" ":@" rewriteContext searchFilter rewriteContext searchEntryDN rewriteContext searchAttrDN rewriteContext matchedDN Note that the virtual database is bound to a single real database, so the rrwwmm oovveerrllaayy is automatically instantiated, but the rewrite rules are written explicitly to map all the virtual to real naming context data flow, but none of the real to virtual. Access rules: database bdb 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" massage# 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 <> clause) are in the rreeaall nnaammiinngg ccoonntteexxtt, i.e. ``ddcc==eexxaammppllee,,ddcc==ccoomm'', while the targets (the < > clause) are in the rreeaall and in the vviirrttuuaall nnaammiinngg ccoonntteexxtt, respectively. AACCCCEESSSS CCOONNTTRROOLL The rreellaayy backend does not honor any of the access control semantics described in ssllaappdd..aacccceessss(5); all access control is delegated to the relayed database(s). Only rreeaadd ((==rr)) access to the eennttrryy pseudo-
attribute and to the other attribute values of the entries returned by the sseeaarrcchh operation is honored, which is performed by the frontend. FILES /etc/openldap/slapd.conf default slapd configuration fileSEE ALSO
ssllaappdd..ccoonnff(5), ssllaappoo-rrwwmm(5), ssllaappdd(8).
OpenLDAP 2.3.27 2006/08/19 SLAPD-RELAY(5)