1 .TH SLAPD-RELAY 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2014 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 slapd\-relay \- relay backend to slapd
10 The primary purpose of this
12 backend is to map a naming context defined in a database
15 instance into a virtual naming context, with attributeType
16 and objectClass manipulation, if required.
21 This backend and the above mentioned overlay are experimental.
25 directives apply to the relay backend database.
26 That is, they must follow a "database relay" line and come before any
27 subsequent "backend" or "database" lines.
28 Other database options are described in the
32 directive is allowed by the
36 .B relay <real naming context>
37 The naming context of the database that is presented
38 under a virtual naming context.
39 The presence of this directive implies that one specific database,
40 i.e. the one serving the
41 .BR "real naming context" ,
42 will be presented under a virtual naming context.
47 database does not automatically rewrite the naming context
48 of requests and responses.
51 overlay must be explicitly instantiated, and configured
55 directive suffices if only naming context rewriting is required.
58 One important issue is that access rules are based on the identity
59 that issued the operation.
60 After massaging from the virtual to the real naming context, the
61 frontend sees the operation as performed by the identity in the
65 bypasses the real database frontend operations by short-circuiting
66 operations through the internal backend API, the original database
67 access rules do not apply but in selected cases, i.e. when the
68 backend itself applies access control.
69 As a consequence, the instances of the relay database must provide
70 own access rules that are consistent with those of the original
71 database, possibly adding further specific restrictions.
72 So, access rules in the
74 database must refer to identities in the real naming context.
75 Examples are reported in the EXAMPLES section.
81 directive is given, the
83 database does not refer to any specific database, but the most
84 appropriate one is looked-up after rewriting the request DN
85 for the operation that is being handled.
87 This allows to write carefully crafted rewrite rules that
88 cause some of the requests to be directed to one database, and
89 some to another; e.g., authentication can be mapped to one
90 database, and searches to another, or different target databases
91 can be selected based on the DN of the request, and so.
93 Another possibility is to map the same operation to different
94 databases based on details of the virtual naming context,
95 e.g. groups on one database and persons on another.
98 To implement a plain virtual naming context mapping
99 that refers to a single database, use
103 suffix "dc=virtual,dc=naming,dc=context"
104 relay "dc=real,dc=naming,dc=context"
106 rwm\-suffixmassage "dc=real,dc=naming,dc=context"
109 To implement a plain virtual naming context mapping
110 that looks up the real naming context for each operation, use
114 suffix "dc=virtual,dc=naming,dc=context"
116 rwm\-suffixmassage "dc=real,dc=naming,dc=context"
119 This is useful, for instance, to relay different databases that
120 share the terminal portion of the naming context (the one that
123 To implement the old-fashioned suffixalias, e.g. mapping
124 the virtual to the real naming context, but not the results
125 back from the real to the virtual naming context, use
129 suffix "dc=virtual,dc=naming,dc=context"
130 relay "dc=real,dc=naming,dc=context"
132 rwm\-rewriteEngine on
133 rwm\-rewriteContext default
134 rwm\-rewriteRule "dc=virtual,dc=naming,dc=context"
135 "dc=real,dc=naming,dc=context" ":@"
136 rwm\-rewriteContext searchFilter
137 rwm\-rewriteContext searchEntryDN
138 rwm\-rewriteContext searchAttrDN
139 rwm\-rewriteContext matchedDN
144 overlay is instantiated, but the rewrite rules are written explicitly,
145 rather than automatically as with the
146 .B rwm\-suffixmassage
147 statement, to map all the virtual to real naming context data flow,
148 but none of the real to virtual.
154 suffix "dc=example,dc=com"
156 access to dn.subtree="dc=example,dc=com"
157 by dn.exact="cn=Supervisor,dc=example,dc=com" write
161 suffix "o=Example,c=US"
162 relay "dc=example,dc=com"
164 rwm\-suffixmassage "dc=example,dc=com"
166 access to dn.subtree="o=Example,c=US"
167 by dn.exact="cn=Supervisor,dc=example,dc=com" write
168 by dn.exact="cn=Relay Supervisor,dc=example,dc=com" write
172 Note that, in both databases, the identities (the
175 .BR "real naming context" ,
177 .BR "`dc=example,dc=com'" ,
178 while the targets (the
183 .BR "virtual naming context" ,
188 backend does not honor any of the access control semantics described in
189 .BR slapd.access (5);
190 all access control is delegated to the relayed database(s).
195 pseudo-attribute and to the other attribute values of the entries
198 operation is honored, which is performed by the frontend.
202 default slapd configuration file
205 .BR slapd\-config (5),