]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.access.5
db0a91e844ec94c323264d0001ec5f8b91d50feb
[openldap] / doc / man / man5 / slapd.access.5
1 .TH SLAPD.ACCESS 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2003 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .SH NAME
5 slapd.access \- access configuration for slapd, the stand-alone LDAP daemon
6 .SH SYNOPSIS
7 ETCDIR/slapd.conf
8 .SH DESCRIPTION
9 The 
10 .BR slapd.conf (5)
11 file contains configuration information for the
12 .BR slapd (8)
13 daemon. This configuration file is also used by the
14 .BR slurpd (8)
15 replication daemon and by the SLAPD tools
16 .BR slapadd (8),
17 .BR slapcat (8),
18 and
19 .BR slapindex (8).
20 .LP
21 The
22 .B slapd.conf
23 file consists of a series of global configuration options that apply to
24 .B slapd
25 as a whole (including all backends), followed by zero or more database
26 backend definitions that contain information specific to a backend
27 instance.
28 .LP
29 The general format of
30 .B slapd.conf
31 is as follows:
32 .LP
33 .nf
34     # comment - these options apply to every database
35     <global configuration options>
36     # first database definition & configuration options
37     database    <backend 1 type>
38     <configuration options specific to backend 1>
39     # subsequent database definitions & configuration options
40     ...
41 .fi
42 .LP
43 Both the global configuration and each backend-specific section can contain
44 access information.
45 Backend-specific access control directives are used for those entries
46 that belong to the backend, according to their naming context.
47 In case no access control directives are defined for a backend, 
48 the appropriate directives from the global configuration section
49 are used.
50 .LP
51 Arguments that should be replaced by actual text are shown in brackets <>.
52 The structure of the access control directives is
53 .TP
54 .B access to <what> "[ by <who> <access> [ <control> ] ]+"
55 Grant access (specified by 
56 .BR <access> ) 
57 to a set of entries and/or attributes (specified by 
58 .BR <what> ) 
59 by one or more requestors (specified by 
60 .BR <who> ).
61 .LP
62 The field
63 .BR <what>
64 specifies the entity the access control directive applies to.
65 It can have the forms
66 .LP
67 .nf
68         *
69         [dn[.<dnstyle>]=<pattern>] 
70         [filter=<ldapfilter>]
71         [attrs=<attrlist>]
72 .fi
73 .LP
74 The wildcard
75 .B *
76 stands for all the entries.
77 .LP
78 The statement
79 .B dn=<pattern>
80 selects the entries based on their naming context.
81 The optional style qualifier
82 .B <dnstyle>
83 can be 
84 .B regex
85 (the default) implies that
86 .B pattern
87 is a regular expression, as detailed in
88 .BR regex (7),
89 matching a normalized string representation of the entry's DN.
90 The regex form of the pattern does not support UTF-8 yet.
91 .LP
92 For all other qualifiers, the pattern is a string representation of
93 the entry's DN.
94 .B base
95 or
96 .B exact 
97 (an alias of 
98 .BR base )
99 indicates the entry whose DN is equal to the pattern.
100 .B one
101 to indicate all the entries immediately below the
102 .BR pattern ,
103 .B subtree
104 to indicate all entries in the subtree at the pattern,
105 .B children
106 to indicate all entries below (subordinate) to the pattern.
107 Note that 
108 .B dn=".*"
109 is equivalent to
110 .BR * .
111 .LP
112 The statement
113 .B filter=<ldapfilter>
114 selects the entries based on a valid LDAP filter as described in RFC 2254.
115 .LP
116 The statement
117 .B attrs=<attrlist>
118 selects the attributes the access control rule applies to.
119 It is a comma-separated list of attribute types, plus the special names
120 .BR entry ,
121 indicating access to the entry itself, and
122 .BR children ,
123 indicating access to the entry's children. ObjectClass names may also
124 be specified in this list, which will affect all the attributes that
125 are required and/or allowed by that objectClass.
126 .LP
127 The last three statements are additive; they can be used in sequence 
128 to select entities the access rule applies to based on naming context,
129 value and attribute type simultaneously.
130 .LP
131 The field
132 .B <who>
133 indicates whom the access rules apply to.
134 Multiple 
135 .B <who>
136 statements can appear in an access control statement, indicating the
137 different access privileges to the same resource that apply to different
138 accessee.
139 It can have the forms
140 .LP
141 .nf
142         *
143         anonymous
144         users
145         self
146
147         dn[.<dnstyle>[,<modifier>]]=<pattern>
148         dnattr=<attrname>
149         group[/<objectclass>[/<attrname>]]
150                 [.<style>]=<pattern>
151         peername[.<style>]=<pattern>
152         sockname[.<style>]=<pattern>
153         domain[.<domainstyle>[,<modifier>]]=<pattern>
154         sockurl[.<style>]=<pattern>
155         set[.<style>]=<pattern>
156
157         ssf=<n>
158         transport_ssf=<n>
159         tls_ssf=<n>
160         sasl_ssf=<n>
161
162         aci=<attrname>
163 .fi
164 .LP
165 They may be specified in combination.
166 .LP
167 .nf
168 .fi
169 .LP
170 The wildcard
171 .B *
172 refers to everybody.
173 .LP
174 The keyword
175 .B anonymous
176 means access is granted to unauthenticated users; it is moslty used 
177 to limit access to authentication resources (e.g. the
178 .B userPassword
179 attribute) to unauthenticated users for authentication purposes.
180 .LP
181 The keyword
182 .B users
183 means access is granted to authenticated users.
184 .LP
185 The keyword
186 .B self
187 means access to an entry is allowed to the entry itself (e.g. the entry
188 being accessed and the requesting entry must be the same).
189 .LP
190 The statement
191 .B dn=<pattern>
192 means that access is granted to the matching DN.
193 The optional style qualifier
194 .B dnstyle
195 allows the same choices of the dn form of the
196 .B <what>
197 field.  In addition, the
198 .B regex
199 form of
200 .B pattern
201 can exploit substring substitution of submatches in the
202 .B <what>
203 dn.regex clause by using the form
204 .BR $<digit> ,
205 with 
206 .B digit
207 ranging from 1 to 9.
208 .LP
209 The statement
210 .B dnattr=<attrname>
211 means that access is granted to requests whose DN is listed in the
212 entry being accessed under the 
213 .B attrname
214 attribute.
215 .LP
216 The statement
217 .B group=<pattern>
218 means that access is granted to requests whose DN is listed
219 in the group entry whose DN is given by
220 .BR pattern .
221 The optional parameters
222 .B objectclass
223 and
224 .B attrname
225 define the objectClass and the member attributeType of the group entry.
226 The optional style qualifier
227 .B style
228 can be
229 .BR regex ,
230 which means that
231 .B pattern
232 will be expanded accorging to regex (7), and
233 .B base
234 or
235 .B exact
236 (an alias of
237 .BR base ),
238 which means that exact match will be used.
239 .LP
240 The statements
241 .BR peername=<pattern> ,
242 .BR sockname=<pattern> ,
243 .BR domain=<pattern> ,
244 and
245 .BR sockurl=<pattern>
246 mean that the contacting host IP for
247 .BR peername ,
248 the named pipe file name for
249 .BR sockname ,
250 the contacting host name for
251 .BR domain ,
252 and the contacting URL for
253 .BR sockurl
254 are compared against
255 .B pattern
256 to determine access.
257 The same
258 .B style
259 rules for pattern match described for the
260 .B group
261 case apply. 
262 The
263 .BR domain 
264 clause also allows the
265 .B subtree
266 style, which succeeds when a fully qualified name exactly matches the
267 .BR domain
268 pattern, or its trailing part, after a 
269 .BR dot ,
270 exactly matches the 
271 .BR domain
272 pattern.
273 The
274 .B domain
275 of the contacting host is determined by performing a DNS reverse lookup.
276 As this lookup can easily be spoofed, use of the
277 .B domain
278 statement is strongly discouraged.  By default, reverse lookups are disabled.
279 .LP
280 The statement
281 .B set=<pattern>
282 is undocumented yet.
283 .LP
284 The statement
285 .B aci=<attrname>
286 means that the access control is determined by the values in the
287 .B attrname
288 of the entry itself.
289 ACIs are experimental; they must be enabled at compile time.
290 .LP
291 The statements
292 .BR ssf=<n> ,
293 .BR transport_ssf=<n> ,
294 .BR tls_ssf=<n> ,
295 and
296 .BR sasl_ssf=<n>
297 set the required Security Strength Factor (ssf) required to grant access.
298 .LP
299 The field
300 .B <access> ::= [self]{<level>|<priv>}
301 determines the access level or the specific access privileges the
302 .B who 
303 field will have.
304 Its component are defined as
305 .LP
306 .nf
307         <level> ::= none|auth|compare|search|read|write
308         <priv> ::= {=|+|-}{w|r|s|c|x}+
309 .fi
310 .LP
311 The modifier
312 .B self
313 allows special operations like having a certain access level or privilege
314 only in case the operation involves the name of the user that's requesting
315 the access.
316 It implies the user that requests access is bound.
317 An example is the
318 .B selfwrite
319 access to the member attribute of a group, which allows one to add/delete
320 its own DN from the member list of a group, without affecting other members.
321 .LP
322 The 
323 .B level 
324 access model relies on an incremental interpretation of the access
325 privileges.
326 The possible levels are
327 .BR none ,
328 .BR auth ,
329 .BR compare ,
330 .BR search ,
331 .BR read ,
332 and
333 .BR write .
334 Each access level implies all the preceding ones, thus 
335 .B write
336 access will imply all accesses.
337 While
338 .B none
339 is trivial, 
340 .B auth
341 access means that one is allowed access to an attribute to perform
342 authentication/authorization operations (e.g.
343 .BR bind )
344 with no other access.
345 This is useful to grant unauthenticated users the least possible 
346 access level to critical resources, like passwords.
347 .LP
348 The
349 .B priv
350 access model relies on the explicit setting of access privileges
351 for each clause.
352 The
353 .B =
354 sign resets previously defined accesses; as a consequence, the final 
355 access privileges will be only those defined by the clause.
356 The 
357 .B +
358 and
359 .B -
360 signs add/remove access privileges to the existing ones.
361 The privileges are
362 .B w
363 for write,
364 .B r
365 for read,
366 .B s 
367 for search,
368 .B c 
369 for compare, and
370 .B x
371 for authentication.
372 More than one privilege can be added in one statement.
373 .LP
374 The optional field
375 .B <control>
376 controls the flow of access rule application.
377 It can have the forms
378 .LP
379 .nf
380         stop
381         continue
382         break
383 .fi
384 .LP
385 where
386 .BR stop ,
387 the default, means access checking stops in case of match.
388 The other two forms are used to keep on processing access clauses.
389 In detail, the
390 .B continue
391 form allows for other 
392 .B <who>
393 clauses in the same 
394 .B <access>
395 clause to be considered, so that they may result in incrementally altering
396 the privileges, while the
397 .B break
398 form allows for other
399 .B <access>
400 clauses that match the same target to be processed.
401 Consider the (silly) example
402 .LP
403 .nf
404         access to dn.subtree="dc=example,dc=com" attrs=cn
405                 by * =cs break
406
407         access to dn.subtree="ou=People,dc=example,dc=com"
408                 by * +r
409 .fi
410 .LP
411 which allows search and compare privileges to everybody under
412 the "dc=example,dc=com" tree, with the second rule allowing
413 also read in the "ou=People" subtree,
414 or the (even more silly) example
415 .LP
416 .nf
417         access to dn.subtree="dc=example,dc=com" attrs=cn
418                 by * =cs continue
419                 by users +r
420 .fi
421 .LP
422 which grants everybody search and compare privileges, and adds read
423 privileges to authenticated users.
424 .SH FILES
425 .TP
426 ETCDIR/slapd.conf
427 default slapd configuration file
428 .SH SEE ALSO
429 .BR slapd (8),
430 .LP
431 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
432 .SH ACKNOWLEDGEMENTS
433 .B OpenLDAP
434 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
435 .B OpenLDAP
436 is derived from University of Michigan LDAP 3.3 Release.