1 .TH SLAPD.ACCESS 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2005 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[.<attrstyle>]=<attrval>
194 specifies access to a particular value of a single attribute.
195 In this case, only a single attribute type may be given. The
198 (the default) uses the attribute's equality matching rule to compare the
203 the provided value is used as a POSIX (''extended'') regular
204 expression pattern. If the attribute has DN syntax, the
212 resulting in base, onelevel, subtree or children match, respectively.
214 The dn, filter, and attrs statements are additive; they can be used in sequence
215 to select entities the access rule applies to based on naming context,
216 value and attribute type simultaneously.
220 indicates whom the access rules apply to.
223 statements can appear in an access control statement, indicating the
224 different access privileges to the same resource that apply to different
226 It can have the forms
234 dn[.<dnstyle>[,<modifier>]]=<DN>
236 group[/<objectclass>[/<attrname>]]
237 [.<groupstyle>]=<group>
238 peername[.<peernamestyle>]=<peername>
239 sockname[.<style>]=<sockname>
240 domain[.<domainstyle>[,<modifier>]]=<domain>
241 sockurl[.<style>]=<sockurl>
242 set[.<setstyle>]=<pattern>
255 <style>={exact|regex|expand}
256 <dnstyle>={{exact|base(object)}|regex
257 |one(level)|sub(tree)|children}
258 <groupstyle>={exact|expand}
259 <peernamestyle>={<style>|ip|path}
260 <domainstyle>={exact|regex|sub(tree)}
261 <setstyle>={exact|regex}
265 They may be specified in combination.
276 means access is granted to unauthenticated clients; it is mostly used
277 to limit access to authentication resources (e.g. the
279 attribute) to unauthenticated clients for authentication purposes.
283 means access is granted to authenticated clients.
287 means access to an entry is allowed to the entry itself (e.g. the entry
288 being accessed and the requesting entry must be the same).
292 means that access is granted to the matching DN.
293 The optional style qualifier
295 allows the same choices of the dn form of the
297 field. In addition, the
299 style can exploit substring substitution of submatches in the
301 dn.regex clause by using the form
305 ranging from 0 to 9 (where 0 matches the entire string),
308 for submatches higher than 9.
309 Since the dollar character is used to indicate a substring replacement,
310 the dollar character that is used to indicate match up to the end of
311 the string must be escaped by a second dollar character, e.g.
314 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
315 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
321 At present, the only type allowed is
323 which causes substring substitution of submatches to take place
330 dnstyle in the above example may be of use only if the
332 clause needs to be a regex; otherwise, if the
333 value of the second (from the right)
335 portion of the DN in the above example were fixed, the form
338 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
339 by dn.exact,expand="uid=$2,dc=example,dc=com" write
342 could be used; if it had to match the value in the
347 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
348 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
355 clause other than regex may provide submatches as well.
366 as the match of the entire string.
375 as the match of the rightmost part of the DN as defined in the
378 This may be useful, for instance, to provide access to all the
379 ancestors of a user by defining
382 access to dn.subtree="dc=com"
383 by dn.subtree,expand="$1" read
386 which means that only access to entries that appear in the DN of the
390 It is perfectly useless to give any access privileges to a DN
391 that exactly matches the
393 of the database the ACLs apply to, because it implicitly
394 possesses write privileges for the entire tree of that database.
395 Actually, access control is bypassed for the
397 to solve the intrinsic chicken-and-egg problem.
401 means that access is granted to requests whose DN is listed in the
402 entry being accessed under the
408 means that access is granted to requests whose DN is listed
409 in the group entry whose DN is given by
411 The optional parameters
415 define the objectClass and the member attributeType of the group entry.
416 The optional style qualifier
422 will be expanded as a replacement string (but not as a regular expression)
429 which means that exact match will be used.
430 If the style of the DN portion of the
432 clause is regex, the submatches are made available according to
436 other styles provide limited submatches as discussed above about
441 For static groups, the specified attributeType must have
444 .B NameAndOptionalUID
445 syntax. For dynamic groups the attributeType must
448 attributeType. Only LDAP URIs of the form
449 .B ldap:///<base>??<scope>?<filter>
450 will be evaluated in a dynamic group, by searching the local server only.
453 .BR peername=<peername> ,
454 .BR sockname=<sockname> ,
455 .BR domain=<domain> ,
457 .BR sockurl=<sockurl>
458 mean that the contacting host IP (in the form
459 .BR "IP=<ip>:<port>" )
460 or the contacting host named pipe file name (in the form
462 if connecting through a named pipe) for
464 the named pipe file name for
466 the contacting host name for
468 and the contacting URL for
475 rules for pattern match described for the
479 style, which implies submatch
481 and regex match of the corresponding connection parameters.
486 clause (the default) implies a case-exact match on the client's
490 prefix and the trailing
496 prefix if connecting through a named pipe.
499 style interprets the pattern as
500 .BR <peername>=<ip>[%<mask>][{<n>}] ,
505 are dotted digit representations of the IP and the mask, while
507 delimited by curly brackets, is an optional port.
508 When checking access privileges, the IP portion of the
510 is extracted, eliminating the
514 part, and it is compared against the
516 portion of the pattern after masking with
519 .B peername.ip=127.0.0.1
520 allows connections only from localhost,
521 .B peername.ip=192.168.1.0%255.255.255.0
522 allows connections from any IP in the 192.168.1 class C domain, and
523 .B peername.ip=192.168.1.16%255.255.255.240{9009}
524 allows connections from any IP in the 192.168.1.[16-31] range
525 of the same domain, only if port 9009 is used.
532 when connecting through a named pipe, and performs an exact match
533 on the given pattern.
536 clause also allows the
538 style, which succeeds when a fully qualified name exactly matches the
540 pattern, or its trailing part, after a
547 style is allowed, implying an
549 match with submatch expansion; the use of
551 as a style modifier is considered more appropriate.
553 .B domain.subtree=example.com
554 will match www.example.com, but will not match www.anotherexample.com.
557 of the contacting host is determined by performing a DNS reverse lookup.
558 As this lookup can easily be spoofed, use of the
560 statement is strongly discouraged. By default, reverse lookups are disabled.
567 option; the only value currently supported is
569 which causes substring substitution of submatches to take place even if
574 much like the analogous usage in
584 means that the access control is determined by the values in the
587 ACIs are experimental; they must be enabled at compile time.
591 .BR transport_ssf=<n> ,
595 set the minimum required Security Strength Factor (ssf) needed
596 to grant access. The value should be positive integer.
597 .SH THE <ACCESS> FIELD
599 .B <access> ::= [self]{<level>|<priv>}
600 determines the access level or the specific access privileges the
603 Its component are defined as
606 <level> ::= none|auth|compare|search|read|write
607 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
612 allows special operations like having a certain access level or privilege
613 only in case the operation involves the name of the user that's requesting
615 It implies the user that requests access is bound.
618 access to the member attribute of a group, which allows one to add/delete
619 its own DN from the member list of a group, without affecting other members.
623 access model relies on an incremental interpretation of the access
625 The possible levels are
633 Each access level implies all the preceding ones, thus
635 access will imply all accesses.
640 access means that one is allowed access to an attribute to perform
641 authentication/authorization operations (e.g.
643 with no other access.
644 This is useful to grant unauthenticated clients the least possible
645 access level to critical resources, like passwords.
649 access model relies on the explicit setting of access privileges
653 sign resets previously defined accesses; as a consequence, the final
654 access privileges will be only those defined by the clause.
659 signs add/remove access privileges to the existing ones.
671 More than one of the above privileges can be added in one statement.
673 indicates no privileges and is used only by itself (e.g., +0).
674 If no access is given, it defaults to
676 .SH THE <CONTROL> FIELD
679 controls the flow of access rule application.
680 It can have the forms
690 the default, means access checking stops in case of match.
691 The other two forms are used to keep on processing access clauses.
694 form allows for other
698 clause to be considered, so that they may result in incrementally altering
699 the privileges, while the
701 form allows for other
703 clauses that match the same target to be processed.
704 Consider the (silly) example
707 access to dn.subtree="dc=example,dc=com" attrs=cn
710 access to dn.subtree="ou=People,dc=example,dc=com"
714 which allows search and compare privileges to everybody under
715 the "dc=example,dc=com" tree, with the second rule allowing
716 also read in the "ou=People" subtree,
717 or the (even more silly) example
720 access to dn.subtree="dc=example,dc=com" attrs=cn
725 which grants everybody search and compare privileges, and adds read
726 privileges to authenticated clients.
727 .SH OPERATION REQUIREMENTS
728 Operations require different privileges on different portions of entries.
729 The following summary applies to primary database backends such as
730 the LDBM, BDB, and HDB backends. Requirements for other backends may
731 (and often do) differ.
737 privileges on the pseudo-attribute
739 of the entry being added, and
741 privileges on the pseudo-attribute
743 of the entry's parent.
747 operation, when credentials are stored in the directory, requires
749 privileges on the attribute the credentials are stored in (usually
756 privileges on the attribute that is being compared.
762 privileges on the pseudo-attribute
764 of the entry being deleted, and
768 pseudo-attribute of the entry's parent.
774 privileges on the attibutes being modified.
780 privileges on the pseudo-attribute
782 of the entry whose relative DN is being modified,
784 privileges on the pseudo-attribute
786 of the old and new entry's parents, and
788 privileges on the attributes that are present in the new relative DN.
790 privileges are also required on the attributes that are present
791 in the old relative DN if
797 operation, for each entry, requires
799 privileges on the attributes that are defined in the filter.
800 Then, the resulting entries are tested for
802 privileges on the pseudo-attribute
804 (for read access to the entry itself)
807 access on each value of each attribute that is requested.
810 object used in generating continuation references, the operation requires
812 access on the pseudo-attribute
814 (for read access to the referral object itself),
817 access to the attribute holding the referral information
822 Some internal operations and some
824 require specific access privileges.
831 privileges on all the attributes that are present in the search filter
832 of the URI regexp maps (the right-hand side of the
836 privileges are also required on the
838 attribute of the authorizing identity and/or on the
840 attribute of the authorized identity.
842 It is strongly recommended to explicitly use the most appropriate
848 clauses, to avoid possible incorrect specifications of the access rules
849 as well as for performance (avoid unrequired regex matching when an exact
850 match suffices) reasons.
852 An administrator might create a rule of the form:
855 access to dn.regex="dc=example,dc=com"
859 expecting it to match all entries in the subtree "dc=example,dc=com".
860 However, this rule actually matches any DN which contains anywhere
861 the substring "dc=example,dc=com". That is, the rule matches both
862 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
864 To match the desired subtree, the rule would be more precisely
868 access to dn.regex="^(.+,)?dc=example,dc=com$"
872 For performance reasons, it would be better to use the subtree style.
875 access to dn.subtree="dc=example,dc=com"
879 When writing submatch rules, it may be convenient to avoid unnecessary
882 use; for instance, to allow access to the subtree of the user
885 clause, one could use
888 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
889 by dn.regex="^uid=$2,dc=example,dc=com$$" write
893 However, since all that is required in the
895 clause is substring expansion, a more efficient solution is
898 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
899 by dn.exact,expand="uid=$2,dc=example,dc=com" write
907 implies substring expansion,
909 as well as all the other DN specific
911 values, does not, so it must be explicitly requested.
916 default slapd configuration file
923 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
926 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
928 is derived from University of Michigan LDAP 3.3 Release.