]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapo-unique.5
ITS#6108
[openldap] / doc / man / man5 / slapo-unique.5
1 .TH SLAPO-UNIQUE 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2004-2009 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapo-unique \- Attribute Uniqueness overlay to slapd
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The Attribute Uniqueness overlay can be used with a backend database such as
11 .BR slapd-bdb (5)
12 to enforce the uniqueness of some or all attributes within a
13 scope. This subtree defaults to all objects within the subtree of the
14 database for which the Uniqueness overlay is configured.
15 .LP
16 Uniqueness is enforced by searching the subtree to ensure that the values of
17 all attributes presented with an
18 .BR add ,
19 .B modify
20 or
21 .B modrdn
22 operation are unique within the scope.
23 For example, if uniqueness were enforced for the
24 .B uid
25 attribute, the subtree would be searched for any other records which also
26 have a
27 .B uid
28 attribute containing the same value. If any are found, the request is
29 rejected.
30 .LP
31 The search is performed using the rootdn of the database, to avoid issues
32 with ACLs preventing the overlay from seeing all of the relevant data. As
33 such, the database must have a rootdn configured.
34 .SH CONFIGURATION
35 These
36 .B slapd.conf
37 options apply to the Attribute Uniqueness overlay.
38 They should appear after the
39 .B overlay
40 directive.
41 .TP
42 .B unique_uri <[strict ][ignore ]URI[URI...]...>
43 Configure the base, attributes, scope, and filter for uniqueness
44 checking.  Multiple URIs may be specified within a domain, allowing complex selections of objects.  Multiple
45 .B unique_uri
46 statements or
47 .B olcUniqueURI
48 attributes will create independent domains, each with their own independent lists of URIs and ignore/strict settings.
49
50 The LDAP URI syntax is a subset of
51 .B RFC-4516,
52 and takes the form:
53
54 ldap:///[base dn]?[attributes...]?scope[?filter]
55
56 The
57 .B base dn
58 defaults to that of the back-end database.  Specified base dns must be within the subtree of the back-end database.
59
60 If no
61 .B attributes
62 are specified, the URI applies to all non-operational attributes.
63
64 The
65 .B scope
66 component is effectively mandatory, because LDAP URIs default to
67 .B base
68 scope, which is not valid for uniqueness, because groups of one object
69 are always unique.  Scopes of
70 .B sub
71 (for subtree) and
72 .B one
73 for one-level are valid.
74
75 The
76 .B filter
77 component causes the domain to apply uniqueness constraints only to
78 matching objects.  e.g.
79 .B ldap:///?cn?sub?(sn=e*)
80 would require unique
81 .B cn
82 attributes for all objects in the subtree of the back-end database whose
83 .B sn
84 starts with an e.
85
86 It is possible to assert uniqueness upon all non-operational
87 attributes except those listed by prepending the keyword
88 .B ignore
89 If not configured, all non-operational (e.g., system) attributes must be
90 unique. Note that the
91 .B attributes
92 list of an
93 .B ignore
94 URI should generally contain the
95 .BR objectClass ,
96 .BR dc ,
97 .B ou
98 and
99 .B o
100 attributes, as these will generally not be unique, nor are they operational
101 attributes.
102
103 It is possible to set strict checking for the uniqueness domain by
104 prepending the keyword
105 .B strict.
106 By default, uniqueness is not enforced
107 for null values. Enabling
108 .B strict
109 mode extends the concept of uniqueness to include null values, such
110 that only one attribute within a subtree will be allowed to have a
111 null value.  Strictness applies to all URIs within a uniqueness
112 domain, but some domains may be strict while others are not.
113 .LP
114 It is not possible to set both URIs and legacy slapo-unique configuration parameters simultaneously.  In general, the legacy configuration options control pieces of a single unfiltered subtree domain.
115 .TP
116 .B unique_base <basedn>
117 This legacy configuration parameter should be converted to the
118 .B base dn
119 component of the above
120 .B unique_uri
121 style of parameter.
122 .TP
123 .B unique_ignore <attribute...>
124 This legacy configuration parameter should be converted to a
125 .B unique_uri
126 parameter with
127 .B ignore
128 keyword as described above.
129 .TP
130 .B unique_attributes <attribute...>
131 This legacy configuration parameter should be converted to a
132 .B unique_uri
133 parameter, as described above.
134 .TP
135 .B unique_strict
136 This legacy configuration parameter should be converted to a
137 .B strict
138 keyword prepended to a
139 .B unique_uri
140 parameter, as described above.
141 .SH CAVEATS
142 .LP
143 .B unique_uri
144 cannot be used with the old-style of configuration, and vice versa.
145 .B unique_uri
146 can implement everything the older system can do, however.
147 .LP
148 Typical attributes for the
149 .B ignore ldap:///...
150 URIs are intentionally not hardcoded into the overlay to allow for
151 maximum flexibility in meeting site-specific requirements.
152 .SH FILES
153 .TP
154 ETCDIR/slapd.conf
155 default slapd configuration file
156 .SH SEE ALSO
157 .BR slapd.conf (5),
158 .BR slapd\-config (5).