1 .TH SLAPD.ACCESS 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2004 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5 slapd.access \- access configuration for slapd, the stand-alone LDAP daemon
11 file contains configuration information for the
13 daemon. This configuration file is also used by the
15 replication daemon and by the SLAPD tools
23 file consists of a series of global configuration options that apply to
25 as a whole (including all backends), followed by zero or more database
26 backend definitions that contain information specific to a backend
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
43 Both the global configuration and each backend-specific section can
44 contain access information. Backend-specific access control
45 directives are used for those entries that belong to the backend,
46 according to their naming context. In case no access control
47 directives are defined for a backend or those which are defined are
48 not applicable, the directives from the global configuration section
51 For entries not held in any backend (such as a root DSE), the
52 directives of the first backend (and any global directives) are
55 Arguments that should be replaced by actual text are shown in
57 .SH THE ACCESS DIRECTIVE
58 The structure of the access control directives is
60 .B access to <what> "[ by <who> <access> [ <control> ] ]+"
61 Grant access (specified by
63 to a set of entries and/or attributes (specified by
65 by one or more requestors (specified by
70 specifies the entity the access control directive applies to.
77 [attrs=<attrlist>[ val[.<style>]=<attrval>]]
82 stands for all the entries.
86 selects the entries based on their naming context.
87 The pattern is a string representation of the entry's DN.
94 indicates the entry whose DN is equal to the pattern;
98 indicates all the entries immediately below the
103 indicates all entries in the subtree at the pattern,
105 indicates all the entries below (subordinate to) the pattern.
111 then the value is a regular expression pattern,
114 matching a normalized string representation of the entry's DN.
115 The regex form of the pattern does not (yet) support UTF-8.
118 .B filter=<ldapfilter>
119 selects the entries based on a valid LDAP filter as described in RFC 2254.
123 selects the attributes the access control rule applies to.
124 It is a comma-separated list of attribute types, plus the special names
126 indicating access to the entry itself, and
128 indicating access to the entry's children. ObjectClass names may also
129 be specified in this list, which will affect all the attributes that
130 are required and/or allowed by that objectClass.
135 are directly treated as objectClass names. A name prefixed by
137 is also treated as an objectClass, but in this case the access rule
138 affects the attributes that are not required nor allowed
142 .B attrs=<attr> val[.<style>]=<value>
143 specifies access to a particular value of a single attribute.
144 In this case, only a single attribute type may be given. A value
148 (the default) uses the attribute's equality matching rule to compare the
153 the provided value is used as a regular expression pattern.
154 If the attribute has DN syntax, the value
162 resulting in base, onelevel, subtree or children match, respectively.
164 The dn, filter, and attrs statements are additive; they can be used in sequence
165 to select entities the access rule applies to based on naming context,
166 value and attribute type simultaneously.
170 indicates whom the access rules apply to.
173 statements can appear in an access control statement, indicating the
174 different access privileges to the same resource that apply to different
176 It can have the forms
184 dn[.<dnstyle>[,<modifier>]]=<DN>
186 group[/<objectclass>[/<attrname>]]
188 peername[.<peernamestyle>]=<peername>
189 sockname[.<style>]=<sockname>
190 domain[.<domainstyle>[,<modifier>]]=<domain>
191 sockurl[.<style>]=<sockurl>
192 set[.<style>]=<pattern>
205 <dnstyle>={{exact|base}|regex|sub(tree)|one(level)|children}
206 <style>={exact|regex}
207 <peernamestyle>={exact|regex|ip|path}
208 <domainstyle>={exact|regex|sub(tree)}
212 They may be specified in combination.
223 means access is granted to unauthenticated clients; it is mostly used
224 to limit access to authentication resources (e.g. the
226 attribute) to unauthenticated clients for authentication purposes.
230 means access is granted to authenticated clients.
234 means access to an entry is allowed to the entry itself (e.g. the entry
235 being accessed and the requesting entry must be the same).
239 means that access is granted to the matching DN.
240 The optional style qualifier
242 allows the same choices of the dn form of the
244 field. In addition, the
246 style can exploit substring substitution of submatches in the
248 dn.regex clause by using the form
256 At present, the only type allowed is
258 which causes substring substitution of submatches to take place
263 It is perfectly useless to give any access privileges to a DN
264 that exactly matches the
266 of the database the ACLs apply to, because it implicitly
267 possesses write privileges for the entire tree of that database.
271 means that access is granted to requests whose DN is listed in the
272 entry being accessed under the
278 means that access is granted to requests whose DN is listed
279 in the group entry whose DN is given by
281 The optional parameters
285 define the objectClass and the member attributeType of the group entry.
286 The optional style qualifier
292 will be expanded as a replacement string (but not as a regular expression)
293 according to regex (7), and
299 which means that exact match will be used.
301 For static groups, the specified attributeType must have
304 .B NameAndOptionalUID
305 syntax. For dynamic groups the attributeType must
308 attributeType. Only LDAP URIs of the form
309 .B ldap:///<base>??<scope>?<filter>
310 will be evaluated in a dynamic group.
313 .BR peername=<peername> ,
314 .BR sockname=<sockname> ,
315 .BR domain=<domain> ,
317 .BR sockurl=<sockurl>
318 mean that the contacting host IP (in the form
319 .BR "IP=<ip>:<port>" )
320 or the contacting host named pipe file name (in the form
322 if connecting through a named pipe) for
324 the named pipe file name for
326 the contacting host name for
328 and the contacting URL for
335 rules for pattern match described for the
342 clause (the default) implies a case-exact match on the client's
346 prefix and the trailing
352 prefix if connecting through a named pipe.
355 style interprets the pattern as
356 .BR <peername>=<ip>[%<mask>][{<n>}] ,
361 are dotted digit representations of the IP and the mask, while
363 delimited by curly brackets, is an optional port.
364 When checking access privileges, the IP portion of the
366 is extracted, eliminating the
370 part, and it is compared against the
372 portion of the pattern after masking with
375 .B peername.ip=127.0.0.1
376 alows connections only from localhost,
377 .B peername.ip=192.168.1.0%255.255.255.0
378 allows connections from any IP in the 192.168.1 class C domain, and
379 .B peername.ip=192.168.1.16%255.255.255.240{9009}
380 allows connections from any IP in the 192.168.1.[16-31] range
381 of the same domain, only if port 9009 is used.
388 when connecting through a named pipe, and performs an exact match
389 on the given pattern.
392 clause also allows the
394 style, which succeeds when a fully qualified name exactly matches the
396 pattern, or its trailing part, after a
402 .B domain.subtree=example.com
403 will match www.example.com, but will not match www.anotherexample.com.
406 of the contacting host is determined by performing a DNS reverse lookup.
407 As this lookup can easily be spoofed, use of the
409 statement is strongly discouraged. By default, reverse lookups are disabled.
416 option; the only value currently supported is
418 which causes substring substitution of submatches to take place even if
423 much like the analogous usage in
433 means that the access control is determined by the values in the
436 ACIs are experimental; they must be enabled at compile time.
440 .BR transport_ssf=<n> ,
444 set the required Security Strength Factor (ssf) required to grant access.
445 .SH THE <ACCESS> FIELD
447 .B <access> ::= [self]{<level>|<priv>}
448 determines the access level or the specific access privileges the
451 Its component are defined as
454 <level> ::= none|auth|compare|search|read|write
455 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
460 allows special operations like having a certain access level or privilege
461 only in case the operation involves the name of the user that's requesting
463 It implies the user that requests access is bound.
466 access to the member attribute of a group, which allows one to add/delete
467 its own DN from the member list of a group, without affecting other members.
471 access model relies on an incremental interpretation of the access
473 The possible levels are
481 Each access level implies all the preceding ones, thus
483 access will imply all accesses.
488 access means that one is allowed access to an attribute to perform
489 authentication/authorization operations (e.g.
491 with no other access.
492 This is useful to grant unauthenticated clients the least possible
493 access level to critical resources, like passwords.
497 access model relies on the explicit setting of access privileges
501 sign resets previously defined accesses; as a consequence, the final
502 access privileges will be only those defined by the clause.
507 signs add/remove access privileges to the existing ones.
519 More than one of the above privileges can be added in one statement.
521 indicates no privileges and is used only by itself (e.g., +0).
525 controls the flow of access rule application.
526 It can have the forms
536 the default, means access checking stops in case of match.
537 The other two forms are used to keep on processing access clauses.
540 form allows for other
544 clause to be considered, so that they may result in incrementally altering
545 the privileges, while the
547 form allows for other
549 clauses that match the same target to be processed.
550 Consider the (silly) example
553 access to dn.subtree="dc=example,dc=com" attrs=cn
556 access to dn.subtree="ou=People,dc=example,dc=com"
560 which allows search and compare privileges to everybody under
561 the "dc=example,dc=com" tree, with the second rule allowing
562 also read in the "ou=People" subtree,
563 or the (even more silly) example
566 access to dn.subtree="dc=example,dc=com" attrs=cn
571 which grants everybody search and compare privileges, and adds read
572 privileges to authenticated clients.
573 .SH OPERATION REQUIREMENTS
574 Operations require different privileges on different portions of entries.
575 The following summary applies to primary database backends such as
576 the LDBM, BDB, and HDB backends. Requirements for other backends may
577 (and often do) differ.
583 privileges on the pseudo-attribute
585 of the entry being added, and
587 privileges on the pseudo-attribute
589 of the entry's parent.
593 operation, when credentials are stored in the directory, requires
595 privileges on the attribute the credentials are stored in (usually
602 privileges on the attribute that is being compared.
608 privileges on the pseudo-attribute
610 of the entry being deleted, and
614 pseudo-attribute of the entry's parent.
620 privileges on the attibutes being modified.
626 privileges on the pseudo-attribute
628 of the entry whose relative DN is being modified,
630 privileges on the pseudo-attribute
632 of the old and new entry's parents, and
634 privileges on the attributes that are present in the new relative DN.
636 privileges are also required on the attributes that are present
637 in the old relative DN if
643 operation, for each entry, requires
645 privileges on the attributes that are defined in the filter.
646 Then, the resulting entries are tested for
648 privileges on the pseudo-attribute
650 (for read access to the entry itself)
653 access on each value of each attribute that is requested.
656 object used in generating continuation references, the operation requires
658 access on the pseudo-attribute
660 (for read access to the referral object itself),
663 access to the attribute holding the referral information
670 require specific access privileges.
675 privileges on all the attributes that are present in the search filter
676 of the URI regexp maps (the right-hand side of the
683 attribute of the authorizing identity and/or on the
685 attribute of the authorized identity.
687 It is strongly recommended to explicitly use the most appropriate
689 to avoid possible incorrect specifications of the access rules as well
690 as for performance (avoid unrequired regex matching when an exact
691 match suffices) reasons.
693 An administrator might create a rule of the form:
696 access to dn.regex="dc=example,dc=com"
700 expecting it to match all entries in the subtree "dc=example,dc=com".
701 However, this rule actually matches any DN which contains anywhere
702 the substring "dc=example,dc=com". That is, the rule matches both
703 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
705 To match the desired subtree, the rule would be more precisely
709 access to dn.regex="^(.+,)?dc=example,dc=com$$"
713 For performance reasons, it would be better to use the subtree style.
716 access to dn.subtree="dc=example,dc=com"
720 When writing submatch rules, it may be convenient to avoid unnecessary
723 use; for instance, to allow access to the subtree of the user
726 clause, one could use
729 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$$"
730 by dn.regex="^uid=$1,dc=example,dc=com$$" write
734 However, since all that is required in the
736 clause is substring expansion, a more efficient solution is
739 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$$"
740 by dn.exact,expand="uid=$1,dc=example,dc=com" write
748 implies substring expansion,
750 as well as all the other DN specific
752 values, does not, so it must be explicitly requested.
757 default slapd configuration file
761 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
764 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
766 is derived from University of Michigan LDAP 3.3 Release.