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
300 Since the dollar character is used to indicate a substring replacement,
301 the dollar character that is used to indicate match up to the end of
302 the string must be escaped by a second dollar character, e.g.
305 access to dn.regex="^(.+,)?uid=([^,]+),dc=[^,]+,dc=com$"
306 by dn.regex="^uid=$2,dc=[^,]+,dc=com$$" write
312 At present, the only type allowed is
314 which causes substring substitution of submatches to take place
321 dnstyle in the above example may be of use only if the
323 clause needs to be a regex; otherwise, if the
324 value of the second (from the right)
326 portion of the DN in the above example were fixed, the form
329 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
330 by dn.exact,expand="uid=$2,dc=example,dc=com" write
333 could be used; if it had to match the value in the
338 access to dn.regex="^(.+,)?uid=([^,]+),dc=([^,]+),dc=com$"
339 by dn.exact,expand="uid=$2,dc=$3,dc=com" write
344 It is perfectly useless to give any access privileges to a DN
345 that exactly matches the
347 of the database the ACLs apply to, because it implicitly
348 possesses write privileges for the entire tree of that database.
349 Actually, access control is bypassed for the
351 to solve the intrinsic chicken-and-egg problem.
355 means that access is granted to requests whose DN is listed in the
356 entry being accessed under the
362 means that access is granted to requests whose DN is listed
363 in the group entry whose DN is given by
365 The optional parameters
369 define the objectClass and the member attributeType of the group entry.
370 The optional style qualifier
376 will be expanded as a replacement string (but not as a regular expression)
377 according to regex (7), and
379 which means that exact match will be used.
381 For static groups, the specified attributeType must have
384 .B NameAndOptionalUID
385 syntax. For dynamic groups the attributeType must
388 attributeType. Only LDAP URIs of the form
389 .B ldap:///<base>??<scope>?<filter>
390 will be evaluated in a dynamic group, by searching the local server only.
393 .BR peername=<peername> ,
394 .BR sockname=<sockname> ,
395 .BR domain=<domain> ,
397 .BR sockurl=<sockurl>
398 mean that the contacting host IP (in the form
399 .BR "IP=<ip>:<port>" )
400 or the contacting host named pipe file name (in the form
402 if connecting through a named pipe) for
404 the named pipe file name for
406 the contacting host name for
408 and the contacting URL for
415 rules for pattern match described for the
419 style, which implies submatch
423 match of the corresponding connection parameters.
428 clause (the default) implies a case-exact match on the client's
432 prefix and the trailing
438 prefix if connecting through a named pipe.
441 style interprets the pattern as
442 .BR <peername>=<ip>[%<mask>][{<n>}] ,
447 are dotted digit representations of the IP and the mask, while
449 delimited by curly brackets, is an optional port.
450 When checking access privileges, the IP portion of the
452 is extracted, eliminating the
456 part, and it is compared against the
458 portion of the pattern after masking with
461 .B peername.ip=127.0.0.1
462 allows connections only from localhost,
463 .B peername.ip=192.168.1.0%255.255.255.0
464 allows connections from any IP in the 192.168.1 class C domain, and
465 .B peername.ip=192.168.1.16%255.255.255.240{9009}
466 allows connections from any IP in the 192.168.1.[16-31] range
467 of the same domain, only if port 9009 is used.
474 when connecting through a named pipe, and performs an exact match
475 on the given pattern.
478 clause also allows the
480 style, which succeeds when a fully qualified name exactly matches the
482 pattern, or its trailing part, after a
489 style is allowed, implying an
491 match with submatch expansion; the use of
493 as a style modifier is considered more appropriate.
495 .B domain.subtree=example.com
496 will match www.example.com, but will not match www.anotherexample.com.
499 of the contacting host is determined by performing a DNS reverse lookup.
500 As this lookup can easily be spoofed, use of the
502 statement is strongly discouraged. By default, reverse lookups are disabled.
509 option; the only value currently supported is
511 which causes substring substitution of submatches to take place even if
516 much like the analogous usage in
526 means that the access control is determined by the values in the
529 ACIs are experimental; they must be enabled at compile time.
533 .BR transport_ssf=<n> ,
537 set the required Security Strength Factor (ssf) required to grant access.
538 .SH THE <ACCESS> FIELD
540 .B <access> ::= [self]{<level>|<priv>}
541 determines the access level or the specific access privileges the
544 Its component are defined as
547 <level> ::= none|auth|compare|search|read|write
548 <priv> ::= {=|+|-}{w|r|s|c|x|0}+
553 allows special operations like having a certain access level or privilege
554 only in case the operation involves the name of the user that's requesting
556 It implies the user that requests access is bound.
559 access to the member attribute of a group, which allows one to add/delete
560 its own DN from the member list of a group, without affecting other members.
564 access model relies on an incremental interpretation of the access
566 The possible levels are
574 Each access level implies all the preceding ones, thus
576 access will imply all accesses.
581 access means that one is allowed access to an attribute to perform
582 authentication/authorization operations (e.g.
584 with no other access.
585 This is useful to grant unauthenticated clients the least possible
586 access level to critical resources, like passwords.
590 access model relies on the explicit setting of access privileges
594 sign resets previously defined accesses; as a consequence, the final
595 access privileges will be only those defined by the clause.
600 signs add/remove access privileges to the existing ones.
612 More than one of the above privileges can be added in one statement.
614 indicates no privileges and is used only by itself (e.g., +0).
618 controls the flow of access rule application.
619 It can have the forms
629 the default, means access checking stops in case of match.
630 The other two forms are used to keep on processing access clauses.
633 form allows for other
637 clause to be considered, so that they may result in incrementally altering
638 the privileges, while the
640 form allows for other
642 clauses that match the same target to be processed.
643 Consider the (silly) example
646 access to dn.subtree="dc=example,dc=com" attrs=cn
649 access to dn.subtree="ou=People,dc=example,dc=com"
653 which allows search and compare privileges to everybody under
654 the "dc=example,dc=com" tree, with the second rule allowing
655 also read in the "ou=People" subtree,
656 or the (even more silly) example
659 access to dn.subtree="dc=example,dc=com" attrs=cn
664 which grants everybody search and compare privileges, and adds read
665 privileges to authenticated clients.
666 .SH OPERATION REQUIREMENTS
667 Operations require different privileges on different portions of entries.
668 The following summary applies to primary database backends such as
669 the LDBM, BDB, and HDB backends. Requirements for other backends may
670 (and often do) differ.
676 privileges on the pseudo-attribute
678 of the entry being added, and
680 privileges on the pseudo-attribute
682 of the entry's parent.
686 operation, when credentials are stored in the directory, requires
688 privileges on the attribute the credentials are stored in (usually
695 privileges on the attribute that is being compared.
701 privileges on the pseudo-attribute
703 of the entry being deleted, and
707 pseudo-attribute of the entry's parent.
713 privileges on the attibutes being modified.
719 privileges on the pseudo-attribute
721 of the entry whose relative DN is being modified,
723 privileges on the pseudo-attribute
725 of the old and new entry's parents, and
727 privileges on the attributes that are present in the new relative DN.
729 privileges are also required on the attributes that are present
730 in the old relative DN if
736 operation, for each entry, requires
738 privileges on the attributes that are defined in the filter.
739 Then, the resulting entries are tested for
741 privileges on the pseudo-attribute
743 (for read access to the entry itself)
746 access on each value of each attribute that is requested.
749 object used in generating continuation references, the operation requires
751 access on the pseudo-attribute
753 (for read access to the referral object itself),
756 access to the attribute holding the referral information
761 Some internal operations and some
763 require specific access privileges.
770 privileges on all the attributes that are present in the search filter
771 of the URI regexp maps (the right-hand side of the
775 privileges are also required on the
777 attribute of the authorizing identity and/or on the
779 attribute of the authorized identity.
781 It is strongly recommended to explicitly use the most appropriate
787 clauses, to avoid possible incorrect specifications of the access rules
788 as well as for performance (avoid unrequired regex matching when an exact
789 match suffices) reasons.
791 An administrator might create a rule of the form:
794 access to dn.regex="dc=example,dc=com"
798 expecting it to match all entries in the subtree "dc=example,dc=com".
799 However, this rule actually matches any DN which contains anywhere
800 the substring "dc=example,dc=com". That is, the rule matches both
801 "uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe".
803 To match the desired subtree, the rule would be more precisely
807 access to dn.regex="^(.+,)?dc=example,dc=com$"
811 For performance reasons, it would be better to use the subtree style.
814 access to dn.subtree="dc=example,dc=com"
818 When writing submatch rules, it may be convenient to avoid unnecessary
821 use; for instance, to allow access to the subtree of the user
824 clause, one could use
827 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
828 by dn.regex="^uid=$2,dc=example,dc=com$$" write
832 However, since all that is required in the
834 clause is substring expansion, a more efficient solution is
837 access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"
838 by dn.exact,expand="uid=$2,dc=example,dc=com" write
846 implies substring expansion,
848 as well as all the other DN specific
850 values, does not, so it must be explicitly requested.
855 default slapd configuration file
860 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
863 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
865 is derived from University of Michigan LDAP 3.3 Release.