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 POSIX (''extended'') regular expression pattern,
150 matching a normalized string representation of the entry's DN.
151 The regex form of the pattern does not (yet) support UTF\-8.
154 .B filter=<ldapfilter>
155 selects the entries based on a valid LDAP filter as described in RFC 2254.
164 selects the attributes the access control rule applies to.
165 It is a comma-separated list of attribute types, plus the special names
167 indicating access to the entry itself, and
169 indicating access to the entry's children. ObjectClass names may also
170 be specified in this list, which will affect all the attributes that
171 are required and/or allowed by that objectClass.
176 are directly treated as objectClass names. A name prefixed by
178 is also treated as an objectClass, but in this case the access rule
179 affects the attributes that are not required nor allowed
184 .B attrs=@extensibleObject
185 is implied, i.e. all attributes are addressed.
188 .B attrs=<attr> val[.<style>]=<attrval>
189 specifies access to a particular value of a single attribute.
190 In this case, only a single attribute type may be given. A value
194 (the default) uses the attribute's equality matching rule to compare the
199 the provided value is used as a POSIX (''extended'') regular
200 expression pattern. If the attribute has DN syntax, the value
208 resulting in base, onelevel, subtree or children match, respectively.
210 The dn, filter, and attrs statements are additive; they can be used in sequence
211 to select entities the access rule applies to based on naming context,
212 value and attribute type simultaneously.
216 indicates whom the access rules apply to.
219 statements can appear in an access control statement, indicating the
220 different access privileges to the same resource that apply to different
222 It can have the forms
230 dn[.<dnstyle>[,<modifier>]]=<DN>
232 group[/<objectclass>[/<attrname>]]
233 [.<groupstyle>]=<group>
234 peername[.<peernamestyle>]=<peername>
235 sockname[.<style>]=<sockname>
236 domain[.<domainstyle>[,<modifier>]]=<domain>
237 sockurl[.<style>]=<sockurl>
238 set[.<setstyle>]=<pattern>
251 <style>={exact|regex|expand}
252 <dnstyle>={{exact|base(object)}|regex
253 |one(level)|sub(tree)|children}
254 <groupstyle>={exact|expand}
255 <peernamestyle>={<style>|ip|path}
256 <domainstyle>={exact|regex|sub(tree)}
257 <setstyle>={exact|regex}
261 They may be specified in combination.
272 means access is granted to unauthenticated clients; it is mostly used
273 to limit access to authentication resources (e.g. the
275 attribute) to unauthenticated clients for authentication purposes.
279 means access is granted to authenticated clients.
283 means access to an entry is allowed to the entry itself (e.g. the entry
284 being accessed and the requesting entry must be the same).
288 means that access is granted to the matching DN.
289 The optional style qualifier
291 allows the same choices of the dn form of the
293 field. In addition, the
295 style can exploit substring substitution of submatches in the
297 dn.regex clause by using the form
301 ranging from 0 to 9 (where 0 matches the entire string),
304 for submatches higher than 9.
305 Since the dollar character is used to indicate a substring replacement,
306 the dollar character that is used to indicate match up to the end of
307 the string must be escaped by a second dollar character, e.g.
310 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
311 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
317 At present, the only type allowed is
319 which causes substring substitution of submatches to take place
326 dnstyle in the above example may be of use only if the
328 clause needs to be a regex; otherwise, if the
329 value of the second (from the right)
331 portion of the DN in the above example were fixed, the form
334 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
335 by dn.exact,expand="uid=$2,dc=example,dc=com" write
338 could be used; if it had to match the value in the
343 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
344 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
351 clause other than regex may provide submatches as well.
362 as the match of the entire string.
371 as the match of the rightmost part of the DN as defined in the
374 This may be useful, for instance, to provide access to all the
375 ancestors of a user by defining
378 access to dn.subtree="dc=com"
379 by dn.subtree,expand="$1" read
382 which means that only access to entries that appear in the DN of the
386 It is perfectly useless to give any access privileges to a DN
387 that exactly matches the
389 of the database the ACLs apply to, because it implicitly
390 possesses write privileges for the entire tree of that database.
391 Actually, access control is bypassed for the
393 to solve the intrinsic chicken-and-egg problem.
397 means that access is granted to requests whose DN is listed in the
398 entry being accessed under the
404 means that access is granted to requests whose DN is listed
405 in the group entry whose DN is given by
407 The optional parameters
411 define the objectClass and the member attributeType of the group entry.
412 The optional style qualifier
418 will be expanded as a replacement string (but not as a regular expression)
425 which means that exact match will be used.
426 If the style of the DN portion of the
428 clause is regex, the submatches are made available according to
432 other styles provide limited submatches as discussed above about
437 For static groups, the specified attributeType must have
440 .B NameAndOptionalUID
441 syntax. For dynamic groups the attributeType must
444 attributeType. Only LDAP URIs of the form
445 .B ldap:///<base>??<scope>?<filter>
446 will be evaluated in a dynamic group, by searching the local server only.
449 .BR peername=<peername> ,
450 .BR sockname=<sockname> ,
451 .BR domain=<domain> ,
453 .BR sockurl=<sockurl>
454 mean that the contacting host IP (in the form
455 .BR "IP=<ip>:<port>" )
456 or the contacting host named pipe file name (in the form
458 if connecting through a named pipe) for
460 the named pipe file name for
462 the contacting host name for
464 and the contacting URL for
471 rules for pattern match described for the
475 style, which implies submatch
477 and regex match of the corresponding connection parameters.
482 clause (the default) implies a case-exact match on the client's
486 prefix and the trailing
492 prefix if connecting through a named pipe.
495 style interprets the pattern as
496 .BR <peername>=<ip>[%<mask>][{<n>}] ,
501 are dotted digit representations of the IP and the mask, while
503 delimited by curly brackets, is an optional port.
504 When checking access privileges, the IP portion of the
506 is extracted, eliminating the
510 part, and it is compared against the
512 portion of the pattern after masking with
515 .B peername.ip=127.0.0.1
516 allows connections only from localhost,
517 .B peername.ip=192.168.1.0%255.255.255.0
518 allows connections from any IP in the 192.168.1 class C domain, and
519 .B peername.ip=192.168.1.16%255.255.255.240{9009}
520 allows connections from any IP in the 192.168.1.[16-31] range
521 of the same domain, only if port 9009 is used.
528 when connecting through a named pipe, and performs an exact match
529 on the given pattern.
532 clause also allows the
534 style, which succeeds when a fully qualified name exactly matches the
536 pattern, or its trailing part, after a
543 style is allowed, implying an
545 match with submatch expansion; the use of
547 as a style modifier is considered more appropriate.
549 .B domain.subtree=example.com
550 will match www.example.com, but will not match www.anotherexample.com.
553 of the contacting host is determined by performing a DNS reverse lookup.
554 As this lookup can easily be spoofed, use of the
556 statement is strongly discouraged. By default, reverse lookups are disabled.
563 option; the only value currently supported is
565 which causes substring substitution of submatches to take place even if
570 much like the analogous usage in
580 means that the access control is determined by the values in the
583 ACIs are experimental; they must be enabled at compile time.
587 .BR transport_ssf=<n> ,
591 set the minimum required Security Strength Factor (ssf) needed
592 to grant access. The value should be positive integer.
593 .SH THE <ACCESS> FIELD
595 .B <access> ::= [self]{<level>|<priv>}
596 determines the access level or the specific access privileges the
599 Its component are defined as
602 <level> ::= none|auth|compare|search|read|write
603 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
608 allows special operations like having a certain access level or privilege
609 only in case the operation involves the name of the user that's requesting
611 It implies the user that requests access is bound.
614 access to the member attribute of a group, which allows one to add/delete
615 its own DN from the member list of a group, without affecting other members.
619 access model relies on an incremental interpretation of the access
621 The possible levels are
629 Each access level implies all the preceding ones, thus
631 access will imply all accesses.
636 access means that one is allowed access to an attribute to perform
637 authentication/authorization operations (e.g.
639 with no other access.
640 This is useful to grant unauthenticated clients the least possible
641 access level to critical resources, like passwords.
645 access model relies on the explicit setting of access privileges
649 sign resets previously defined accesses; as a consequence, the final
650 access privileges will be only those defined by the clause.
655 signs add/remove access privileges to the existing ones.
667 More than one of the above privileges can be added in one statement.
669 indicates no privileges and is used only by itself (e.g., +0).
673 controls the flow of access rule application.
674 It can have the forms
684 the default, means access checking stops in case of match.
685 The other two forms are used to keep on processing access clauses.
688 form allows for other
692 clause to be considered, so that they may result in incrementally altering
693 the privileges, while the
695 form allows for other
697 clauses that match the same target to be processed.
698 Consider the (silly) example
701 access to dn.subtree="dc=example,dc=com" attrs=cn
704 access to dn.subtree="ou=People,dc=example,dc=com"
708 which allows search and compare privileges to everybody under
709 the "dc=example,dc=com" tree, with the second rule allowing
710 also read in the "ou=People" subtree,
711 or the (even more silly) example
714 access to dn.subtree="dc=example,dc=com" attrs=cn
719 which grants everybody search and compare privileges, and adds read
720 privileges to authenticated clients.
721 .SH OPERATION REQUIREMENTS
722 Operations require different privileges on different portions of entries.
723 The following summary applies to primary database backends such as
724 the LDBM, BDB, and HDB backends. Requirements for other backends may
725 (and often do) differ.
731 privileges on the pseudo-attribute
733 of the entry being added, and
735 privileges on the pseudo-attribute
737 of the entry's parent.
741 operation, when credentials are stored in the directory, requires
743 privileges on the attribute the credentials are stored in (usually
750 privileges on the attribute that is being compared.
756 privileges on the pseudo-attribute
758 of the entry being deleted, and
762 pseudo-attribute of the entry's parent.
768 privileges on the attibutes being modified.
774 privileges on the pseudo-attribute
776 of the entry whose relative DN is being modified,
778 privileges on the pseudo-attribute
780 of the old and new entry's parents, and
782 privileges on the attributes that are present in the new relative DN.
784 privileges are also required on the attributes that are present
785 in the old relative DN if
791 operation, for each entry, requires
793 privileges on the attributes that are defined in the filter.
794 Then, the resulting entries are tested for
796 privileges on the pseudo-attribute
798 (for read access to the entry itself)
801 access on each value of each attribute that is requested.
804 object used in generating continuation references, the operation requires
806 access on the pseudo-attribute
808 (for read access to the referral object itself),
811 access to the attribute holding the referral information
816 Some internal operations and some
818 require specific access privileges.
825 privileges on all the attributes that are present in the search filter
826 of the URI regexp maps (the right-hand side of the
830 privileges are also required on the
832 attribute of the authorizing identity and/or on the
834 attribute of the authorized identity.
836 It is strongly recommended to explicitly use the most appropriate
842 clauses, to avoid possible incorrect specifications of the access rules
843 as well as for performance (avoid unrequired regex matching when an exact
844 match suffices) reasons.
846 An administrator might create a rule of the form:
849 access to dn.regex="dc=example,dc=com"
853 expecting it to match all entries in the subtree "dc=example,dc=com".
854 However, this rule actually matches any DN which contains anywhere
855 the substring "dc=example,dc=com". That is, the rule matches both
856 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
858 To match the desired subtree, the rule would be more precisely
862 access to dn.regex="^(.+,)?dc=example,dc=com$"
866 For performance reasons, it would be better to use the subtree style.
869 access to dn.subtree="dc=example,dc=com"
873 When writing submatch rules, it may be convenient to avoid unnecessary
876 use; for instance, to allow access to the subtree of the user
879 clause, one could use
882 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
883 by dn.regex="^uid=$2,dc=example,dc=com$$" write
887 However, since all that is required in the
889 clause is substring expansion, a more efficient solution is
892 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
893 by dn.exact,expand="uid=$2,dc=example,dc=com" write
901 implies substring expansion,
903 as well as all the other DN specific
905 values, does not, so it must be explicitly requested.
910 default slapd configuration file
917 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
920 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
922 is derived from University of Michigan LDAP 3.3 Release.