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 For entries not held in any backend (such as a root DSE), the
56 directives of the first backend (and any global directives) are
59 Arguments that should be replaced by actual text are shown in
61 .SH THE ACCESS DIRECTIVE
62 The structure of the access control directives is
64 .B access to <what> "[ by <who> <access> [ <control> ] ]+"
65 Grant access (specified by
67 to a set of entries and/or attributes (specified by
69 by one or more requestors (specified by
74 specifies the entity the access control directive applies to.
78 [dn[.<dnstyle>]=]<dnpattern>
80 attrs=<attrlist>[ val[.<attrstyle>]=<attrval>]
86 <dnstyle>={{exact|base(object)}|regex
87 |one(level)|sub(tree)|children}
88 <attrlist>={<attr>|[{!|@}]<objectClass>}[,<attrlist>]
89 <attrstyle>={{exact|base(object)}|regex
90 |one(level)|sub(tree)|children}
95 selects the entries based on their naming context.
101 is a string representation of the entry's DN.
104 stands for all the entries, and it is implied if no
110 is also optional; however, it is recommended to specify both the
114 to avoid ambiguities.
123 indicates the entry whose DN is equal to the
128 indicates all the entries immediately below the
133 indicates all entries in the subtree at the
136 indicates all the entries below (subordinate to) the
145 is a regular expression pattern,
148 matching a normalized string representation of the entry's DN.
149 The regex form of the pattern does not (yet) support UTF-8.
152 .B filter=<ldapfilter>
153 selects the entries based on a valid LDAP filter as described in RFC 2254.
162 selects the attributes the access control rule applies to.
163 It is a comma-separated list of attribute types, plus the special names
165 indicating access to the entry itself, and
167 indicating access to the entry's children. ObjectClass names may also
168 be specified in this list, which will affect all the attributes that
169 are required and/or allowed by that objectClass.
174 are directly treated as objectClass names. A name prefixed by
176 is also treated as an objectClass, but in this case the access rule
177 affects the attributes that are not required nor allowed
182 .B attrs=@extensibleObject
183 is implied, i.e. all attributes are addressed.
186 .B attrs=<attr> val[.<style>]=<attrval>
187 specifies access to a particular value of a single attribute.
188 In this case, only a single attribute type may be given. A value
192 (the default) uses the attribute's equality matching rule to compare the
197 the provided value is used as a regular expression pattern.
198 If the attribute has DN syntax, the value
206 resulting in base, onelevel, subtree or children match, respectively.
208 The dn, filter, and attrs statements are additive; they can be used in sequence
209 to select entities the access rule applies to based on naming context,
210 value and attribute type simultaneously.
214 indicates whom the access rules apply to.
217 statements can appear in an access control statement, indicating the
218 different access privileges to the same resource that apply to different
220 It can have the forms
228 dn[.<dnstyle>[,<modifier>]]=<DN>
230 group[/<objectclass>[/<attrname>]]
231 [.<groupstyle>]=<group>
232 peername[.<peernamestyle>]=<peername>
233 sockname[.<style>]=<sockname>
234 domain[.<domainstyle>[,<modifier>]]=<domain>
235 sockurl[.<style>]=<sockurl>
236 set[.<setstyle>]=<pattern>
249 <style>={exact|regex|expand}
250 <dnstyle>={{exact|base(object)}|regex
251 |one(level)|sub(tree)|children}
252 <groupstyle>={exact|expand}
253 <peernamestyle>={<style>|ip|path}
254 <domainstyle>={exact|regex|sub(tree)}
255 <setstyle>={exact|regex}
259 They may be specified in combination.
270 means access is granted to unauthenticated clients; it is mostly used
271 to limit access to authentication resources (e.g. the
273 attribute) to unauthenticated clients for authentication purposes.
277 means access is granted to authenticated clients.
281 means access to an entry is allowed to the entry itself (e.g. the entry
282 being accessed and the requesting entry must be the same).
286 means that access is granted to the matching DN.
287 The optional style qualifier
289 allows the same choices of the dn form of the
291 field. In addition, the
293 style can exploit substring substitution of submatches in the
295 dn.regex clause by using the form
299 ranging from 0 to 9 (where 0 matches the entire string),
302 for submatches higher than 9.
303 Since the dollar character is used to indicate a substring replacement,
304 the dollar character that is used to indicate match up to the end of
305 the string must be escaped by a second dollar character, e.g.
308 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
309 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
315 At present, the only type allowed is
317 which causes substring substitution of submatches to take place
324 dnstyle in the above example may be of use only if the
326 clause needs to be a regex; otherwise, if the
327 value of the second (from the right)
329 portion of the DN in the above example were fixed, the form
332 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
333 by dn.exact,expand="uid=$2,dc=example,dc=com" write
336 could be used; if it had to match the value in the
341 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
342 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
349 clause other than regex may provide submatches as well.
360 as the match of the entire string.
369 as the match of the rightmost part of the DN as defined in the
372 This may be useful, for instance, to provide access to all the
373 ancestors of a user by defining
376 access to dn.subtree="dc=com"
377 by dn.subtree,expand="$1" read
380 which means that only access to entries that appear in the DN of the
384 It is perfectly useless to give any access privileges to a DN
385 that exactly matches the
387 of the database the ACLs apply to, because it implicitly
388 possesses write privileges for the entire tree of that database.
389 Actually, access control is bypassed for the
391 to solve the intrinsic chicken-and-egg problem.
395 means that access is granted to requests whose DN is listed in the
396 entry being accessed under the
402 means that access is granted to requests whose DN is listed
403 in the group entry whose DN is given by
405 The optional parameters
409 define the objectClass and the member attributeType of the group entry.
410 The optional style qualifier
416 will be expanded as a replacement string (but not as a regular expression)
421 which means that exact match will be used.
422 If the style of the DN portion of the
424 clause is regex, the submatches are made available according to
426 other styles provide limited submatches as discussed above about
431 For static groups, the specified attributeType must have
434 .B NameAndOptionalUID
435 syntax. For dynamic groups the attributeType must
438 attributeType. Only LDAP URIs of the form
439 .B ldap:///<base>??<scope>?<filter>
440 will be evaluated in a dynamic group, by searching the local server only.
443 .BR peername=<peername> ,
444 .BR sockname=<sockname> ,
445 .BR domain=<domain> ,
447 .BR sockurl=<sockurl>
448 mean that the contacting host IP (in the form
449 .BR "IP=<ip>:<port>" )
450 or the contacting host named pipe file name (in the form
452 if connecting through a named pipe) for
454 the named pipe file name for
456 the contacting host name for
458 and the contacting URL for
465 rules for pattern match described for the
469 style, which implies submatch
473 match of the corresponding connection parameters.
478 clause (the default) implies a case-exact match on the client's
482 prefix and the trailing
488 prefix if connecting through a named pipe.
491 style interprets the pattern as
492 .BR <peername>=<ip>[%<mask>][{<n>}] ,
497 are dotted digit representations of the IP and the mask, while
499 delimited by curly brackets, is an optional port.
500 When checking access privileges, the IP portion of the
502 is extracted, eliminating the
506 part, and it is compared against the
508 portion of the pattern after masking with
511 .B peername.ip=127.0.0.1
512 allows connections only from localhost,
513 .B peername.ip=192.168.1.0%255.255.255.0
514 allows connections from any IP in the 192.168.1 class C domain, and
515 .B peername.ip=192.168.1.16%255.255.255.240{9009}
516 allows connections from any IP in the 192.168.1.[16-31] range
517 of the same domain, only if port 9009 is used.
524 when connecting through a named pipe, and performs an exact match
525 on the given pattern.
528 clause also allows the
530 style, which succeeds when a fully qualified name exactly matches the
532 pattern, or its trailing part, after a
539 style is allowed, implying an
541 match with submatch expansion; the use of
543 as a style modifier is considered more appropriate.
545 .B domain.subtree=example.com
546 will match www.example.com, but will not match www.anotherexample.com.
549 of the contacting host is determined by performing a DNS reverse lookup.
550 As this lookup can easily be spoofed, use of the
552 statement is strongly discouraged. By default, reverse lookups are disabled.
559 option; the only value currently supported is
561 which causes substring substitution of submatches to take place even if
566 much like the analogous usage in
576 means that the access control is determined by the values in the
579 ACIs are experimental; they must be enabled at compile time.
583 .BR transport_ssf=<n> ,
587 set the minimum required Security Strength Factor (ssf) needed
588 to grant access. The value should be positive integer.
589 .SH THE <ACCESS> FIELD
591 .B <access> ::= [self]{<level>|<priv>}
592 determines the access level or the specific access privileges the
595 Its component are defined as
598 <level> ::= none|auth|compare|search|read|write
599 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
604 allows special operations like having a certain access level or privilege
605 only in case the operation involves the name of the user that's requesting
607 It implies the user that requests access is bound.
610 access to the member attribute of a group, which allows one to add/delete
611 its own DN from the member list of a group, without affecting other members.
615 access model relies on an incremental interpretation of the access
617 The possible levels are
625 Each access level implies all the preceding ones, thus
627 access will imply all accesses.
632 access means that one is allowed access to an attribute to perform
633 authentication/authorization operations (e.g.
635 with no other access.
636 This is useful to grant unauthenticated clients the least possible
637 access level to critical resources, like passwords.
641 access model relies on the explicit setting of access privileges
645 sign resets previously defined accesses; as a consequence, the final
646 access privileges will be only those defined by the clause.
651 signs add/remove access privileges to the existing ones.
663 More than one of the above privileges can be added in one statement.
665 indicates no privileges and is used only by itself (e.g., +0).
669 controls the flow of access rule application.
670 It can have the forms
680 the default, means access checking stops in case of match.
681 The other two forms are used to keep on processing access clauses.
684 form allows for other
688 clause to be considered, so that they may result in incrementally altering
689 the privileges, while the
691 form allows for other
693 clauses that match the same target to be processed.
694 Consider the (silly) example
697 access to dn.subtree="dc=example,dc=com" attrs=cn
700 access to dn.subtree="ou=People,dc=example,dc=com"
704 which allows search and compare privileges to everybody under
705 the "dc=example,dc=com" tree, with the second rule allowing
706 also read in the "ou=People" subtree,
707 or the (even more silly) example
710 access to dn.subtree="dc=example,dc=com" attrs=cn
715 which grants everybody search and compare privileges, and adds read
716 privileges to authenticated clients.
717 .SH OPERATION REQUIREMENTS
718 Operations require different privileges on different portions of entries.
719 The following summary applies to primary database backends such as
720 the LDBM, BDB, and HDB backends. Requirements for other backends may
721 (and often do) differ.
727 privileges on the pseudo-attribute
729 of the entry being added, and
731 privileges on the pseudo-attribute
733 of the entry's parent.
737 operation, when credentials are stored in the directory, requires
739 privileges on the attribute the credentials are stored in (usually
746 privileges on the attribute that is being compared.
752 privileges on the pseudo-attribute
754 of the entry being deleted, and
758 pseudo-attribute of the entry's parent.
764 privileges on the attibutes being modified.
770 privileges on the pseudo-attribute
772 of the entry whose relative DN is being modified,
774 privileges on the pseudo-attribute
776 of the old and new entry's parents, and
778 privileges on the attributes that are present in the new relative DN.
780 privileges are also required on the attributes that are present
781 in the old relative DN if
787 operation, for each entry, requires
789 privileges on the attributes that are defined in the filter.
790 Then, the resulting entries are tested for
792 privileges on the pseudo-attribute
794 (for read access to the entry itself)
797 access on each value of each attribute that is requested.
800 object used in generating continuation references, the operation requires
802 access on the pseudo-attribute
804 (for read access to the referral object itself),
807 access to the attribute holding the referral information
812 Some internal operations and some
814 require specific access privileges.
821 privileges on all the attributes that are present in the search filter
822 of the URI regexp maps (the right-hand side of the
826 privileges are also required on the
828 attribute of the authorizing identity and/or on the
830 attribute of the authorized identity.
832 It is strongly recommended to explicitly use the most appropriate
838 clauses, to avoid possible incorrect specifications of the access rules
839 as well as for performance (avoid unrequired regex matching when an exact
840 match suffices) reasons.
842 An administrator might create a rule of the form:
845 access to dn.regex="dc=example,dc=com"
849 expecting it to match all entries in the subtree "dc=example,dc=com".
850 However, this rule actually matches any DN which contains anywhere
851 the substring "dc=example,dc=com". That is, the rule matches both
852 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
854 To match the desired subtree, the rule would be more precisely
858 access to dn.regex="^(.+,)?dc=example,dc=com$"
862 For performance reasons, it would be better to use the subtree style.
865 access to dn.subtree="dc=example,dc=com"
869 When writing submatch rules, it may be convenient to avoid unnecessary
872 use; for instance, to allow access to the subtree of the user
875 clause, one could use
878 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
879 by dn.regex="^uid=$2,dc=example,dc=com$$" write
883 However, since all that is required in the
885 clause is substring expansion, a more efficient solution is
888 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
889 by dn.exact,expand="uid=$2,dc=example,dc=com" write
897 implies substring expansion,
899 as well as all the other DN specific
901 values, does not, so it must be explicitly requested.
906 default slapd configuration file
911 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
914 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
916 is derived from University of Michigan LDAP 3.3 Release.