1 .TH SLAPD-RELAY 5 "RELEASEDATE" "OpenLDAP LDVERSION"
3 slapd-relay \- relay backend to slapd
7 The primary purpose of this
9 backend is to map a naming context defined in a database
12 instance into a virtual naming context, with attributeType
13 and objectClass manipulation, if required.
18 This backend and the above mentioned overlay are experimental.
22 directives apply to the relay backend database.
23 That is, they must follow a "database relay" line and come before any
24 subsequent "backend" or "database" lines.
25 Other database options are described in the
29 directive is required by the
33 .B relay <real naming context> [massage]
34 The naming context of the database that is presented
35 under a virtual naming context.
36 The presence of this directive implies that one specific database,
37 i.e. the one serving the
38 .BR "real naming context" ,
39 will be presented under a virtual naming context.
40 This directive automatically instantiates the
44 keyword is present, the suffix massaging is automatically
45 configured as well; otherwise, specific massaging instructions
46 are required by means of the
48 directives described in
52 One important issue is that access rules are based on the identity
53 that issued the operation.
54 After massaging from the virtual to the real naming context, the
55 frontend sees the operation as performed by the identity in the
59 bypasses the real database frontend operations by short-circuiting
60 operations thru the internal backend API, the original database
61 access rules do not apply but in selected cases, i.e. when the
62 backend itself applies access control.
63 As a consequence, the instances of the relay database must provide
64 own access rules that are consistent with those of the original
65 database, possibly adding further specific restrictions.
66 So, access rules in the
68 database must refer to identities in the real naming context.
69 Examples are reported in the EXAMPLES section.
75 directive is given, the
77 database does not refer to any specific database, but the most
78 appropriate one is looked-up after rewriting the request DN
79 for the operation that is being handled.
81 This allows to write carefully crafted rewrite rules that
82 cause some of the requests to be directed to one database, and
83 some to another; e.g., authentication can be mapped to one
84 database, and searches to another, or different target databases
85 can be selected based on the DN of the request, and so.
87 Another possibility is to map the same operation to different
88 databases based on details of the virtual naming context,
89 e.g. groups on one database and persons on another.
97 To implement a plain virtual naming context mapping
98 that refers to a single database, use
102 suffix "dc=virtual,dc=naming,dc=context"
103 relay "dc=real,dc=naming,dc=context" massage
106 To implement a plain virtual naming context mapping
107 that looks up the real naming context for each operation, use
111 suffix "dc=virtual,dc=naming,dc=context"
113 suffixmassage "dc=real,dc=naming,dc=context"
116 This is useful, for instance, to relay different databases that
117 share the terminal portion of the naming context (the one that
120 To implement the old-fashioned suffixalias, e.g. mapping
121 the virtual to the real naming context, but not the results
122 back from the real to the virtual naming context, use
126 suffix "dc=virtual,dc=naming,dc=context"
127 relay "dc=real,dc=naming,dc=context"
129 rewriteContext default
130 rewriteRule "dc=virtual,dc=naming,dc=context"
131 "dc=real,dc=naming,dc=context" ":@"
132 rewriteContext searchFilter
133 rewriteContext searchEntryDN
134 rewriteContext searchAttrDN
135 rewriteContext matchedDN
138 Note that the virtual database is bound to a single real database,
141 is automatically instantiated, but the rewrite rules
142 are written explicitly to map all the virtual to real
143 naming context data flow, but none of the real to virtual.
149 suffix "dc=example,dc=com"
151 access to dn.subtree="dc=example,dc=com"
152 by dn.exact="cn=Supervisor,dc=example,dc=com" write
156 suffix "o=Example,c=US"
157 relay "dc=example,dc=com" massage
159 access to dn.subtree="o=Example,c=US"
160 by dn.exact="cn=Supervisor,dc=example,dc=com" write
161 by dn.exact="cn=Relay Supervisor,dc=example,dc=com" write
165 Note that, in both databases, the identities (the
168 .BR "real naming context" ,
170 .BR "`dc=example,dc=com'" ,
171 while the targets (the
176 .BR "virtual naming context" ,
181 backend does not honor any of the access control semantics described in
182 .BR slapd.access (5);
183 all access control is delegated to the relayed database(s).
188 pseudo-attribute and to the other attribute values of the entries
191 operation is honored, which is performed by the frontend.
195 default slapd configuration file