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
27 file consists of a series of global configuration options that apply to
29 as a whole (including all backends), followed by zero or more database
30 backend definitions that contain information specific to a backend
38 # comment - these options apply to every database
39 <global configuration options>
40 # first database definition & configuration options
41 database <backend 1 type>
42 <configuration options specific to backend 1>
43 # subsequent database definitions & configuration options
47 Both the global configuration and each backend-specific section can
48 contain access information. Backend-specific access control
49 directives are used for those entries that belong to the backend,
50 according to their naming context. In case no access control
51 directives are defined for a backend or those which are defined are
52 not applicable, the directives from the global configuration section
55 For entries not held in any backend (such as a root DSE), the
56 directives of the first backend (and any global directives) are
59 Arguments that should be replaced by actual text are shown in
61 .SH THE ACCESS DIRECTIVE
62 The structure of the access control directives is
64 .B access to <what> "[ by <who> <access> [ <control> ] ]+"
65 Grant access (specified by
67 to a set of entries and/or attributes (specified by
69 by one or more requestors (specified by
74 specifies the entity the access control directive applies to.
78 [dn[.<dnstyle>]=]<dnpattern>
80 attrs=<attrlist>[ val[.<style>]=<attrval>]
85 selects the entries based on their naming context.
91 is a string representation of the entry's DN.
94 stands for all the entries, and it is implied if no
100 is also optional; however, it is recommended to specify both the
104 to avoid ambiguities.
113 indicates the entry whose DN is equal to the
118 indicates all the entries immediately below the
123 indicates all entries in the subtree at the
126 indicates all the entries below (subordinate to) the
135 is a regular expression pattern,
138 matching a normalized string representation of the entry's DN.
139 The regex form of the pattern does not (yet) support UTF-8.
142 .B filter=<ldapfilter>
143 selects the entries based on a valid LDAP filter as described in RFC 2254.
152 selects the attributes the access control rule applies to.
153 It is a comma-separated list of attribute types, plus the special names
155 indicating access to the entry itself, and
157 indicating access to the entry's children. ObjectClass names may also
158 be specified in this list, which will affect all the attributes that
159 are required and/or allowed by that objectClass.
164 are directly treated as objectClass names. A name prefixed by
166 is also treated as an objectClass, but in this case the access rule
167 affects the attributes that are not required nor allowed
172 .B attrs=@extensibleObject
173 is implied, i.e. all attributes are addressed.
176 .B attrs=<attr> val[.<style>]=<attrval>
177 specifies access to a particular value of a single attribute.
178 In this case, only a single attribute type may be given. A value
182 (the default) uses the attribute's equality matching rule to compare the
187 the provided value is used as a regular expression pattern.
188 If the attribute has DN syntax, the value
196 resulting in base, onelevel, subtree or children match, respectively.
198 The dn, filter, and attrs statements are additive; they can be used in sequence
199 to select entities the access rule applies to based on naming context,
200 value and attribute type simultaneously.
204 indicates whom the access rules apply to.
207 statements can appear in an access control statement, indicating the
208 different access privileges to the same resource that apply to different
210 It can have the forms
218 dn[.<dnstyle>[,<modifier>]]=<DN>
220 group[/<objectclass>[/<attrname>]]
221 [.<groupstyle>]=<group>
222 peername[.<peernamestyle>]=<peername>
223 sockname[.<style>]=<sockname>
224 domain[.<domainstyle>[,<modifier>]]=<domain>
225 sockurl[.<style>]=<sockurl>
226 set[.<setstyle>]=<pattern>
239 <dnstyle>={{exact|base}|regex|sub(tree)|one(level)|children}
240 <groupstyle>={exact|expand}
241 <style>={exact|regex|expand}
242 <peernamestyle>={<style>|ip|path}
243 <domainstyle>={exact|regex|sub(tree)}
244 <setstyle>={exact|regex}
248 They may be specified in combination.
259 means access is granted to unauthenticated clients; it is mostly used
260 to limit access to authentication resources (e.g. the
262 attribute) to unauthenticated clients for authentication purposes.
266 means access is granted to authenticated clients.
270 means access to an entry is allowed to the entry itself (e.g. the entry
271 being accessed and the requesting entry must be the same).
275 means that access is granted to the matching DN.
276 The optional style qualifier
278 allows the same choices of the dn form of the
280 field. In addition, the
282 style can exploit substring substitution of submatches in the
284 dn.regex clause by using the form
289 Since the dollar character is used to indicate a substring replacement,
290 the dollar character that is used to indicate match up to the end of
291 the string must be escaped by a second dollar character, e.g.
294 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
295 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
301 At present, the only type allowed is
303 which causes substring substitution of submatches to take place
310 dnstyle in the above example may be of use only if the
312 clause needs to be a regex; otherwise, if the
313 value of the second (from the right)
315 portion of the DN in the above example were fixed, the form
318 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
319 by dn.exact,expand="uid=$2,dc=example,dc=com" write
322 could be used; if it had to match the value in the
327 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
328 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
333 It is perfectly useless to give any access privileges to a DN
334 that exactly matches the
336 of the database the ACLs apply to, because it implicitly
337 possesses write privileges for the entire tree of that database.
338 Actually, access control is bypassed for the
340 to solve the intrinsic chicken-and-egg problem.
344 means that access is granted to requests whose DN is listed in the
345 entry being accessed under the
351 means that access is granted to requests whose DN is listed
352 in the group entry whose DN is given by
354 The optional parameters
358 define the objectClass and the member attributeType of the group entry.
359 The optional style qualifier
365 will be expanded as a replacement string (but not as a regular expression)
366 according to regex (7), and
368 which means that exact match will be used.
370 For static groups, the specified attributeType must have
373 .B NameAndOptionalUID
374 syntax. For dynamic groups the attributeType must
377 attributeType. Only LDAP URIs of the form
378 .B ldap:///<base>??<scope>?<filter>
379 will be evaluated in a dynamic group, by searching the local server only.
382 .BR peername=<peername> ,
383 .BR sockname=<sockname> ,
384 .BR domain=<domain> ,
386 .BR sockurl=<sockurl>
387 mean that the contacting host IP (in the form
388 .BR "IP=<ip>:<port>" )
389 or the contacting host named pipe file name (in the form
391 if connecting through a named pipe) for
393 the named pipe file name for
395 the contacting host name for
397 and the contacting URL for
404 rules for pattern match described for the
408 style, which implies submatch
412 match of the corresponding connection parameters.
417 clause (the default) implies a case-exact match on the client's
421 prefix and the trailing
427 prefix if connecting through a named pipe.
430 style interprets the pattern as
431 .BR <peername>=<ip>[%<mask>][{<n>}] ,
436 are dotted digit representations of the IP and the mask, while
438 delimited by curly brackets, is an optional port.
439 When checking access privileges, the IP portion of the
441 is extracted, eliminating the
445 part, and it is compared against the
447 portion of the pattern after masking with
450 .B peername.ip=127.0.0.1
451 allows connections only from localhost,
452 .B peername.ip=192.168.1.0%255.255.255.0
453 allows connections from any IP in the 192.168.1 class C domain, and
454 .B peername.ip=192.168.1.16%255.255.255.240{9009}
455 allows connections from any IP in the 192.168.1.[16-31] range
456 of the same domain, only if port 9009 is used.
463 when connecting through a named pipe, and performs an exact match
464 on the given pattern.
467 clause also allows the
469 style, which succeeds when a fully qualified name exactly matches the
471 pattern, or its trailing part, after a
478 style is allowed, implying an
480 match with submatch expansion; the use of
482 as a style modifier is considered more appropriate.
484 .B domain.subtree=example.com
485 will match www.example.com, but will not match www.anotherexample.com.
488 of the contacting host is determined by performing a DNS reverse lookup.
489 As this lookup can easily be spoofed, use of the
491 statement is strongly discouraged. By default, reverse lookups are disabled.
498 option; the only value currently supported is
500 which causes substring substitution of submatches to take place even if
505 much like the analogous usage in
515 means that the access control is determined by the values in the
518 ACIs are experimental; they must be enabled at compile time.
522 .BR transport_ssf=<n> ,
526 set the required Security Strength Factor (ssf) required to grant access.
527 .SH THE <ACCESS> FIELD
529 .B <access> ::= [self]{<level>|<priv>}
530 determines the access level or the specific access privileges the
533 Its component are defined as
536 <level> ::= none|auth|compare|search|read|write
537 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
542 allows special operations like having a certain access level or privilege
543 only in case the operation involves the name of the user that's requesting
545 It implies the user that requests access is bound.
548 access to the member attribute of a group, which allows one to add/delete
549 its own DN from the member list of a group, without affecting other members.
553 access model relies on an incremental interpretation of the access
555 The possible levels are
563 Each access level implies all the preceding ones, thus
565 access will imply all accesses.
570 access means that one is allowed access to an attribute to perform
571 authentication/authorization operations (e.g.
573 with no other access.
574 This is useful to grant unauthenticated clients the least possible
575 access level to critical resources, like passwords.
579 access model relies on the explicit setting of access privileges
583 sign resets previously defined accesses; as a consequence, the final
584 access privileges will be only those defined by the clause.
589 signs add/remove access privileges to the existing ones.
601 More than one of the above privileges can be added in one statement.
603 indicates no privileges and is used only by itself (e.g., +0).
607 controls the flow of access rule application.
608 It can have the forms
618 the default, means access checking stops in case of match.
619 The other two forms are used to keep on processing access clauses.
622 form allows for other
626 clause to be considered, so that they may result in incrementally altering
627 the privileges, while the
629 form allows for other
631 clauses that match the same target to be processed.
632 Consider the (silly) example
635 access to dn.subtree="dc=example,dc=com" attrs=cn
638 access to dn.subtree="ou=People,dc=example,dc=com"
642 which allows search and compare privileges to everybody under
643 the "dc=example,dc=com" tree, with the second rule allowing
644 also read in the "ou=People" subtree,
645 or the (even more silly) example
648 access to dn.subtree="dc=example,dc=com" attrs=cn
653 which grants everybody search and compare privileges, and adds read
654 privileges to authenticated clients.
655 .SH OPERATION REQUIREMENTS
656 Operations require different privileges on different portions of entries.
657 The following summary applies to primary database backends such as
658 the LDBM, BDB, and HDB backends. Requirements for other backends may
659 (and often do) differ.
665 privileges on the pseudo-attribute
667 of the entry being added, and
669 privileges on the pseudo-attribute
671 of the entry's parent.
675 operation, when credentials are stored in the directory, requires
677 privileges on the attribute the credentials are stored in (usually
684 privileges on the attribute that is being compared.
690 privileges on the pseudo-attribute
692 of the entry being deleted, and
696 pseudo-attribute of the entry's parent.
702 privileges on the attibutes being modified.
708 privileges on the pseudo-attribute
710 of the entry whose relative DN is being modified,
712 privileges on the pseudo-attribute
714 of the old and new entry's parents, and
716 privileges on the attributes that are present in the new relative DN.
718 privileges are also required on the attributes that are present
719 in the old relative DN if
725 operation, for each entry, requires
727 privileges on the attributes that are defined in the filter.
728 Then, the resulting entries are tested for
730 privileges on the pseudo-attribute
732 (for read access to the entry itself)
735 access on each value of each attribute that is requested.
738 object used in generating continuation references, the operation requires
740 access on the pseudo-attribute
742 (for read access to the referral object itself),
745 access to the attribute holding the referral information
750 Some internal operations and some
752 require specific access privileges.
759 privileges on all the attributes that are present in the search filter
760 of the URI regexp maps (the right-hand side of the
764 privileges are also required on the
766 attribute of the authorizing identity and/or on the
768 attribute of the authorized identity.
770 It is strongly recommended to explicitly use the most appropriate
776 clauses, to avoid possible incorrect specifications of the access rules
777 as well as for performance (avoid unrequired regex matching when an exact
778 match suffices) reasons.
780 An administrator might create a rule of the form:
783 access to dn.regex="dc=example,dc=com"
787 expecting it to match all entries in the subtree "dc=example,dc=com".
788 However, this rule actually matches any DN which contains anywhere
789 the substring "dc=example,dc=com". That is, the rule matches both
790 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
792 To match the desired subtree, the rule would be more precisely
796 access to dn.regex="^(.+,)?dc=example,dc=com$"
800 For performance reasons, it would be better to use the subtree style.
803 access to dn.subtree="dc=example,dc=com"
807 When writing submatch rules, it may be convenient to avoid unnecessary
810 use; for instance, to allow access to the subtree of the user
813 clause, one could use
816 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
817 by dn.regex="^uid=$2,dc=example,dc=com$$" write
821 However, since all that is required in the
823 clause is substring expansion, a more efficient solution is
826 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
827 by dn.exact,expand="uid=$2,dc=example,dc=com" write
835 implies substring expansion,
837 as well as all the other DN specific
839 values, does not, so it must be explicitly requested.
844 default slapd configuration file
849 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
852 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
854 is derived from University of Michigan LDAP 3.3 Release.