]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-ldap.5
clarify the use of regex and expand in by dn clauses
[openldap] / doc / man / man5 / slapd-ldap.5
1 .TH SLAPD-LDAP 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2004 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd-ldap \- LDAP backend to slapd
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The LDAP backend to
11 .BR slapd (8)
12 is not an actual database; instead it acts as a proxy to forward incoming
13 requests to another LDAP server. While processing requests it will also
14 chase referrals, so that referrals are fully processed instead of being
15 returned to the slapd client.
16
17 Sessions that explicitly Bind to the back-ldap database always create their
18 own private connection to the remote LDAP server. Anonymous sessions will
19 share a single anonymous connection to the remote server. For sessions bound
20 through other mechanisms, all sessions with the same DN will share the
21 same connection. This connection pooling strategy can enhance the proxy's
22 efficiency by reducing the overhead of repeatedly making/breaking multiple
23 connections.
24
25 The ldap database can also act as an information service, i.e. the identity
26 of locally authenticated clients is asserted to the remote server, possibly
27 in some modified form.
28 For this purpose, the proxy binds to the remote server with some 
29 administrative identity, and, if required, authorizes the asserted identity.
30 See the 
31 .IR idassert- *
32 rules below.
33 The administrative identity of the proxy, on the remote server, must be 
34 allowed to authorize by means of appropriate
35 .B authzTo
36 rules; see 
37 .BR slapd.conf (5)
38 for details.
39
40 .SH CONFIGURATION
41 These
42 .B slapd.conf
43 options apply to the LDAP backend database.
44 That is, they must follow a "database ldap" line and come before any
45 subsequent "backend" or "database" lines.
46 Other database options are described in the
47 .BR slapd.conf (5)
48 manual page.
49 .LP
50 Note: It is strongly recommended to set
51 .LP
52 .RS
53 .nf
54 lastmod  off
55 .fi
56 .RE
57 .LP
58 for every
59 .B ldap
60 and
61 .B meta
62 database.
63 This is because operational attributes related to entry creation and
64 modification should not be used, as they could be passed to the target
65 servers, generating an error.
66 .TP
67 .B uri <ldapurl>
68 LDAP server to use.  Multiple URIs can be set in in a single
69 .B ldapurl
70 argument, resulting in the underlying library automatically 
71 call the first server of the list that responds, e.g. 
72
73 \fBuri "ldap://host/ ldap://backup-host"\fP
74
75 The URI list is space- or comma-separated.
76 .TP
77 .B server <hostport>
78 Obsolete option; same as `uri ldap://<hostport>/'.
79 .TP
80 .B acl-authcDN "<administrative DN for access control purposes>"
81 DN which is used to query the target server for acl checking; it
82 should have read access on the target server to attributes used on the
83 proxy for acl checking.
84 There is no risk of giving away such values; they are only used to
85 check permissions.
86 .B The acl-authcDN identity is by no means implicitly used by the proxy 
87 .B when the client connects anonymously.
88 .TP
89 .B acl-passwd <password>
90 Password used with the bind DN above.
91 .TP
92 .B idassert-authcdn "<administrative DN for proxyAuthz purposes>"
93 DN which is used to propagate the client's identity to the target
94 by means of the proxyAuthz control when the client does not
95 belong to the DIT fragment that is being proxyied by back-ldap.
96 This is useful when operations performed by users bound to another 
97 backend are propagated through back-ldap.
98 This requires the entry with 
99 .B idassert-authcdn
100 identity on the remote server to have
101 .B proxyAuthz
102 privileges on a wide set of DNs, e.g.
103 .BR authzTo=dn.subtree:"" ,
104 and the remote server to have
105 .B authz-policy
106 set to 
107 .B to
108 or 
109 .BR both .
110 See 
111 .BR slapd.conf (5)
112 for details on these statements and for remarks and drawbacks about
113 their usage.
114 .TP
115 .B idassert-passwd <password>
116 Password used with the proxy authzDN above.
117 .TP
118 .B idassert-mode <mode>
119 defines what type of
120 .I identity assertion
121 is used.
122 The supported modes are:
123 .RS
124 .RS
125 .TP
126 .B <mode>={legacy|anonymous|none|<id>|self}
127 .RE
128 .RS
129 .B <id>={u:<ID>|[dn:]<DN>}
130 .RE
131
132 The default is 
133 .BR legacy ,
134 which implies that the proxy will bind as
135 .I idassert-authcdn
136 and assert the client's identity when it is not anonymous.
137 Direct binds are always proxied.
138 The other modes imply that the proxy will always bind as 
139 .IR idassert-authcdn ,
140 unless restricted by
141 .BR idassert-authzFrom
142 rules (see below), in which case the operation will fail;
143 eventually, it will assert some other identity according to
144 .BR <mode> .
145 Other identity assertion modes are
146 .BR anonymous
147 and
148 .BR self ,
149 which respectively mean that the 
150 .I empty 
151 or the 
152 .IR client 's 
153 identity
154 will be asserted;
155 .BR none ,
156 which means that no proxyAuthz control will be used, so the
157 .I idassert-authcdn
158 identity will be asserted.
159 Moreover, if a string prefixed with
160 .B u:
161 or 
162 .B dn:
163 is used as 
164 .BR <mode> ,
165 that identity will be asserted.
166 Ths string is also treated as a DN if it is not prefixed
167 by any recognized type indicator.  Whether or not the 
168 .B dn: 
169 prefix is present, the string must pass DN validation and normalization.
170 For all modes that require the use of the
171 .I proxyAuthz 
172 control, on the remote server the proxy identity must have appropriate 
173 .I authzTo
174 permissions, or the asserted identities must have appropriate
175 .I authzFrom 
176 permissions.  Note, however, that the ID assertion feature is mostly 
177 useful when the asserted identities do not exist on the remote server.
178 .RE
179 .TP
180 .B idassert-authzFrom <authz>
181 if defined, selects what
182 .I local
183 identities are authorized to exploit the identity assertion feature.
184 The string
185 .B authz 
186 follows the rules defined for the
187 .I authzFrom
188 attribute.
189 See 
190 .BR slapd.conf (5),
191 section related to
192 .BR authz-policy ,
193 for details on the supported syntaxes.
194 .TP
195 .B idassert-method <method> [<saslargs>]
196 where valid method values are
197 .RS
198 .TP
199 .B <method>={none|simple|sasl}
200 .RE
201 .RS
202 .B <saslargs>=[mech=<mech>] [realm=<realm>] [authcid=<authcid>] [cred=<cred>]
203
204 .RE
205 .RS
206 If method is 
207 .IR sasl ,
208 extra parameters can be given a described above.
209 The default is
210 .BR simple ;
211 .B none
212 inhibits proxy authorization;
213 .B sasl
214 uses a SASL bind with the above parameters; if required,
215 .I authorization
216 is performed by means of native SASL mechanism, and no proxyAuthz
217 is used for subsequent operations.
218 .RE
219 .TP
220 .B proxy-whoami
221 Turns on proxying of the WhoAmI extended operation. If this option is
222 given, back-ldap will replace slapd's original WhoAmI routine with its
223 own. On slapd sessions that were authenticated by back-ldap, the WhoAmI
224 request will be forwarded to the remote LDAP server. Other sessions will
225 be handled by the local slapd, as before. This option is mainly useful
226 in conjunction with Proxy Authorization.
227 .TP
228 .B rebind-as-user
229 If this option is given, the client's bind credentials are remembered
230 for rebinds when chasing referrals.
231 .TP
232 .B suffixmassage <suffix> <massaged (remote) suffix>
233 DNs ending with <suffix> in a request are changed to end with <remote
234 suffix> before sending the request to the remote server, and <remote
235 suffix> in the results are changed back to <suffix> before returning
236 them to the client.
237 The <suffix> field must be defined as a valid suffix
238 for the current database.
239 .TP
240 .B map "{attribute | objectclass} [<local name> | *] {<foreign name> | *}"
241 Map attribute names and object classes from the foreign server to
242 different values on the local slapd.
243 The reason is that some attributes might not be part of the local
244 slapd's schema, some attribute names might be different but serve the
245 same purpose, etc.
246 If local or foreign name is `*', the name is preserved.
247 If local name is omitted, the foreign name is removed.
248 Unmapped names are preseved if both local and foreign name are `*',
249 and removed if local name is omitted and foreign name is `*'.
250 .TP
251 .B rewrite*
252 The rewrite options are described in the "REWRITING" section of the
253 .BR slapd-meta (5)
254 manual page.
255 .SH EXAMPLES
256 The following directives map the object class `groupOfNames' to
257 the object class `groupOfUniqueNames' and the attribute type
258 `member' to the attribute type `uniqueMember':
259 .LP
260 .RS
261 .nf
262 map objectclass groupOfNames groupOfUniqueNames
263 map attribute uniqueMember member
264 .fi
265 .RE
266 .LP
267 This presents a limited attribute set from the foreign
268 server:
269 .LP
270 .RS
271 .nf
272 map attribute cn *
273 map attribute sn *
274 map attribute manager *
275 map attribute description *
276 map attribute *
277 .fi
278 .RE
279 .LP
280 These lines map cn, sn, manager, and description to themselves, and 
281 any other attribute gets "removed" from the object before it is sent 
282 to the client (or sent up to the LDAP server).  This is obviously a 
283 simplistic example, but you get the point.
284 .SH FILES
285 .TP
286 ETCDIR/slapd.conf
287 default slapd configuration file
288 .SH SEE ALSO
289 .BR slapd.conf (5),
290 .BR slapd-meta (5),
291 .BR slapd (8),
292 .BR ldap (3).
293 .SH AUTHOR
294 Howard Chu, with enhancements by Pierangelo Masarati