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
236 dn[.<dnstyle>[,<modifier>]]=<DN>
238 group[/<objectclass>[/<attrname>]]
239 [.<groupstyle>]=<group>
240 peername[.<peernamestyle>]=<peername>
241 sockname[.<style>]=<sockname>
242 domain[.<domainstyle>[,<modifier>]]=<domain>
243 sockurl[.<style>]=<sockurl>
244 set[.<setstyle>]=<pattern>
257 <style>={exact|regex|expand}
258 <dnstyle>={{exact|base(object)}|regex
259 |one(level)|sub(tree)|children}
260 <groupstyle>={exact|expand}
261 <peernamestyle>={<style>|ip|path}
262 <domainstyle>={exact|regex|sub(tree)}
263 <setstyle>={exact|regex}
267 They may be specified in combination.
278 means access is granted to unauthenticated clients; it is mostly used
279 to limit access to authentication resources (e.g. the
281 attribute) to unauthenticated clients for authentication purposes.
285 means access is granted to authenticated clients.
289 means access to an entry is allowed to the entry itself (e.g. the entry
290 being accessed and the requesting entry must be the same).
294 means access to an entry is allowed to the identity set in the
296 operational attribute, if present.
300 means that access is granted to the matching DN.
301 The optional style qualifier
303 allows the same choices of the dn form of the
305 field. In addition, the
307 style can exploit substring substitution of submatches in the
309 dn.regex clause by using the form
313 ranging from 0 to 9 (where 0 matches the entire string),
316 for submatches higher than 9.
317 Since the dollar character is used to indicate a substring replacement,
318 the dollar character that is used to indicate match up to the end of
319 the string must be escaped by a second dollar character, e.g.
322 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
323 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
329 At present, the only type allowed is
331 which causes substring substitution of submatches to take place
338 dnstyle in the above example may be of use only if the
340 clause needs to be a regex; otherwise, if the
341 value of the second (from the right)
343 portion of the DN in the above example were fixed, the form
346 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
347 by dn.exact,expand="uid=$2,dc=example,dc=com" write
350 could be used; if it had to match the value in the
355 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
356 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
363 clause other than regex may provide submatches as well.
374 as the match of the entire string.
383 as the match of the rightmost part of the DN as defined in the
386 This may be useful, for instance, to provide access to all the
387 ancestors of a user by defining
390 access to dn.subtree="dc=com"
391 by dn.subtree,expand="$1" read
394 which means that only access to entries that appear in the DN of the
398 It is perfectly useless to give any access privileges to a DN
399 that exactly matches the
401 of the database the ACLs apply to, because it implicitly
402 possesses write privileges for the entire tree of that database.
403 Actually, access control is bypassed for the
405 to solve the intrinsic chicken-and-egg problem.
409 means that access is granted to requests whose DN is listed in the
410 entry being accessed under the
416 means that access is granted to requests whose DN is listed
417 in the group entry whose DN is given by
419 The optional parameters
423 define the objectClass and the member attributeType of the group entry.
424 The optional style qualifier
430 will be expanded as a replacement string (but not as a regular expression)
437 which means that exact match will be used.
438 If the style of the DN portion of the
440 clause is regex, the submatches are made available according to
444 other styles provide limited submatches as discussed above about
449 For static groups, the specified attributeType must have
452 .B NameAndOptionalUID
453 syntax. For dynamic groups the attributeType must
456 attributeType. Only LDAP URIs of the form
457 .B ldap:///<base>??<scope>?<filter>
458 will be evaluated in a dynamic group, by searching the local server only.
461 .BR peername=<peername> ,
462 .BR sockname=<sockname> ,
463 .BR domain=<domain> ,
465 .BR sockurl=<sockurl>
466 mean that the contacting host IP (in the form
467 .BR "IP=<ip>:<port>" )
468 or the contacting host named pipe file name (in the form
470 if connecting through a named pipe) for
472 the named pipe file name for
474 the contacting host name for
476 and the contacting URL for
483 rules for pattern match described for the
487 style, which implies submatch
489 and regex match of the corresponding connection parameters.
494 clause (the default) implies a case-exact match on the client's
498 prefix and the trailing
504 prefix if connecting through a named pipe.
507 style interprets the pattern as
508 .BR <peername>=<ip>[%<mask>][{<n>}] ,
513 are dotted digit representations of the IP and the mask, while
515 delimited by curly brackets, is an optional port.
516 When checking access privileges, the IP portion of the
518 is extracted, eliminating the
522 part, and it is compared against the
524 portion of the pattern after masking with
527 .B peername.ip=127.0.0.1
528 allows connections only from localhost,
529 .B peername.ip=192.168.1.0%255.255.255.0
530 allows connections from any IP in the 192.168.1 class C domain, and
531 .B peername.ip=192.168.1.16%255.255.255.240{9009}
532 allows connections from any IP in the 192.168.1.[16-31] range
533 of the same domain, only if port 9009 is used.
540 when connecting through a named pipe, and performs an exact match
541 on the given pattern.
544 clause also allows the
546 style, which succeeds when a fully qualified name exactly matches the
548 pattern, or its trailing part, after a
555 style is allowed, implying an
557 match with submatch expansion; the use of
559 as a style modifier is considered more appropriate.
561 .B domain.subtree=example.com
562 will match www.example.com, but will not match www.anotherexample.com.
565 of the contacting host is determined by performing a DNS reverse lookup.
566 As this lookup can easily be spoofed, use of the
568 statement is strongly discouraged. By default, reverse lookups are disabled.
575 option; the only value currently supported is
577 which causes substring substitution of submatches to take place even if
582 much like the analogous usage in
592 means that the access control is determined by the values in the
595 ACIs are experimental; they must be enabled at compile time.
599 .BR transport_ssf=<n> ,
603 set the minimum required Security Strength Factor (ssf) needed
604 to grant access. The value should be positive integer.
605 .SH THE <ACCESS> FIELD
607 .B <access> ::= [self]{<level>|<priv>}
608 determines the access level or the specific access privileges the
611 Its component are defined as
614 <level> ::= none|auth|compare|search|read|write
615 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
620 allows special operations like having a certain access level or privilege
621 only in case the operation involves the name of the user that's requesting
623 It implies the user that requests access is bound.
626 access to the member attribute of a group, which allows one to add/delete
627 its own DN from the member list of a group, without affecting other members.
631 access model relies on an incremental interpretation of the access
633 The possible levels are
641 Each access level implies all the preceding ones, thus
643 access will imply all accesses.
648 access means that one is allowed access to an attribute to perform
649 authentication/authorization operations (e.g.
651 with no other access.
652 This is useful to grant unauthenticated clients the least possible
653 access level to critical resources, like passwords.
657 access model relies on the explicit setting of access privileges
661 sign resets previously defined accesses; as a consequence, the final
662 access privileges will be only those defined by the clause.
667 signs add/remove access privileges to the existing ones.
679 More than one of the above privileges can be added in one statement.
681 indicates no privileges and is used only by itself (e.g., +0).
682 If no access is given, it defaults to
684 .SH THE <CONTROL> FIELD
687 controls the flow of access rule application.
688 It can have the forms
698 the default, means access checking stops in case of match.
699 The other two forms are used to keep on processing access clauses.
702 form allows for other
706 clause to be considered, so that they may result in incrementally altering
707 the privileges, while the
709 form allows for other
711 clauses that match the same target to be processed.
712 Consider the (silly) example
715 access to dn.subtree="dc=example,dc=com" attrs=cn
718 access to dn.subtree="ou=People,dc=example,dc=com"
722 which allows search and compare privileges to everybody under
723 the "dc=example,dc=com" tree, with the second rule allowing
724 also read in the "ou=People" subtree,
725 or the (even more silly) example
728 access to dn.subtree="dc=example,dc=com" attrs=cn
733 which grants everybody search and compare privileges, and adds read
734 privileges to authenticated clients.
735 .SH OPERATION REQUIREMENTS
736 Operations require different privileges on different portions of entries.
737 The following summary applies to primary database backends such as
738 the LDBM, BDB, and HDB backends. Requirements for other backends may
739 (and often do) differ.
745 privileges on the pseudo-attribute
747 of the entry being added, and
749 privileges on the pseudo-attribute
751 of the entry's parent.
755 operation, when credentials are stored in the directory, requires
757 privileges on the attribute the credentials are stored in (usually
764 privileges on the attribute that is being compared.
770 privileges on the pseudo-attribute
772 of the entry being deleted, and
776 pseudo-attribute of the entry's parent.
782 privileges on the attibutes being modified.
788 privileges on the pseudo-attribute
790 of the entry whose relative DN is being modified,
792 privileges on the pseudo-attribute
794 of the old and new entry's parents, and
796 privileges on the attributes that are present in the new relative DN.
798 privileges are also required on the attributes that are present
799 in the old relative DN if
805 operation, for each entry, requires
807 privileges on the attributes that are defined in the filter.
808 Then, the resulting entries are tested for
810 privileges on the pseudo-attribute
812 (for read access to the entry itself)
815 access on each value of each attribute that is requested.
818 object used in generating continuation references, the operation requires
820 access on the pseudo-attribute
822 (for read access to the referral object itself),
825 access to the attribute holding the referral information
830 Some internal operations and some
832 require specific access privileges.
839 privileges on all the attributes that are present in the search filter
840 of the URI regexp maps (the right-hand side of the
844 privileges are also required on the
846 attribute of the authorizing identity and/or on the
848 attribute of the authorized identity.
850 It is strongly recommended to explicitly use the most appropriate
856 clauses, to avoid possible incorrect specifications of the access rules
857 as well as for performance (avoid unrequired regex matching when an exact
858 match suffices) reasons.
860 An administrator might create a rule of the form:
863 access to dn.regex="dc=example,dc=com"
867 expecting it to match all entries in the subtree "dc=example,dc=com".
868 However, this rule actually matches any DN which contains anywhere
869 the substring "dc=example,dc=com". That is, the rule matches both
870 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
872 To match the desired subtree, the rule would be more precisely
876 access to dn.regex="^(.+,)?dc=example,dc=com$"
880 For performance reasons, it would be better to use the subtree style.
883 access to dn.subtree="dc=example,dc=com"
887 When writing submatch rules, it may be convenient to avoid unnecessary
890 use; for instance, to allow access to the subtree of the user
893 clause, one could use
896 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
897 by dn.regex="^uid=$2,dc=example,dc=com$$" write
901 However, since all that is required in the
903 clause is substring expansion, a more efficient solution is
906 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
907 by dn.exact,expand="uid=$2,dc=example,dc=com" write
915 implies substring expansion,
917 as well as all the other DN specific
919 values, does not, so it must be explicitly requested.
924 default slapd configuration file
931 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
934 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
936 is derived from University of Michigan LDAP 3.3 Release.