xref: /netbsd-src/external/bsd/openldap/dist/servers/slapd/back-relay/README (revision 2de962bd804263c16657f586aa00f1704045df8e)
1*2de962bdSlukemRelay backend sets up a relay virtual database that allows
2*2de962bdSlukemto access other databases in the same instance of slapd
3*2de962bdSlukemthrough different naming contexts and remapping attribute
4*2de962bdSlukemvalues.
5*2de962bdSlukem
6*2de962bdSlukemThe DN rewrite, filter rewrite and attributeType/objectClass
7*2de962bdSlukemmapping is done by means of the rewrite-remap overlay.
8*2de962bdSlukem
9*2de962bdSlukemThe database containing the real naming context can be
10*2de962bdSlukemexplicitly selected by means of the "relay" directive,
11*2de962bdSlukemwhich must contain the naming context of the target
12*2de962bdSlukemdatabase.  This also causes the rewrite-remap overlay
13*2de962bdSlukemto be automatically instantiated.  If the optional keyword
14*2de962bdSlukem"massage" is present, the rewrite-remap overlay is
15*2de962bdSlukemautomatically configured to map the virtual to the real
16*2de962bdSlukemnaming context and vice-versa.
17*2de962bdSlukem
18*2de962bdSlukemOtherwise, the rewrite-remap overlay must be explicitly
19*2de962bdSlukeminstantiated, by using the "overlay" directive, as
20*2de962bdSlukemillustrated below.  This allows much more freedom in target
21*2de962bdSlukemdatabase selection and DN rewriting.
22*2de962bdSlukem
23*2de962bdSlukemIf the "relay" directive is not present, the backend is
24*2de962bdSlukemnot bound to a single target database; on the contrary,
25*2de962bdSlukemthe target database is selected on a per-operation basis.
26*2de962bdSlukem
27*2de962bdSlukemThis allows, for instance, to relay one database for
28*2de962bdSlukemauthentication and anotheir for search/modify, or allows
29*2de962bdSlukemto use one target for persons and another for groups
30*2de962bdSlukemand so on.
31*2de962bdSlukem
32*2de962bdSlukemTo summarize: the "relay" directive:
33*2de962bdSlukem- explicitly bounds the database to a single database
34*2de962bdSlukem  holding the real naming context;
35*2de962bdSlukem- automatically instantiates the rewrite-remap overlay;
36*2de962bdSlukem- automatically configures the naming context massaging
37*2de962bdSlukem  if the optional "massage" keyword is added
38*2de962bdSlukem
39*2de962bdSlukemIf the "relay" directive is not used, the rewrite-remap
40*2de962bdSlukemoverlay must be explicitly instantiated and the massaging
41*2de962bdSlukemmust be configured, either by using the "suffixmassage"
42*2de962bdSlukemdirective, or by issuing more sophisticate rewrite
43*2de962bdSlukeminstructions.
44*2de962bdSlukem
45*2de962bdSlukemAttributeType/objectClass mapping must be explicitly
46*2de962bdSlukemrequired.
47*2de962bdSlukem
48*2de962bdSlukemNote that the rewrite-remap overlay is not complete nor
49*2de962bdSlukemproduction- ready yet.
50*2de962bdSlukemExamples are given of all the suggested usages.
51*2de962bdSlukem
52*2de962bdSlukem# automatically massage from virtual to real naming context
53*2de962bdSlukemdatabase	relay
54*2de962bdSlukemsuffix		"dc=virtual,dc=naming,dc=context"
55*2de962bdSlukemrelay		"dc=real,dc=naming,dc=context" massage
56*2de962bdSlukem
57*2de962bdSlukem# explicitly massage (same as above)
58*2de962bdSlukemdatabase	relay
59*2de962bdSlukemsuffix		"dc=virtual,dc=naming,dc=context"
60*2de962bdSlukemrelay		"dc=real,dc=naming,dc=context"
61*2de962bdSlukemsuffixmassage	"dc=virtual,dc=naming,dc=context" \
62*2de962bdSlukem			"dc=real,dc=naming,dc=context"
63*2de962bdSlukem
64*2de962bdSlukem# explicitly massage (same as above, but dynamic backend resolution)
65*2de962bdSlukemdatabase	relay
66*2de962bdSlukemsuffix		"dc=virtual,dc=naming,dc=context"
67*2de962bdSlukemoverlay		rewrite-remap
68*2de962bdSlukemsuffixmassage	"dc=virtual,dc=naming,dc=context" \
69*2de962bdSlukem			"dc=real,dc=naming,dc=context"
70*2de962bdSlukem
71*2de962bdSlukem# old fashioned suffixalias, applied also to DN-valued attributes
72*2de962bdSlukem# from virtual to real naming context, but not the reverse...
73*2de962bdSlukemdatabase	relay
74*2de962bdSlukemsuffix		"dc=virtual,dc=naming,dc=context"
75*2de962bdSlukemrelay		"dc=real,dc=naming,dc=context"
76*2de962bdSlukemrewriteContext	default
77*2de962bdSlukemrewriteRule	"(.*)dc=virtual,dc=naming,dc=context$" \
78*2de962bdSlukem			"$1dc=real,dc=naming,dc=context"
79*2de962bdSlukemrewriteContext	searchFilter
80*2de962bdSlukemrewriteContext	searchResult
81*2de962bdSlukemrewriteContext	searchResultAttrDN
82*2de962bdSlukemrewriteContext	matchedDN
83*2de962bdSlukem
84