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 If no access controls are present, the default policy
56 allows anyone and everyone to read anything but restricts
57 updates to rootdn. (e.g., "access to * by * read").
58 The rootdn can always read and write EVERYTHING!
60 For entries not held in any backend (such as a root DSE), the
61 directives of the first backend (and any global directives) are
64 Arguments that should be replaced by actual text are shown in
66 .SH THE ACCESS DIRECTIVE
67 The structure of the access control directives is
69 .B access to <what> "[ by <who> <access> [ <control> ] ]+"
70 Grant access (specified by
72 to a set of entries and/or attributes (specified by
74 by one or more requestors (specified by
79 specifies the entity the access control directive applies to.
83 [dn[.<dnstyle>]=]<dnpattern>
85 attrs=<attrlist>[ val[.<attrstyle>]=<attrval>]
91 <dnstyle>={{exact|base(object)}|regex
92 |one(level)|sub(tree)|children}
93 <attrlist>={<attr>|[{!|@}]<objectClass>}[,<attrlist>]
94 <attrstyle>={{exact|base(object)}|regex
95 |one(level)|sub(tree)|children}
100 selects the entries based on their naming context.
106 is a string representation of the entry's DN.
109 stands for all the entries, and it is implied if no
115 is also optional; however, it is recommended to specify both the
119 to avoid ambiguities.
128 indicates the entry whose DN is equal to the
133 indicates all the entries immediately below the
138 indicates all entries in the subtree at the
141 indicates all the entries below (subordinate to) the
150 is a POSIX (''extended'') regular expression pattern,
155 matching a normalized string representation of the entry's DN.
156 The regex form of the pattern does not (yet) support UTF\-8.
159 .B filter=<ldapfilter>
160 selects the entries based on a valid LDAP filter as described in RFC 2254.
169 selects the attributes the access control rule applies to.
170 It is a comma-separated list of attribute types, plus the special names
172 indicating access to the entry itself, and
174 indicating access to the entry's children. ObjectClass names may also
175 be specified in this list, which will affect all the attributes that
176 are required and/or allowed by that objectClass.
181 are directly treated as objectClass names. A name prefixed by
183 is also treated as an objectClass, but in this case the access rule
184 affects the attributes that are not required nor allowed
189 .B attrs=@extensibleObject
190 is implied, i.e. all attributes are addressed.
193 .B attrs=<attr> val[.<style>]=<attrval>
194 specifies access to a particular value of a single attribute.
195 In this case, only a single attribute type may be given. A value
199 (the default) uses the attribute's equality matching rule to compare the
204 the provided value is used as a POSIX (''extended'') regular
205 expression pattern. If the attribute has DN syntax, the value
213 resulting in base, onelevel, subtree or children match, respectively.
215 The dn, filter, and attrs statements are additive; they can be used in sequence
216 to select entities the access rule applies to based on naming context,
217 value and attribute type simultaneously.
221 indicates whom the access rules apply to.
224 statements can appear in an access control statement, indicating the
225 different access privileges to the same resource that apply to different
227 It can have the forms
235 dn[.<dnstyle>[,<modifier>]]=<DN>
237 group[/<objectclass>[/<attrname>]]
238 [.<groupstyle>]=<group>
239 peername[.<peernamestyle>]=<peername>
240 sockname[.<style>]=<sockname>
241 domain[.<domainstyle>[,<modifier>]]=<domain>
242 sockurl[.<style>]=<sockurl>
243 set[.<setstyle>]=<pattern>
256 <style>={exact|regex|expand}
257 <dnstyle>={{exact|base(object)}|regex
258 |one(level)|sub(tree)|children}
259 <groupstyle>={exact|expand}
260 <peernamestyle>={<style>|ip|path}
261 <domainstyle>={exact|regex|sub(tree)}
262 <setstyle>={exact|regex}
266 They may be specified in combination.
277 means access is granted to unauthenticated clients; it is mostly used
278 to limit access to authentication resources (e.g. the
280 attribute) to unauthenticated clients for authentication purposes.
284 means access is granted to authenticated clients.
288 means access to an entry is allowed to the entry itself (e.g. the entry
289 being accessed and the requesting entry must be the same).
293 means that access is granted to the matching DN.
294 The optional style qualifier
296 allows the same choices of the dn form of the
298 field. In addition, the
300 style can exploit substring substitution of submatches in the
302 dn.regex clause by using the form
306 ranging from 0 to 9 (where 0 matches the entire string),
309 for submatches higher than 9.
310 Since the dollar character is used to indicate a substring replacement,
311 the dollar character that is used to indicate match up to the end of
312 the string must be escaped by a second dollar character, e.g.
315 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
316 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
322 At present, the only type allowed is
324 which causes substring substitution of submatches to take place
331 dnstyle in the above example may be of use only if the
333 clause needs to be a regex; otherwise, if the
334 value of the second (from the right)
336 portion of the DN in the above example were fixed, the form
339 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
340 by dn.exact,expand="uid=$2,dc=example,dc=com" write
343 could be used; if it had to match the value in the
348 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
349 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
356 clause other than regex may provide submatches as well.
367 as the match of the entire string.
376 as the match of the rightmost part of the DN as defined in the
379 This may be useful, for instance, to provide access to all the
380 ancestors of a user by defining
383 access to dn.subtree="dc=com"
384 by dn.subtree,expand="$1" read
387 which means that only access to entries that appear in the DN of the
391 It is perfectly useless to give any access privileges to a DN
392 that exactly matches the
394 of the database the ACLs apply to, because it implicitly
395 possesses write privileges for the entire tree of that database.
396 Actually, access control is bypassed for the
398 to solve the intrinsic chicken-and-egg problem.
402 means that access is granted to requests whose DN is listed in the
403 entry being accessed under the
409 means that access is granted to requests whose DN is listed
410 in the group entry whose DN is given by
412 The optional parameters
416 define the objectClass and the member attributeType of the group entry.
417 The optional style qualifier
423 will be expanded as a replacement string (but not as a regular expression)
430 which means that exact match will be used.
431 If the style of the DN portion of the
433 clause is regex, the submatches are made available according to
437 other styles provide limited submatches as discussed above about
442 For static groups, the specified attributeType must have
445 .B NameAndOptionalUID
446 syntax. For dynamic groups the attributeType must
449 attributeType. Only LDAP URIs of the form
450 .B ldap:///<base>??<scope>?<filter>
451 will be evaluated in a dynamic group, by searching the local server only.
454 .BR peername=<peername> ,
455 .BR sockname=<sockname> ,
456 .BR domain=<domain> ,
458 .BR sockurl=<sockurl>
459 mean that the contacting host IP (in the form
460 .BR "IP=<ip>:<port>" )
461 or the contacting host named pipe file name (in the form
463 if connecting through a named pipe) for
465 the named pipe file name for
467 the contacting host name for
469 and the contacting URL for
476 rules for pattern match described for the
480 style, which implies submatch
482 and regex match of the corresponding connection parameters.
487 clause (the default) implies a case-exact match on the client's
491 prefix and the trailing
497 prefix if connecting through a named pipe.
500 style interprets the pattern as
501 .BR <peername>=<ip>[%<mask>][{<n>}] ,
506 are dotted digit representations of the IP and the mask, while
508 delimited by curly brackets, is an optional port.
509 When checking access privileges, the IP portion of the
511 is extracted, eliminating the
515 part, and it is compared against the
517 portion of the pattern after masking with
520 .B peername.ip=127.0.0.1
521 allows connections only from localhost,
522 .B peername.ip=192.168.1.0%255.255.255.0
523 allows connections from any IP in the 192.168.1 class C domain, and
524 .B peername.ip=192.168.1.16%255.255.255.240{9009}
525 allows connections from any IP in the 192.168.1.[16-31] range
526 of the same domain, only if port 9009 is used.
533 when connecting through a named pipe, and performs an exact match
534 on the given pattern.
537 clause also allows the
539 style, which succeeds when a fully qualified name exactly matches the
541 pattern, or its trailing part, after a
548 style is allowed, implying an
550 match with submatch expansion; the use of
552 as a style modifier is considered more appropriate.
554 .B domain.subtree=example.com
555 will match www.example.com, but will not match www.anotherexample.com.
558 of the contacting host is determined by performing a DNS reverse lookup.
559 As this lookup can easily be spoofed, use of the
561 statement is strongly discouraged. By default, reverse lookups are disabled.
568 option; the only value currently supported is
570 which causes substring substitution of submatches to take place even if
575 much like the analogous usage in
585 means that the access control is determined by the values in the
588 ACIs are experimental; they must be enabled at compile time.
592 .BR transport_ssf=<n> ,
596 set the minimum required Security Strength Factor (ssf) needed
597 to grant access. The value should be positive integer.
598 .SH THE <ACCESS> FIELD
600 .B <access> ::= [self]{<level>|<priv>}
601 determines the access level or the specific access privileges the
604 Its component are defined as
607 <level> ::= none|auth|compare|search|read|write
608 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
613 allows special operations like having a certain access level or privilege
614 only in case the operation involves the name of the user that's requesting
616 It implies the user that requests access is bound.
619 access to the member attribute of a group, which allows one to add/delete
620 its own DN from the member list of a group, without affecting other members.
624 access model relies on an incremental interpretation of the access
626 The possible levels are
634 Each access level implies all the preceding ones, thus
636 access will imply all accesses.
641 access means that one is allowed access to an attribute to perform
642 authentication/authorization operations (e.g.
644 with no other access.
645 This is useful to grant unauthenticated clients the least possible
646 access level to critical resources, like passwords.
650 access model relies on the explicit setting of access privileges
654 sign resets previously defined accesses; as a consequence, the final
655 access privileges will be only those defined by the clause.
660 signs add/remove access privileges to the existing ones.
672 More than one of the above privileges can be added in one statement.
674 indicates no privileges and is used only by itself (e.g., +0).
678 controls the flow of access rule application.
679 It can have the forms
689 the default, means access checking stops in case of match.
690 The other two forms are used to keep on processing access clauses.
693 form allows for other
697 clause to be considered, so that they may result in incrementally altering
698 the privileges, while the
700 form allows for other
702 clauses that match the same target to be processed.
703 Consider the (silly) example
706 access to dn.subtree="dc=example,dc=com" attrs=cn
709 access to dn.subtree="ou=People,dc=example,dc=com"
713 which allows search and compare privileges to everybody under
714 the "dc=example,dc=com" tree, with the second rule allowing
715 also read in the "ou=People" subtree,
716 or the (even more silly) example
719 access to dn.subtree="dc=example,dc=com" attrs=cn
724 which grants everybody search and compare privileges, and adds read
725 privileges to authenticated clients.
726 .SH OPERATION REQUIREMENTS
727 Operations require different privileges on different portions of entries.
728 The following summary applies to primary database backends such as
729 the LDBM, BDB, and HDB backends. Requirements for other backends may
730 (and often do) differ.
736 privileges on the pseudo-attribute
738 of the entry being added, and
740 privileges on the pseudo-attribute
742 of the entry's parent.
746 operation, when credentials are stored in the directory, requires
748 privileges on the attribute the credentials are stored in (usually
755 privileges on the attribute that is being compared.
761 privileges on the pseudo-attribute
763 of the entry being deleted, and
767 pseudo-attribute of the entry's parent.
773 privileges on the attibutes being modified.
779 privileges on the pseudo-attribute
781 of the entry whose relative DN is being modified,
783 privileges on the pseudo-attribute
785 of the old and new entry's parents, and
787 privileges on the attributes that are present in the new relative DN.
789 privileges are also required on the attributes that are present
790 in the old relative DN if
796 operation, for each entry, requires
798 privileges on the attributes that are defined in the filter.
799 Then, the resulting entries are tested for
801 privileges on the pseudo-attribute
803 (for read access to the entry itself)
806 access on each value of each attribute that is requested.
809 object used in generating continuation references, the operation requires
811 access on the pseudo-attribute
813 (for read access to the referral object itself),
816 access to the attribute holding the referral information
821 Some internal operations and some
823 require specific access privileges.
830 privileges on all the attributes that are present in the search filter
831 of the URI regexp maps (the right-hand side of the
835 privileges are also required on the
837 attribute of the authorizing identity and/or on the
839 attribute of the authorized identity.
841 It is strongly recommended to explicitly use the most appropriate
847 clauses, to avoid possible incorrect specifications of the access rules
848 as well as for performance (avoid unrequired regex matching when an exact
849 match suffices) reasons.
851 An administrator might create a rule of the form:
854 access to dn.regex="dc=example,dc=com"
858 expecting it to match all entries in the subtree "dc=example,dc=com".
859 However, this rule actually matches any DN which contains anywhere
860 the substring "dc=example,dc=com". That is, the rule matches both
861 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
863 To match the desired subtree, the rule would be more precisely
867 access to dn.regex="^(.+,)?dc=example,dc=com$"
871 For performance reasons, it would be better to use the subtree style.
874 access to dn.subtree="dc=example,dc=com"
878 When writing submatch rules, it may be convenient to avoid unnecessary
881 use; for instance, to allow access to the subtree of the user
884 clause, one could use
887 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
888 by dn.regex="^uid=$2,dc=example,dc=com$$" write
892 However, since all that is required in the
894 clause is substring expansion, a more efficient solution is
897 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
898 by dn.exact,expand="uid=$2,dc=example,dc=com" write
906 implies substring expansion,
908 as well as all the other DN specific
910 values, does not, so it must be explicitly requested.
915 default slapd configuration file
922 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
925 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
927 is derived from University of Michigan LDAP 3.3 Release.