~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to doc/man/man5/slapd-relay.5

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-07-10 14:45:49 UTC
  • Revision ID: james.westby@ubuntu.com-20080710144549-wck73med0e72gfyo
Tags: upstream-2.4.10
ImportĀ upstreamĀ versionĀ 2.4.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
.BR slapo-rwm (5)
 
16
overlay.
 
17
.LP
 
18
This backend and the above mentioned overlay are experimental.
 
19
.SH CONFIGURATION
 
20
The following
 
21
.B slapd.conf
 
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
 
26
.BR slapd.conf (5)
 
27
manual page; only the
 
28
.B suffix
 
29
directive is allowed by the 
 
30
.I relay
 
31
backend.
 
32
.TP
 
33
.B relay <real naming context>
 
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
 
 
41
.SH MASSAGING
 
42
The
 
43
.B relay
 
44
database does not automatically rewrite the naming context
 
45
of requests and responses.
 
46
For this purpose, the
 
47
.BR slapo-rwm (5)
 
48
overlay must be explicitly instantiated, and configured
 
49
as appropriate.
 
50
Usually, the
 
51
.B rwm-suffixmassage
 
52
directive suffices if only naming context rewriting is required.
 
53
 
 
54
.SH ACCESS RULES
 
55
One important issue is that access rules are based on the identity
 
56
that issued the operation.
 
57
After massaging from the virtual to the real naming context, the
 
58
frontend sees the operation as performed by the identity in the
 
59
real naming context.
 
60
Moreover, since
 
61
.B back-relay
 
62
bypasses the real database frontend operations by short-circuiting
 
63
operations through the internal backend API, the original database
 
64
access rules do not apply but in selected cases, i.e. when the
 
65
backend itself applies access control.
 
66
As a consequence, the instances of the relay database must provide
 
67
own access rules that are consistent with those of the original
 
68
database, possibly adding further specific restrictions.
 
69
So, access rules in the
 
70
.B relay
 
71
database must refer to identities in the real naming context.
 
72
Examples are reported in the EXAMPLES section.
 
73
 
 
74
.SH SCENARIOS
 
75
.LP
 
76
If no
 
77
.B relay
 
78
directive is given, the 
 
79
.I relay
 
80
database does not refer to any specific database, but the most
 
81
appropriate one is looked-up after rewriting the request DN
 
82
for the operation that is being handled.
 
83
.LP
 
84
This allows to write carefully crafted rewrite rules that
 
85
cause some of the requests to be directed to one database, and
 
86
some to another; e.g., authentication can be mapped to one 
 
87
database, and searches to another, or different target databases
 
88
can be selected based on the DN of the request, and so.
 
89
.LP
 
90
Another possibility is to map the same operation to different 
 
91
databases based on details of the virtual naming context,
 
92
e.g. groups on one database and persons on another.
 
93
.LP
 
94
.SH EXAMPLES
 
95
To implement a plain virtual naming context mapping
 
96
that refers to a single database, use
 
97
.LP
 
98
.nf
 
99
  database                relay
 
100
  suffix                  "dc=virtual,dc=naming,dc=context"
 
101
  relay                   "dc=real,dc=naming,dc=context"
 
102
  overlay                 rwm
 
103
  rwm-suffixmassage       "dc=real,dc=naming,dc=context"
 
104
.fi
 
105
.LP
 
106
To implement a plain virtual naming context mapping
 
107
that looks up the real naming context for each operation, use
 
108
.LP
 
109
.nf
 
110
  database                relay
 
111
  suffix                  "dc=virtual,dc=naming,dc=context"
 
112
  overlay                 rwm
 
113
  rwm-suffixmassage       "dc=real,dc=naming,dc=context"
 
114
.fi
 
115
.LP
 
116
This is useful, for instance, to relay different databases that
 
117
share the terminal portion of the naming context (the one that
 
118
is rewritten).
 
119
.LP
 
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
 
123
.LP
 
124
.nf
 
125
  database                relay
 
126
  suffix                  "dc=virtual,dc=naming,dc=context"
 
127
  relay                   "dc=real,dc=naming,dc=context"
 
128
  overlay                 rwm
 
129
  rwm-rewriteEngine       on
 
130
  rwm-rewriteContext      default
 
131
  rwm-rewriteRule         "dc=virtual,dc=naming,dc=context"
 
132
                          "dc=real,dc=naming,dc=context" ":@"
 
133
  rwm-rewriteContext      searchFilter
 
134
  rwm-rewriteContext      searchEntryDN
 
135
  rwm-rewriteContext      searchAttrDN
 
136
  rwm-rewriteContext      matchedDN
 
137
.fi
 
138
.LP
 
139
Note that the 
 
140
.BR slapo-rwm (5)
 
141
overlay is instantiated, but the rewrite rules are written explicitly,
 
142
rather than automatically as with the
 
143
.B rwm-suffixmassage
 
144
statement, to map all the virtual to real naming context data flow,
 
145
but none of the real to virtual.
 
146
.LP
 
147
Access rules:
 
148
.LP
 
149
.nf
 
150
  database                bdb
 
151
  suffix                  "dc=example,dc=com"
 
152
  # skip...
 
153
  access to dn.subtree="dc=example,dc=com"
 
154
          by dn.exact="cn=Supervisor,dc=example,dc=com" write
 
155
          by * read
 
156
 
 
157
  database                relay
 
158
  suffix                  "o=Example,c=US"
 
159
  relay                   "dc=example,dc=com"
 
160
  overlay                 rwm
 
161
  rwm-suffixmassage       "dc=example,dc=com"
 
162
  # skip ...
 
163
  access to dn.subtree="o=Example,c=US"
 
164
          by dn.exact="cn=Supervisor,dc=example,dc=com" write
 
165
          by dn.exact="cn=Relay Supervisor,dc=example,dc=com" write
 
166
          by * read
 
167
.fi
 
168
.LP
 
169
Note that, in both databases, the identities (the 
 
170
.B <who> 
 
171
clause) are in the
 
172
.BR "real naming context" ,
 
173
i.e.
 
174
.BR "`dc=example,dc=com'" ,
 
175
while the targets (the 
 
176
.B <what> 
 
177
clause) are in the
 
178
.B real
 
179
and in the
 
180
.BR "virtual naming context" ,
 
181
respectively.
 
182
.SH ACCESS CONTROL
 
183
The
 
184
.B relay
 
185
backend does not honor any of the access control semantics described in
 
186
.BR slapd.access (5);
 
187
all access control is delegated to the relayed database(s).
 
188
Only
 
189
.B read (=r)
 
190
access to the
 
191
.B entry
 
192
pseudo-attribute and to the other attribute values of the entries
 
193
returned by the
 
194
.B search
 
195
operation is honored, which is performed by the frontend.
 
196
.SH FILES
 
197
.TP
 
198
ETCDIR/slapd.conf
 
199
default slapd configuration file
 
200
.SH SEE ALSO
 
201
.BR slapd.conf (5),
 
202
.BR slapo-rwm (5),
 
203
.BR slapd (8).