]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.access.5
Remove derived file
[openldap] / doc / man / man5 / slapd.access.5
1 .TH SLAPD.ACCESS 5 "28 Oct 2001" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2001 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 file
10 .B ETCDIR/slapd.conf (5)
11 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 qualificator
82 .B <dnstyle>
83 can be 
84 .BR regex ,
85 which implies a regex (7)
86 .B pattern 
87 will be used (the default),
88 .B base
89 or
90 .B exact 
91 (an alias of 
92 .BR base )
93 for an exact match of the entry,
94 .B one
95 to indicate all the entries immediately below the
96 .BR pattern ,
97 .B sub
98 to indicate all the subentries of an entry including the entry itself,
99 .B children
100 to indicate all the subentries of an entry not including the entry itself.
101 Note that 
102 .B dn=".*"
103 is equivalent to
104 .BR * .
105 The regex form of the pattern does not support UTF-8 (7) yet.
106 .LP
107 The statement
108 .B filter=<ldapfilter>
109 selects the entries based on a valid LDAP filter as described in RFC 2254.
110 .LP
111 The statement
112 .B attrs=<attrlist>
113 selects the attributes the access control rule applies to.
114 It is a comma-separated list of attribute types, plus the special names
115 .BR entry ,
116 indicating access to the entry itself, and
117 .BR children ,
118 indicating access to the entry's children.
119 .LP
120 The last three statements are additive; they can be used in sequence 
121 to select entities the access rule applies to based on naming context,
122 value and attribute type simultaneously.
123 .LP
124 The field
125 .B <who>
126 indicates whom the access rules apply to.
127 Multiple 
128 .B <who>
129 statements can appear in an access control statement, indicating the
130 different access privileges to the same resource that apply to different
131 accessee.
132 It can have the forms
133 .LP
134 .nf
135         *
136         anonymous
137         users
138         self
139
140         dn[.<dnstyle>]=<pattern>
141         dnattr=<attrname>
142         group[/<objectclass>[/<attrname>]]
143                 [.<style>]=<pattern>
144         peername[.<style>]=<pattern>
145         sockname[.<style>]=<pattern>
146         domain[.<style>]=<pattern>
147         sockurl[.<style>]=<pattern>
148         set[.<style>]=<pattern>
149
150         aci=<attrname>
151 .fi
152 .LP
153 Each of them can be prefixed by the modifiers
154 .LP
155 .nf
156         ssf=<n>
157         transport_ssf=<n>
158         tls_ssf=<n>
159         sasl_ssf=<n>
160 .fi
161 .LP
162 The wildcard
163 .B *
164 refers to everybody.
165 .LP
166 The keyword
167 .B anonymous
168 means access is granted to unauthenticated users; it is moslty used 
169 to limit access to authentication resources (e.g. the
170 .B userPassword
171 attribute) to unauthenticated users for authentication purposes.
172 .LP
173 The keyword
174 .B users
175 means access is granted to authenticated users.
176 .LP
177 The keyword
178 .B self
179 means access to an entry is allowed to the entry itself (e.g. the entry
180 being accessed and the requesting entry must be the same).
181 .LP
182 The statement
183 .B dn=<pattern>
184 means that access is granted to the matching dn.
185 The optional style qualificator
186 .B dnstyle
187 allows the same choices of the dn form of the
188 .B <what>
189 field.
190 In detail, the
191 .B regex
192 form of
193 .B pattern
194 can exploit substring substitution of submatches in the
195 .B <what>
196 dn by using the form
197 .BR $<digit> ,
198 with 
199 .B digit
200 ranging from 1 to 9.
201 .LP
202 The statement
203 .B dnattr=<attrname>
204 means that access is granted to requests whose dn is listed in the
205 entry being accessed under the 
206 .B attrname
207 attribute.
208 .LP
209 The statement
210 .B group=<pattern>
211 means that access is granted to requests whose dn is listed
212 in the group entry whose dn is given by
213 .BR pattern .
214 The optional parameters
215 .B objectclass
216 and
217 .B attrname
218 define the objectClass and the member attributeType of the group entry.
219 The optional style qualificator
220 .B style
221 can be
222 .BR regex ,
223 which means that
224 .B pattern
225 will be expanded accorging to regex (7), and
226 .B base
227 or
228 .B exact
229 (an alias of
230 .BR base ),
231 which means that an exact match will be used.
232 .LP
233 The statements
234 .BR peername=<pattern> ,
235 .BR sockname=<pattern> ,
236 .BR domain=<pattern> ,
237 and
238 .BR sockurl=<pattern>
239 mean that the contacting host IP for
240 .BR peername ,
241 the named pipe file name for
242 .BR sockname ,
243 the contacting host name for
244 .BR domain ,
245 and the contacting URL for
246 .BR sockurl
247 are compared against
248 .B pattern
249 to determine access.
250 The same
251 .B style
252 rules for pattern match described for the
253 .B group
254 case apply.
255 .LP
256 The statement
257 .B set=<pattern>
258 is undocumented yet.
259 .LP
260 The statement
261 .B aci=<attrname>
262 means that the access control is determined by the values in the
263 .B attrname
264 of the entry itself.
265 ACIs are experimental; they must be enabled at compile time.
266 .LP
267 The modifiers
268 .BR ssf=<n> ,
269 .BR transport_ssf=<n> ,
270 .BR tls_ssf=<n> ,
271 and
272 .BR sasl_ssf=<n>
273 set the required Security Strenght Factor (ssf) required to grant access.
274 They are prefixed to the 
275 .B <who>
276 clause they alter.
277 .LP
278 The field
279 .B <access> ::= [self]{<level>|<priv>}
280 determines the access level or the specific access privileges the
281 .B who 
282 field will have.
283 Its component are defined as
284 .LP
285 .nf
286         <level> ::= none|auth|compare|search|read|write
287         <priv> ::= {=|+|-}{w|r|s|c|x}+
288 .fi
289 .LP
290 The modifier
291 .B self
292 allows special operations like having a certain access level or privilege
293 only in case the operation involves the name of the user that's requesting
294 the access.
295 It implies the user that requests access is bound.
296 An example is the
297 .B self write
298 access to the member attribute of a group, which allows one to add/delete
299 its own DN from the member list of a group, without affecting other members.
300 .LP
301 The 
302 .B level 
303 access model relies on an incremental interpretation of the access
304 privileges.
305 The possible levels are
306 .BR none ,
307 .BR auth ,
308 .BR compare ,
309 .BR search ,
310 .BR read ,
311 and
312 .BR write .
313 Each access level implies all the preceding ones, thus 
314 .B write
315 access will imply all accesses.
316 While
317 .B none
318 is trivial, 
319 .B auth
320 access means that one is allowed access to an attribute to perform
321 authentication operations (e.g.
322 .BR bind )
323 with no other access.
324 This is useful to grant unauthenticated users the least possible 
325 access level to critical resources, like passwords.
326 .LP
327 The
328 .B priv
329 access model relies on the explicit setting of access privileges
330 for each clause.
331 The
332 .B =
333 sign resets previously defined accesses; as a consequence, the final 
334 access privileges will be only those defined by the clause.
335 The 
336 .B +
337 and
338 .B -
339 signs add/remove access privileges to the existing ones.
340 The privileges are
341 .B w
342 for write,
343 .B r
344 for read,
345 .B s 
346 for search,
347 .B c 
348 for compare, and
349 .B x
350 for authentication.
351 More than one privilege can be added in one statement.
352 .LP
353 The optional field
354 .B <control>
355 controls the flow of access rule application.
356 It can have the forms
357 .LP
358 .nf
359         stop
360         continue
361         break
362 .fi
363 .LP
364 where
365 .BR stop ,
366 the default, means access checking stops in case of match.
367 The other two forms are used to keep on processing access clauses.
368 In detail, the
369 .B continue
370 form allows for other 
371 .B <who>
372 clauses in the same 
373 .B <access>
374 clause to be considered, so that they may result in incrementally altering
375 the privileges, while the
376 .B break
377 form allows for other
378 .B <access>
379 clauses that match the same target to be processed.
380 Consider the (silly) example
381 .LP
382 .nf
383         access to dn.subtree="dc=example,dc=com" attrs=cn
384                 by * =cs break
385
386         access to dn.subtree="ou=People,dc=example,dc=com"
387                 by * +r
388 .fi
389 .LP
390 which allows search and compare privileges to everybody under
391 the "dc=example,dc=com" tree, with the seconf rule allowing
392 also read in the "ou=People" subtree,
393 or the (even more silly) example
394 .LP
395 .nf
396         access to dn.subtree="dc=example,dc=com" attrs=cn
397                 by * =cs continue
398                 by users +r
399 .fi
400 .LP
401 which grants everybody search and compare privileges, and adds read
402 privileges to authenticated users.
403 .SH FILES
404 ETCDIR/slapd.conf
405 .SH SEE ALSO
406 .BR slapd (8),
407 .LP
408 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
409 .SH ACKNOWLEDGEMENTS
410 .B      OpenLDAP
411 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
412 .B      OpenLDAP
413 is derived from University of Michigan LDAP 3.3 Release.