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
78 Lists of access directives are evaluated in the order they appear
82 clause matches the datum whose access is being evaluated, its
84 clause list is checked.
87 clause matches the accessor's properties, its
91 clauses are evaluated.
92 Access control checking stops at the first match of the
96 clause, unless otherwise dictated by the
101 clause list is implicitly terminated by a
107 clause that results in stopping the access control with no access
111 clause list is implicitly terminated by a
118 clause that results in granting no access privileges to an otherwise
123 specifies the entity the access control directive applies to.
124 It can have the forms
127 dn[.<dnstyle>]=<dnpattern>
129 attrs=<attrlist>[ val[/matchingRule][.<attrstyle>]=<attrval>]
135 <dnstyle>={{exact|base(object)}|regex
136 |one(level)|sub(tree)|children}
137 <attrlist>={<attr>|[{!|@}]<objectClass>}[,<attrlist>]
138 <attrstyle>={{exact|base(object)}|regex
139 |one(level)|sub(tree)|children}
144 selects the entries based on their naming context.
147 is a string representation of the entry's DN.
150 stands for all the entries, and it is implied if no
156 is optional; however, it is recommended to specify it to avoid ambiguities.
165 indicates the entry whose DN is equal to the
170 indicates all the entries immediately below the
175 indicates all entries in the subtree at the
178 indicates all the entries below (subordinate to) the
187 is a POSIX (''extended'') regular expression pattern,
192 matching a normalized string representation of the entry's DN.
193 The regex form of the pattern does not (yet) support UTF\-8.
196 .B filter=<ldapfilter>
197 selects the entries based on a valid LDAP filter as described in RFC 4515.
206 selects the attributes the access control rule applies to.
207 It is a comma-separated list of attribute types, plus the special names
209 indicating access to the entry itself, and
211 indicating access to the entry's children. ObjectClass names may also
212 be specified in this list, which will affect all the attributes that
213 are required and/or allowed by that objectClass.
218 are directly treated as objectClass names. A name prefixed by
220 is also treated as an objectClass, but in this case the access rule
221 affects the attributes that are not required nor allowed
226 .B attrs=@extensibleObject
227 is implied, i.e. all attributes are addressed.
230 .B attrs=<attr> val[/matchingRule][.<attrstyle>]=<attrval>
231 specifies access to a particular value of a single attribute.
232 In this case, only a single attribute type may be given. The
235 (the default) uses the attribute's equality matching rule to compare the
236 value, unless a different (and compatible) matching rule is specified. If the
240 the provided value is used as a POSIX (''extended'') regular
241 expression pattern. If the attribute has DN syntax, the
249 resulting in base, onelevel, subtree or children match, respectively.
251 The dn, filter, and attrs statements are additive; they can be used in sequence
252 to select entities the access rule applies to based on naming context,
253 value and attribute type simultaneously.
257 indicates whom the access rules apply to.
260 statements can appear in an access control statement, indicating the
261 different access privileges to the same resource that apply to different
263 It can have the forms
271 dn[.<dnstyle>[,<modifier>]]=<DN>
276 realself[.<selfstyle>]
278 realdn[.<dnstyle>[,<modifier>]]=<DN>
279 realdnattr=<attrname>
281 group[/<objectclass>[/<attrname>]]
282 [.<groupstyle>]=<group>
283 peername[.<peernamestyle>]=<peername>
284 sockname[.<style>]=<sockname>
285 domain[.<domainstyle>[,<modifier>]]=<domain>
286 sockurl[.<style>]=<sockurl>
287 set[.<setstyle>]=<pattern>
294 dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]
300 <style>={exact|regex|expand}
301 <selfstyle>={level{<n>}}
302 <dnstyle>={{exact|base(object)}|regex
303 |one(level)|sub(tree)|children|level{<n>}}
304 <groupstyle>={exact|expand}
305 <peernamestyle>={<style>|ip|path}
306 <domainstyle>={exact|regex|sub(tree)}
307 <setstyle>={exact|regex}
309 <name>=aci <pattern>=<attrname>]
312 They may be specified in combination.
321 The keywords prefixed by
323 act as their counterparts without prefix; the checking respectively occurs
324 with the \fIauthentication\fP DN and the \fIauthorization\fP DN.
328 means access is granted to unauthenticated clients; it is mostly used
329 to limit access to authentication resources (e.g. the
331 attribute) to unauthenticated clients for authentication purposes.
335 means access is granted to authenticated clients.
339 means access to an entry is allowed to the entry itself (e.g. the entry
340 being accessed and the requesting entry must be the same).
343 style, where \fI<n>\fP indicates what ancestor of the DN
344 is to be used in matches.
345 A positive value indicates that the <n>-th ancestor of the user's DN
346 is to be considered; a negative value indicates that the <n>-th ancestor
347 of the target is to be considered.
348 For example, a "\fIby self.level{1} ...\fP" clause would match
349 when the object "\fIdc=example,dc=com\fP" is accessed
350 by "\fIcn=User,dc=example,dc=com\fP".
351 A "\fIby self.level{-1} ...\fP" clause would match when the same user
352 accesses the object "\fIou=Address Book,cn=User,dc=example,dc=com\fP".
356 means that access is granted to the matching DN.
357 The optional style qualifier
359 allows the same choices of the dn form of the
361 field. In addition, the
363 style can exploit substring substitution of submatches in the
365 dn.regex clause by using the form
369 ranging from 0 to 9 (where 0 matches the entire string),
372 for submatches higher than 9.
373 Since the dollar character is used to indicate a substring replacement,
374 the dollar character that is used to indicate match up to the end of
375 the string must be escaped by a second dollar character, e.g.
378 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
379 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
385 At present, the only type allowed is
387 which causes substring substitution of submatches to take place
394 dnstyle in the above example may be of use only if the
396 clause needs to be a regex; otherwise, if the
397 value of the second (from the right)
399 portion of the DN in the above example were fixed, the form
402 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
403 by dn.exact,expand="uid=$2,dc=example,dc=com" write
406 could be used; if it had to match the value in the
411 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
412 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
419 clause other than regex may provide submatches as well.
430 as the match of the entire string.
439 as the match of the rightmost part of the DN as defined in the
442 This may be useful, for instance, to provide access to all the
443 ancestors of a user by defining
446 access to dn.subtree="dc=com"
447 by dn.subtree,expand="$1" read
450 which means that only access to entries that appear in the DN of the
456 form is an extension and a generalization of the
458 form, which matches all DNs whose <n>-th ancestor is the pattern.
459 So, \fIlevel{1}\fP is equivalent to \fIonelevel\fP,
460 and \fIlevel{0}\fP is equivalent to \fIbase\fP.
462 It is perfectly useless to give any access privileges to a DN
463 that exactly matches the
465 of the database the ACLs apply to, because it implicitly
466 possesses write privileges for the entire tree of that database.
467 Actually, access control is bypassed for the
469 to solve the intrinsic chicken-and-egg problem.
473 means that access is granted to requests whose DN is listed in the
474 entry being accessed under the
480 means that access is granted to requests whose DN is listed
481 in the group entry whose DN is given by
483 The optional parameters
487 define the objectClass and the member attributeType of the group entry.
493 The optional style qualifier
499 will be expanded as a replacement string (but not as a regular expression)
506 which means that exact match will be used.
507 If the style of the DN portion of the
509 clause is regex, the submatches are made available according to
513 other styles provide limited submatches as discussed above about
518 For static groups, the specified attributeType must have
521 .B NameAndOptionalUID
522 syntax. For dynamic groups the attributeType must
525 attributeType. Only LDAP URIs of the form
526 .B ldap:///<base>??<scope>?<filter>
527 will be evaluated in a dynamic group, by searching the local server only.
530 .BR peername=<peername> ,
531 .BR sockname=<sockname> ,
532 .BR domain=<domain> ,
534 .BR sockurl=<sockurl>
535 mean that the contacting host IP (in the form
536 .BR "IP=<ip>:<port>" )
537 or the contacting host named pipe file name (in the form
539 if connecting through a named pipe) for
541 the named pipe file name for
543 the contacting host name for
545 and the contacting URL for
552 rules for pattern match described for the
556 style, which implies submatch
558 and regex match of the corresponding connection parameters.
563 clause (the default) implies a case-exact match on the client's
567 prefix and the trailing
573 prefix if connecting through a named pipe.
576 style interprets the pattern as
577 .BR <peername>=<ip>[%<mask>][{<n>}] ,
582 are dotted digit representations of the IP and the mask, while
584 delimited by curly brackets, is an optional port.
585 When checking access privileges, the IP portion of the
587 is extracted, eliminating the
591 part, and it is compared against the
593 portion of the pattern after masking with
596 .B peername.ip=127.0.0.1
597 allows connections only from localhost,
598 .B peername.ip=192.168.1.0%255.255.255.0
599 allows connections from any IP in the 192.168.1 class C domain, and
600 .B peername.ip=192.168.1.16%255.255.255.240{9009}
601 allows connections from any IP in the 192.168.1.[16-31] range
602 of the same domain, only if port 9009 is used.
609 when connecting through a named pipe, and performs an exact match
610 on the given pattern.
613 clause also allows the
615 style, which succeeds when a fully qualified name exactly matches the
617 pattern, or its trailing part, after a
624 style is allowed, implying an
626 match with submatch expansion; the use of
628 as a style modifier is considered more appropriate.
630 .B domain.subtree=example.com
631 will match www.example.com, but will not match www.anotherexample.com.
634 of the contacting host is determined by performing a DNS reverse lookup.
635 As this lookup can easily be spoofed, use of the
637 statement is strongly discouraged. By default, reverse lookups are disabled.
644 option; the only value currently supported is
646 which causes substring substitution of submatches to take place even if
651 much like the analogous usage in
660 .B dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]
661 means that access checking is delegated to the admin-defined method
664 which can be registered at run-time by means of the
672 are optional, and are directly passed to the registered parsing routine.
673 Dynacl is experimental; it must be enabled at compile time.
676 .B dynacl/aci[=<attrname>]
677 means that the access control is determined by the values in the
682 indicates what attributeType holds the ACI information in the entry.
685 operational attribute is used.
686 ACIs are experimental; they must be enabled at compile time.
690 .BR transport_ssf=<n> ,
694 set the minimum required Security Strength Factor (ssf) needed
695 to grant access. The value should be positive integer.
696 .SH THE <ACCESS> FIELD
698 .B <access> ::= [[real]self]{<level>|<priv>}
699 determines the access level or the specific access privileges the
702 Its component are defined as
705 <level> ::= none|disclose|auth|compare|search|read|write|manage
706 <priv> ::= {=|+|-}{m|w|r|s|c|x|d|0}+
711 allows special operations like having a certain access level or privilege
712 only in case the operation involves the name of the user that's requesting
714 It implies the user that requests access is authorized.
717 refers to the authenticated DN as opposed to the authorized DN of the
722 access to the member attribute of a group, which allows one to add/delete
723 its own DN from the member list of a group, without affecting other members.
727 access model relies on an incremental interpretation of the access
729 The possible levels are
738 Each access level implies all the preceding ones, thus
740 grants all access including administrative access,
744 access level disallows all access including disclosure on error.
748 access level allows disclosure of information on error.
752 access level means that one is allowed access to an attribute to perform
753 authentication/authorization operations (e.g.
755 with no other access.
756 This is useful to grant unauthenticated clients the least possible
757 access level to critical resources, like passwords.
761 access model relies on the explicit setting of access privileges
765 sign resets previously defined accesses; as a consequence, the final
766 access privileges will be only those defined by the clause.
771 signs add/remove access privileges to the existing ones.
784 for authentication, and
787 More than one of the above privileges can be added in one statement.
789 indicates no privileges and is used only by itself (e.g., +0).
791 If no access is given, it defaults to
793 .SH THE <CONTROL> FIELD
796 controls the flow of access rule application.
797 It can have the forms
807 the default, means access checking stops in case of match.
808 The other two forms are used to keep on processing access clauses.
811 form allows for other
815 clause to be considered, so that they may result in incrementally altering
816 the privileges, while the
818 form allows for other
820 clauses that match the same target to be processed.
821 Consider the (silly) example
824 access to dn.subtree="dc=example,dc=com" attrs=cn
827 access to dn.subtree="ou=People,dc=example,dc=com"
831 which allows search and compare privileges to everybody under
832 the "dc=example,dc=com" tree, with the second rule allowing
833 also read in the "ou=People" subtree,
834 or the (even more silly) example
837 access to dn.subtree="dc=example,dc=com" attrs=cn
842 which grants everybody search and compare privileges, and adds read
843 privileges to authenticated clients.
845 One useful application is to easily grant write privileges to an
847 that is different from the
849 In this case, since the
851 needs write access to (almost) all data, one can use
855 by dn.exact="cn=The Update DN,dc=example,dc=com" write
859 as the first access rule.
860 As a consequence, unless the operation is performed with the
862 identity, control is passed straight to the subsequent rules.
864 .SH OPERATION REQUIREMENTS
865 Operations require different privileges on different portions of entries.
866 The following summary applies to primary database backends such as
867 the BDB and HDB backends. Requirements for other backends may
868 (and often do) differ.
875 privileges on the pseudo-attribute
877 of the entry being added, and
879 privileges on the pseudo-attribute
881 of the entry's parent.
882 When adding the suffix entry of a database, write access to
884 of the empty DN ("") is required.
889 operation, when credentials are stored in the directory, requires
891 privileges on the attribute the credentials are stored in (usually
899 privileges on the attribute that is being compared.
906 privileges on the pseudo-attribute
908 of the entry being deleted, and
912 pseudo-attribute of the entry's parent.
919 privileges on the attributes being modified.
926 privileges on the pseudo-attribute
928 of the entry whose relative DN is being modified,
930 privileges on the pseudo-attribute
932 of the old and new entry's parents, and
934 privileges on the attributes that are present in the new relative DN.
936 privileges are also required on the attributes that are present
937 in the old relative DN if
948 pseudo-attribute of the searchBase (NOTE: this was introduced with 2.3).
949 Then, for each entry, it requires
951 privileges on the attributes that are defined in the filter.
952 The resulting entries are finally tested for
954 privileges on the pseudo-attribute
956 (for read access to the entry itself)
959 access on each value of each attribute that is requested.
962 object used in generating continuation references, the operation requires
964 access on the pseudo-attribute
966 (for read access to the referral object itself),
969 access to the attribute holding the referral information
975 Some internal operations and some
977 require specific access privileges.
984 privileges on all the attributes that are present in the search filter
985 of the URI regexp maps (the right-hand side of the
989 privileges are also required on the
991 attribute of the authorizing identity and/or on the
993 attribute of the authorized identity.
996 Access control to search entries is checked by the frontend,
997 so it is fully honored by all backends; for all other operations
998 and for the discovery phase of the search operation,
999 full ACL semantics is only supported by the primary backends, i.e.
1004 Some other backend, like
1006 may fully support them; others may only support a portion of the
1007 described semantics, or even differ in some aspects.
1008 The relevant details are described in the backend-specific man pages.
1011 It is strongly recommended to explicitly use the most appropriate
1017 clauses, to avoid possible incorrect specifications of the access rules
1018 as well as for performance (avoid unnecessary regex matching when an exact
1019 match suffices) reasons.
1021 An administrator might create a rule of the form:
1024 access to dn.regex="dc=example,dc=com"
1028 expecting it to match all entries in the subtree "dc=example,dc=com".
1029 However, this rule actually matches any DN which contains anywhere
1030 the substring "dc=example,dc=com". That is, the rule matches both
1031 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
1033 To match the desired subtree, the rule would be more precisely
1037 access to dn.regex="^(.+,)?dc=example,dc=com$"
1041 For performance reasons, it would be better to use the subtree style.
1044 access to dn.subtree="dc=example,dc=com"
1048 When writing submatch rules, it may be convenient to avoid unnecessary
1051 use; for instance, to allow access to the subtree of the user
1054 clause, one could use
1057 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
1058 by dn.regex="^uid=$2,dc=example,dc=com$$" write
1062 However, since all that is required in the
1064 clause is substring expansion, a more efficient solution is
1067 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
1068 by dn.exact,expand="uid=$2,dc=example,dc=com" write
1076 implies substring expansion,
1078 as well as all the other DN specific
1080 values, does not, so it must be explicitly requested.
1085 default slapd configuration file
1093 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1094 .SH ACKNOWLEDGEMENTS
1096 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1098 is derived from University of Michigan LDAP 3.3 Release.