]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-relay.5
912244c1db077b9bb4265bb685b246ff188594bd
[openldap] / doc / man / man5 / slapd-relay.5
1 .TH SLAPD-RELAY 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .SH NAME
3 slapd-relay \- relay backend to slapd
4 .SH SYNOPSIS
5 ETCDIR/slapd.conf
6 .SH DESCRIPTION
7 The primary purpose of this
8 .BR slapd (8)
9 backend is to map a naming context defined in a database 
10 running in the same 
11 .BR slapd (8)
12 instance into a virtual naming context, with attributeType
13 and objectClass manipulation, if required.
14 It requires the
15 .B rewrite-remap
16 .BR overlay .
17 .LP
18 This backend and the above mentioned overlay are experimental.
19 .SH CONFIGURATION
20 These
21 .B slapd.conf
22 options 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
26 .BR slapd.conf (5)
27 manual page.
28 .TP
29 .B relay <real naming context> [massage]
30 The naming context of the database that is presented 
31 under a virtual naming context.
32 The presence of the directive implies that one single database
33 will be presented under a virtual naming context.
34 This directive automatically instantiates the 
35 .B rewrite-remap
36 .BR overlay .
37 If the optional
38 .B massage
39 keyword is present, the suffix massaging is automatically
40 configured as well.
41
42 .SH SCENARIOS
43 .LP
44 If no
45 .B relay
46 directive is given, the 
47 .B relay
48 database does not refer to any specific database, but the most
49 appropriate one is looked-up after rewriting the request DN
50 for the operation that is being handled.
51 .LP
52 This allows to write carefully crafted rewrite rules that
53 cause some of the requests to be directed to one database, and
54 some to another; e.g., authentication can be mapped to one 
55 database, and searches to another and so.
56 .LP
57 Another possibility is to map the same operation to different 
58 databases based on details of the virtual naming context,
59 e.g. groups on one database and persons on another.
60 .LP
61 .SH Caveats
62 The
63 .B rewrite-remap overlay
64 is far from complete.
65 .LP
66 .SH EXAMPLES
67 To implement a plain virtual naming context mapping
68 that refers to a single database, use
69 .LP
70 .nf
71   database        relay
72   suffix          "dc=virtual,dc=naming,dc=context"
73   relay           "dc=real,dc=naming,dc=context" massage
74 .fi
75 .LP
76 To implement a plain virtual naming context mapping
77 that looks up the real naming context for each operation, use
78 .LP
79 .nf
80   database        relay
81   suffix          "dc=virtual,dc=naming,dc=context"
82   overlay         rewrite-remap
83   suffixmassage   "dc=virtual,dc=naming,dc=context"
84           "dc=real,dc=naming,dc=context"
85 .fi
86 .LP
87 To implement the old-fashioned suffixalias, e.g. mapping
88 the virtual to the real naming context, but not the results
89 back from the real to the virtual naming context, use
90 .LP
91 .nf
92   database        relay
93   suffix          "dc=virtual,dc=naming,dc=context"
94   relay           "dc=real,dc=naming,dc=context"
95   rewriteEngine   on
96   rewriteContext  default
97   rewriteRule     "dc=virtual,dc=naming,dc=context"
98           "dc=real,dc=naming,dc=context" ":"
99   rewriteRule     searchFilter
100   rewriteRule     searchResult
101   rewriteRule     searchResultAttrDN
102   rewriteRule     matchedDN
103 .fi
104 .LP
105 Note that the virtual database is bound to a single real database,
106 so the 
107 .B rewrite-remap overlay
108 is automatically instantiated, but the rewrite rules 
109 are written explicitly to map all the virtual to real 
110 naming context data flow, but none of the real to virtual.
111 .SH FILES
112 .TP
113 ETCDIR/slapd.conf
114 default slapd configuration file
115 .SH SEE ALSO
116 .BR slapd.conf (5),
117 .BR slapd (8).