1 .TH SLAPD.ACCESS 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2006 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[/matchingRule][.<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[/matchingRule][.<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
199 value, unless a different (and compatible) matching rule is specified. If 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>
239 realself[.<selfstyle>]
241 realdn[.<dnstyle>[,<modifier>]]=<DN>
242 realdnattr=<attrname>
244 group[/<objectclass>[/<attrname>]]
245 [.<groupstyle>]=<group>
246 peername[.<peernamestyle>]=<peername>
247 sockname[.<style>]=<sockname>
248 domain[.<domainstyle>[,<modifier>]]=<domain>
249 sockurl[.<style>]=<sockurl>
250 set[.<setstyle>]=<pattern>
257 dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]
263 <style>={exact|regex|expand}
264 <selfstyle>={level{<n>}}
265 <dnstyle>={{exact|base(object)}|regex
266 |one(level)|sub(tree)|children|level{<n>}}
267 <groupstyle>={exact|expand}
268 <peernamestyle>={<style>|ip|path}
269 <domainstyle>={exact|regex|sub(tree)}
270 <setstyle>={exact|regex}
272 <name>=aci <pattern>=<attrname>]
275 They may be specified in combination.
284 The keywords prefixed by
286 act as their counterparts without prefix; the checking respectively occurs
287 with the \fIauthentication\fP DN and the \fIauthorization\fP DN.
291 means access is granted to unauthenticated clients; it is mostly used
292 to limit access to authentication resources (e.g. the
294 attribute) to unauthenticated clients for authentication purposes.
298 means access is granted to authenticated clients.
302 means access to an entry is allowed to the entry itself (e.g. the entry
303 being accessed and the requesting entry must be the same).
306 style, where \fI<n>\fP indicates what ancestor of the DN
307 is to be used in matches.
308 A positive value indicates that the <n>-th ancestor of the user's DN
309 is to be considered; a negative value indicates that the <n>-th ancestor
310 of the target is to be considered.
311 For example, a "\fIby self.level{1} ...\fP" clause would match
312 when the object "\fIdc=example,dc=com\fP" is accessed
313 by "\fIcn=User,dc=example,dc=com\fP".
314 A "\fIby self.level{-1} ...\fP" clause would match when the same user
315 accesses the object "\fIou=Address Book,cn=User,dc=example,dc=com\fP".
319 means that access is granted to the matching DN.
320 The optional style qualifier
322 allows the same choices of the dn form of the
324 field. In addition, the
326 style can exploit substring substitution of submatches in the
328 dn.regex clause by using the form
332 ranging from 0 to 9 (where 0 matches the entire string),
335 for submatches higher than 9.
336 Since the dollar character is used to indicate a substring replacement,
337 the dollar character that is used to indicate match up to the end of
338 the string must be escaped by a second dollar character, e.g.
341 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
342 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
348 At present, the only type allowed is
350 which causes substring substitution of submatches to take place
357 dnstyle in the above example may be of use only if the
359 clause needs to be a regex; otherwise, if the
360 value of the second (from the right)
362 portion of the DN in the above example were fixed, the form
365 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
366 by dn.exact,expand="uid=$2,dc=example,dc=com" write
369 could be used; if it had to match the value in the
374 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
375 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
382 clause other than regex may provide submatches as well.
393 as the match of the entire string.
402 as the match of the rightmost part of the DN as defined in the
405 This may be useful, for instance, to provide access to all the
406 ancestors of a user by defining
409 access to dn.subtree="dc=com"
410 by dn.subtree,expand="$1" read
413 which means that only access to entries that appear in the DN of the
419 form is an extension and a generalization of the
421 form, which matches all DNs whose <n>-th ancestor is the pattern.
422 So, \fIlevel{1}\fP is equivalent to \fIonelevel\fP,
423 and \fIlevel{0}\fP is equivalent to \fIbase\fP.
425 It is perfectly useless to give any access privileges to a DN
426 that exactly matches the
428 of the database the ACLs apply to, because it implicitly
429 possesses write privileges for the entire tree of that database.
430 Actually, access control is bypassed for the
432 to solve the intrinsic chicken-and-egg problem.
436 means that access is granted to requests whose DN is listed in the
437 entry being accessed under the
443 means that access is granted to requests whose DN is listed
444 in the group entry whose DN is given by
446 The optional parameters
450 define the objectClass and the member attributeType of the group entry.
456 The optional style qualifier
462 will be expanded as a replacement string (but not as a regular expression)
469 which means that exact match will be used.
470 If the style of the DN portion of the
472 clause is regex, the submatches are made available according to
476 other styles provide limited submatches as discussed above about
481 For static groups, the specified attributeType must have
484 .B NameAndOptionalUID
485 syntax. For dynamic groups the attributeType must
488 attributeType. Only LDAP URIs of the form
489 .B ldap:///<base>??<scope>?<filter>
490 will be evaluated in a dynamic group, by searching the local server only.
493 .BR peername=<peername> ,
494 .BR sockname=<sockname> ,
495 .BR domain=<domain> ,
497 .BR sockurl=<sockurl>
498 mean that the contacting host IP (in the form
499 .BR "IP=<ip>:<port>" )
500 or the contacting host named pipe file name (in the form
502 if connecting through a named pipe) for
504 the named pipe file name for
506 the contacting host name for
508 and the contacting URL for
515 rules for pattern match described for the
519 style, which implies submatch
521 and regex match of the corresponding connection parameters.
526 clause (the default) implies a case-exact match on the client's
530 prefix and the trailing
536 prefix if connecting through a named pipe.
539 style interprets the pattern as
540 .BR <peername>=<ip>[%<mask>][{<n>}] ,
545 are dotted digit representations of the IP and the mask, while
547 delimited by curly brackets, is an optional port.
548 When checking access privileges, the IP portion of the
550 is extracted, eliminating the
554 part, and it is compared against the
556 portion of the pattern after masking with
559 .B peername.ip=127.0.0.1
560 allows connections only from localhost,
561 .B peername.ip=192.168.1.0%255.255.255.0
562 allows connections from any IP in the 192.168.1 class C domain, and
563 .B peername.ip=192.168.1.16%255.255.255.240{9009}
564 allows connections from any IP in the 192.168.1.[16-31] range
565 of the same domain, only if port 9009 is used.
572 when connecting through a named pipe, and performs an exact match
573 on the given pattern.
576 clause also allows the
578 style, which succeeds when a fully qualified name exactly matches the
580 pattern, or its trailing part, after a
587 style is allowed, implying an
589 match with submatch expansion; the use of
591 as a style modifier is considered more appropriate.
593 .B domain.subtree=example.com
594 will match www.example.com, but will not match www.anotherexample.com.
597 of the contacting host is determined by performing a DNS reverse lookup.
598 As this lookup can easily be spoofed, use of the
600 statement is strongly discouraged. By default, reverse lookups are disabled.
607 option; the only value currently supported is
609 which causes substring substitution of submatches to take place even if
614 much like the analogous usage in
623 .B dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]
624 means that access checking is delegated to the admin-defined method
627 which can be registered at run-time by means of the
635 are optional, and are directly passed to the registered parsing routine.
636 Dynacl is experimental; it must be enabled at compile time.
639 .B dynacl/aci[=<attrname>]
640 means that the access control is determined by the values in the
645 indicates what attributeType holds the ACI information in the entry.
648 operational attribute is used.
649 ACIs are experimental; they must be enabled at compile time.
653 .BR transport_ssf=<n> ,
657 set the minimum required Security Strength Factor (ssf) needed
658 to grant access. The value should be positive integer.
659 .SH THE <ACCESS> FIELD
661 .B <access> ::= [[real]self]{<level>|<priv>}
662 determines the access level or the specific access privileges the
665 Its component are defined as
668 <level> ::= none|disclose|auth|compare|search|read|write
669 <priv> ::= {=|+|-}{w|r|s|c|x|d|0}+
674 allows special operations like having a certain access level or privilege
675 only in case the operation involves the name of the user that's requesting
677 It implies the user that requests access is authorized.
680 refers to the authenticated DN as opposed to the authorized DN of the
685 access to the member attribute of a group, which allows one to add/delete
686 its own DN from the member list of a group, without affecting other members.
690 access model relies on an incremental interpretation of the access
692 The possible levels are
701 Each access level implies all the preceding ones, thus
703 access will imply all accesses.
707 access level disallows all access including disclosure on error.
711 access level allows disclosure of information on error.
715 access level means that one is allowed access to an attribute to perform
716 authentication/authorization operations (e.g.
718 with no other access.
719 This is useful to grant unauthenticated clients the least possible
720 access level to critical resources, like passwords.
724 access model relies on the explicit setting of access privileges
728 sign resets previously defined accesses; as a consequence, the final
729 access privileges will be only those defined by the clause.
734 signs add/remove access privileges to the existing ones.
745 for authentication, and
748 More than one of the above privileges can be added in one statement.
750 indicates no privileges and is used only by itself (e.g., +0).
751 If no access is given, it defaults to
753 .SH THE <CONTROL> FIELD
756 controls the flow of access rule application.
757 It can have the forms
767 the default, means access checking stops in case of match.
768 The other two forms are used to keep on processing access clauses.
771 form allows for other
775 clause to be considered, so that they may result in incrementally altering
776 the privileges, while the
778 form allows for other
780 clauses that match the same target to be processed.
781 Consider the (silly) example
784 access to dn.subtree="dc=example,dc=com" attrs=cn
787 access to dn.subtree="ou=People,dc=example,dc=com"
791 which allows search and compare privileges to everybody under
792 the "dc=example,dc=com" tree, with the second rule allowing
793 also read in the "ou=People" subtree,
794 or the (even more silly) example
797 access to dn.subtree="dc=example,dc=com" attrs=cn
802 which grants everybody search and compare privileges, and adds read
803 privileges to authenticated clients.
805 One useful application is to easily grant write privileges to an
807 that is different from the
809 In this case, since the
811 needs write access to (almost) all data, one can use
815 by dn.exact="cn=The Update DN,dc=example,dc=com" write
819 as the first access rule.
820 As a consequence, unless the operation is performed with the
822 identity, control is passed straight to the subsequent rules.
823 .SH OPERATION REQUIREMENTS
824 Operations require different privileges on different portions of entries.
825 The following summary applies to primary database backends such as
826 the BDB and HDB backends. Requirements for other backends may
827 (and often do) differ.
833 privileges on the pseudo-attribute
835 of the entry being added, and
837 privileges on the pseudo-attribute
839 of the entry's parent.
843 operation, when credentials are stored in the directory, requires
845 privileges on the attribute the credentials are stored in (usually
852 privileges on the attribute that is being compared.
858 privileges on the pseudo-attribute
860 of the entry being deleted, and
864 pseudo-attribute of the entry's parent.
870 privileges on the attributes being modified.
876 privileges on the pseudo-attribute
878 of the entry whose relative DN is being modified,
880 privileges on the pseudo-attribute
882 of the old and new entry's parents, and
884 privileges on the attributes that are present in the new relative DN.
886 privileges are also required on the attributes that are present
887 in the old relative DN if
897 pseudo-attribute of the searchBase (NOTE: this was introduced with 2.3).
898 Then, for each entry, it requires
900 privileges on the attributes that are defined in the filter.
901 The resulting entries are finally tested for
903 privileges on the pseudo-attribute
905 (for read access to the entry itself)
908 access on each value of each attribute that is requested.
911 object used in generating continuation references, the operation requires
913 access on the pseudo-attribute
915 (for read access to the referral object itself),
918 access to the attribute holding the referral information
923 Some internal operations and some
925 require specific access privileges.
932 privileges on all the attributes that are present in the search filter
933 of the URI regexp maps (the right-hand side of the
937 privileges are also required on the
939 attribute of the authorizing identity and/or on the
941 attribute of the authorized identity.
944 Access control to search entries is checked by the frontend,
945 so it is fully honored by all backends; for all other operations
946 and for the discovery phase of the search operation,
947 full ACL semantics is only supported by the primary backends, i.e.
952 Some other backend, like
954 may fully support them; others may only support a portion of the
955 described semantics, or even differ in some aspects.
956 The relevant details are described in the backend-specific man pages.
959 It is strongly recommended to explicitly use the most appropriate
965 clauses, to avoid possible incorrect specifications of the access rules
966 as well as for performance (avoid unnecessary regex matching when an exact
967 match suffices) reasons.
969 An administrator might create a rule of the form:
972 access to dn.regex="dc=example,dc=com"
976 expecting it to match all entries in the subtree "dc=example,dc=com".
977 However, this rule actually matches any DN which contains anywhere
978 the substring "dc=example,dc=com". That is, the rule matches both
979 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
981 To match the desired subtree, the rule would be more precisely
985 access to dn.regex="^(.+,)?dc=example,dc=com$"
989 For performance reasons, it would be better to use the subtree style.
992 access to dn.subtree="dc=example,dc=com"
996 When writing submatch rules, it may be convenient to avoid unnecessary
999 use; for instance, to allow access to the subtree of the user
1002 clause, one could use
1005 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
1006 by dn.regex="^uid=$2,dc=example,dc=com$$" write
1010 However, since all that is required in the
1012 clause is substring expansion, a more efficient solution is
1015 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
1016 by dn.exact,expand="uid=$2,dc=example,dc=com" write
1024 implies substring expansion,
1026 as well as all the other DN specific
1028 values, does not, so it must be explicitly requested.
1033 default slapd configuration file
1041 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1042 .SH ACKNOWLEDGEMENTS
1044 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1046 is derived from University of Michigan LDAP 3.3 Release.