slapo-unique.5 4.96 KB
Newer Older
1
.TH SLAPO-UNIQUE 5 "RELEASEDATE" "OpenLDAP LDVERSION"
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
2
.\" Copyright 2004-2018 The OpenLDAP Foundation All Rights Reserved.
3
4
5
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
.\" $OpenLDAP$
.SH NAME
Howard Chu's avatar
Howard Chu committed
6
slapo\-unique \- Attribute Uniqueness overlay to slapd
7
8
9
10
.SH SYNOPSIS
ETCDIR/slapd.conf
.SH DESCRIPTION
The Attribute Uniqueness overlay can be used with a backend database such as
11
.BR slapd\-mdb (5)
Howard Chu's avatar
Howard Chu committed
12
13
14
to enforce the uniqueness of some or all attributes within a
scope. This subtree defaults to all objects within the subtree of the
database for which the Uniqueness overlay is configured.
15
16
17
.LP
Uniqueness is enforced by searching the subtree to ensure that the values of
all attributes presented with an
Pierangelo Masarati's avatar
typos    
Pierangelo Masarati committed
18
.BR add ,
19
20
21
.B modify
or
.B modrdn
Howard Chu's avatar
Howard Chu committed
22
operation are unique within the scope.
Pierangelo Masarati's avatar
typos    
Pierangelo Masarati committed
23
For example, if uniqueness were enforced for the
24
25
26
27
28
29
.B uid
attribute, the subtree would be searched for any other records which also
have a
.B uid
attribute containing the same value. If any are found, the request is
rejected.
30
31
32
33
.LP
The search is performed using the rootdn of the database, to avoid issues
with ACLs preventing the overlay from seeing all of the relevant data. As
such, the database must have a rootdn configured.
34
35
36
37
38
39
40
41
.SH CONFIGURATION
These
.B slapd.conf
options apply to the Attribute Uniqueness overlay.
They should appear after the
.B overlay
directive.
.TP
Howard Chu's avatar
Howard Chu committed
42
43
.B unique_uri <[strict ][ignore ]URI[URI...]...>
Configure the base, attributes, scope, and filter for uniqueness
Howard Chu's avatar
Howard Chu committed
44
45
checking.  Multiple URIs may be specified within a domain,
allowing complex selections of objects.  Multiple
Howard Chu's avatar
Howard Chu committed
46
47
48
.B unique_uri
statements or
.B olcUniqueURI
Howard Chu's avatar
Howard Chu committed
49
50
attributes will create independent domains, each with their own
independent lists of URIs and ignore/strict settings.
Howard Chu's avatar
Howard Chu committed
51

52
53
54
55
56
57
Keywords
.B strict
and
.B ignore
have to be enclosed in quotes (") together with the URI.

Howard Chu's avatar
Howard Chu committed
58
59
60
61
62
63
The LDAP URI syntax is a subset of
.B RFC-4516,
and takes the form:

ldap:///[base dn]?[attributes...]?scope[?filter]

64
The
Howard Chu's avatar
Howard Chu committed
65
.B base dn
Howard Chu's avatar
Howard Chu committed
66
67
defaults to that of the back-end database.
Specified base dns must be within the subtree of the back-end database.
Howard Chu's avatar
Howard Chu committed
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

If no
.B attributes
are specified, the URI applies to all non-operational attributes.

The
.B scope
component is effectively mandatory, because LDAP URIs default to
.B base
scope, which is not valid for uniqueness, because groups of one object
are always unique.  Scopes of
.B sub
(for subtree) and
.B one
for one-level are valid.

The
.B filter
component causes the domain to apply uniqueness constraints only to
matching objects.  e.g.
.B ldap:///?cn?sub?(sn=e*)
would require unique
.B cn
attributes for all objects in the subtree of the back-end database whose
.B sn
starts with an e.

It is possible to assert uniqueness upon all non-operational
attributes except those listed by prepending the keyword
.B ignore
Gavin Henry's avatar
Gavin Henry committed
98
If not configured, all non-operational (e.g., system) attributes must be
99
unique. Note that the
Howard Chu's avatar
Howard Chu committed
100
101
102
103
.B attributes
list of an
.B ignore
URI should generally contain the
Pierangelo Masarati's avatar
typos    
Pierangelo Masarati committed
104
105
.BR objectClass ,
.BR dc ,
106
107
108
109
110
.B ou
and
.B o
attributes, as these will generally not be unique, nor are they operational
attributes.
Howard Chu's avatar
Howard Chu committed
111
112
113
114
115
116
117
118
119
120
121
122

It is possible to set strict checking for the uniqueness domain by
prepending the keyword
.B strict.
By default, uniqueness is not enforced
for null values. Enabling
.B strict
mode extends the concept of uniqueness to include null values, such
that only one attribute within a subtree will be allowed to have a
null value.  Strictness applies to all URIs within a uniqueness
domain, but some domains may be strict while others are not.
.LP
Howard Chu's avatar
Howard Chu committed
123
124
125
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.
Howard Chu's avatar
Howard Chu committed
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.TP
.B unique_base <basedn>
This legacy configuration parameter should be converted to the
.B base dn
component of the above
.B unique_uri
style of parameter.
.TP
.B unique_ignore <attribute...>
This legacy configuration parameter should be converted to a
.B unique_uri
parameter with
.B ignore
keyword as described above.
140
141
.TP
.B unique_attributes <attribute...>
Howard Chu's avatar
Howard Chu committed
142
143
144
This legacy configuration parameter should be converted to a
.B unique_uri
parameter, as described above.
145
.TP
146
.B unique_strict <attribute...>
Howard Chu's avatar
Howard Chu committed
147
148
149
150
151
This legacy configuration parameter should be converted to a
.B strict
keyword prepended to a
.B unique_uri
parameter, as described above.
152
153
.SH CAVEATS
.LP
Howard Chu's avatar
Howard Chu committed
154
155
156
157
.B unique_uri
cannot be used with the old-style of configuration, and vice versa.
.B unique_uri
can implement everything the older system can do, however.
158
159
.LP
Typical attributes for the
Howard Chu's avatar
Howard Chu committed
160
161
.B ignore ldap:///...
URIs are intentionally not hardcoded into the overlay to allow for
162
maximum flexibility in meeting site-specific requirements.
163
164
165
166
167
168
.LP
Replication and operations with
.B manageDsaIt
control are allowed to bypass this enforcement. It is therefore important that
all servers accepting writes have this overlay configured in order to maintain
uniqueness in a replicated DIT.
169
170
171
172
173
.SH FILES
.TP
ETCDIR/slapd.conf
default slapd configuration file
.SH SEE ALSO
174
175
.BR slapd.conf (5),
.BR slapd\-config (5).