]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapo-unique.5
9f0ac0f474d86f7fd1647df498f0bcc79dd1bae9
[openldap] / doc / man / man5 / slapo-unique.5
1 .TH SLAPO-UNIQUE 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2004-2017 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,
45 allowing complex selections of objects.  Multiple
46 .B unique_uri
47 statements or
48 .B olcUniqueURI
49 attributes will create independent domains, each with their own
50 independent lists of URIs and ignore/strict settings.
51
52 Keywords
53 .B strict
54 and
55 .B ignore
56 have to be enclosed in quotes (") together with the URI.
57
58 The LDAP URI syntax is a subset of
59 .B RFC-4516,
60 and takes the form:
61
62 ldap:///[base dn]?[attributes...]?scope[?filter]
63
64 The
65 .B base dn
66 defaults to that of the back-end database.
67 Specified base dns must be within the subtree of the back-end database.
68
69 If no
70 .B attributes
71 are specified, the URI applies to all non-operational attributes.
72
73 The
74 .B scope
75 component is effectively mandatory, because LDAP URIs default to
76 .B base
77 scope, which is not valid for uniqueness, because groups of one object
78 are always unique.  Scopes of
79 .B sub
80 (for subtree) and
81 .B one
82 for one-level are valid.
83
84 The
85 .B filter
86 component causes the domain to apply uniqueness constraints only to
87 matching objects.  e.g.
88 .B ldap:///?cn?sub?(sn=e*)
89 would require unique
90 .B cn
91 attributes for all objects in the subtree of the back-end database whose
92 .B sn
93 starts with an e.
94
95 It is possible to assert uniqueness upon all non-operational
96 attributes except those listed by prepending the keyword
97 .B ignore
98 If not configured, all non-operational (e.g., system) attributes must be
99 unique. Note that the
100 .B attributes
101 list of an
102 .B ignore
103 URI should generally contain the
104 .BR objectClass ,
105 .BR dc ,
106 .B ou
107 and
108 .B o
109 attributes, as these will generally not be unique, nor are they operational
110 attributes.
111
112 It is possible to set strict checking for the uniqueness domain by
113 prepending the keyword
114 .B strict.
115 By default, uniqueness is not enforced
116 for null values. Enabling
117 .B strict
118 mode extends the concept of uniqueness to include null values, such
119 that only one attribute within a subtree will be allowed to have a
120 null value.  Strictness applies to all URIs within a uniqueness
121 domain, but some domains may be strict while others are not.
122 .LP
123 It is not possible to set both URIs and legacy slapo\-unique configuration
124 parameters simultaneously. In general, the legacy configuration options
125 control pieces of a single unfiltered subtree domain.
126 .TP
127 .B unique_base <basedn>
128 This legacy configuration parameter should be converted to the
129 .B base dn
130 component of the above
131 .B unique_uri
132 style of parameter.
133 .TP
134 .B unique_ignore <attribute...>
135 This legacy configuration parameter should be converted to a
136 .B unique_uri
137 parameter with
138 .B ignore
139 keyword as described above.
140 .TP
141 .B unique_attributes <attribute...>
142 This legacy configuration parameter should be converted to a
143 .B unique_uri
144 parameter, as described above.
145 .TP
146 .B unique_strict <attribute...>
147 This legacy configuration parameter should be converted to a
148 .B strict
149 keyword prepended to a
150 .B unique_uri
151 parameter, as described above.
152 .SH CAVEATS
153 .LP
154 .B unique_uri
155 cannot be used with the old-style of configuration, and vice versa.
156 .B unique_uri
157 can implement everything the older system can do, however.
158 .LP
159 Typical attributes for the
160 .B ignore ldap:///...
161 URIs are intentionally not hardcoded into the overlay to allow for
162 maximum flexibility in meeting site-specific requirements.
163 .LP
164 Replication and operations with
165 .B manageDsaIt
166 control are allowed to bypass this enforcement. It is therefore important that
167 all servers accepting writes have this overlay configured in order to maintain
168 uniqueness in a replicated DIT.
169 .SH FILES
170 .TP
171 ETCDIR/slapd.conf
172 default slapd configuration file
173 .SH SEE ALSO
174 .BR slapd.conf (5),
175 .BR slapd\-config (5).