]> git.sur5r.net Git - openldap/blob - servers/slapd/back-relay/README
36f64e9582a03aeb7237f7c65f3a08945a913587
[openldap] / servers / slapd / back-relay / README
1 Relay backend sets up a relay virtual database that allows
2 to access other databases in the same instance of slapd
3 through different naming contexts and remapping attribute 
4 values.
5
6 The DN rewrite, filter rewrite and attributeType/objectClass
7 mapping is done by means of the rewrite-remap overlay.
8
9 The database containing the real naming context can be
10 explicitly selected by means of the "relay" directive,
11 which must contain the naming context of the target 
12 database.  This also causes the rewrite-remap overlay 
13 to be automatically instantiated.  If the optional keyword 
14 "massage" is present, the rewrite-remap overlay is 
15 automatically configured to map the virtual to the real 
16 naming context and vice-versa; in this case, the "suffix" 
17 directive must precede the "relay" directive.
18
19 Otherwise, the rewrite-remap overlay must be explicitly
20 instantiated, by using the "overlay" directive, as 
21 illustrated below.  This allows much more freedom in target 
22 database selection and DN rewriting.
23
24 If the "relay" directive is not present, the backend is
25 not bound to a single target database; on the contrary,
26 the target database is selected on a per-operation basis.
27
28 This allows, for instance, to relay one database for 
29 authentication and anothe for search/modify, or allows
30 to use one target for persons and another for groups
31 and so on.
32
33 # automatically massage from virtual to real naming context
34 database        relay
35 suffix          "dc=virtual,dc=naming,dc=context"
36 relay           "dc=real,dc=naming,dc=context" massage
37
38 # explicitly massage (same as above)
39 database        relay
40 suffix          "dc=virtual,dc=naming,dc=context"
41 overlay         rewrite-remap
42 suffixmassage   "dc=virtual,dc=naming,dc=context" \
43                         "dc=real,dc=naming,dc=context"
44
45 # old fashioned suffixalias, applied also to DN-valued attributes
46 # from virtual to real naming context, but not the reverse...
47 database        relay
48 suffix          "dc=virtual,dc=naming,dc=context"
49 overlay         rewrite-remap
50 rewriteEngine   on
51 rewriteContext  default
52 rewriteRule     "(.*)dc=virtual,dc=naming,dc=context$" \
53                         "$1dc=real,dc=naming,dc=context"
54