2004-04-17 16:17:43 +08:00
|
|
|
.TH SLAPO-UNIQUE 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
2011-01-05 08:42:37 +08:00
|
|
|
.\" Copyright 2004-2011 The OpenLDAP Foundation All Rights Reserved.
|
2004-04-17 16:17:43 +08:00
|
|
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
|
|
|
.\" $OpenLDAP$
|
|
|
|
.SH NAME
|
2009-06-03 08:43:44 +08:00
|
|
|
slapo\-unique \- Attribute Uniqueness overlay to slapd
|
2004-04-17 16:17:43 +08:00
|
|
|
.SH SYNOPSIS
|
|
|
|
ETCDIR/slapd.conf
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The Attribute Uniqueness overlay can be used with a backend database such as
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR slapd\-bdb (5)
|
2007-03-22 16:22:53 +08:00
|
|
|
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.
|
2004-04-17 16:17:43 +08:00
|
|
|
.LP
|
|
|
|
Uniqueness is enforced by searching the subtree to ensure that the values of
|
|
|
|
all attributes presented with an
|
2004-04-19 05:36:32 +08:00
|
|
|
.BR add ,
|
2004-04-17 16:17:43 +08:00
|
|
|
.B modify
|
|
|
|
or
|
|
|
|
.B modrdn
|
2007-03-22 16:22:53 +08:00
|
|
|
operation are unique within the scope.
|
2004-04-19 05:36:32 +08:00
|
|
|
For example, if uniqueness were enforced for the
|
2004-04-17 16:17:43 +08:00
|
|
|
.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.
|
2009-05-27 21:14:58 +08:00
|
|
|
.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.
|
2004-04-17 16:17:43 +08:00
|
|
|
.SH CONFIGURATION
|
|
|
|
These
|
|
|
|
.B slapd.conf
|
|
|
|
options apply to the Attribute Uniqueness overlay.
|
|
|
|
They should appear after the
|
|
|
|
.B overlay
|
|
|
|
directive.
|
|
|
|
.TP
|
2007-03-22 16:22:53 +08:00
|
|
|
.B unique_uri <[strict ][ignore ]URI[URI...]...>
|
|
|
|
Configure the base, attributes, scope, and filter for uniqueness
|
2009-06-03 08:43:44 +08:00
|
|
|
checking. Multiple URIs may be specified within a domain,
|
|
|
|
allowing complex selections of objects. Multiple
|
2007-03-22 16:22:53 +08:00
|
|
|
.B unique_uri
|
|
|
|
statements or
|
|
|
|
.B olcUniqueURI
|
2009-06-03 08:43:44 +08:00
|
|
|
attributes will create independent domains, each with their own
|
|
|
|
independent lists of URIs and ignore/strict settings.
|
2007-03-22 16:22:53 +08:00
|
|
|
|
|
|
|
The LDAP URI syntax is a subset of
|
|
|
|
.B RFC-4516,
|
|
|
|
and takes the form:
|
|
|
|
|
|
|
|
ldap:///[base dn]?[attributes...]?scope[?filter]
|
|
|
|
|
2004-04-17 16:17:43 +08:00
|
|
|
The
|
2007-03-22 16:22:53 +08:00
|
|
|
.B base dn
|
2009-06-03 08:43:44 +08:00
|
|
|
defaults to that of the back-end database.
|
|
|
|
Specified base dns must be within the subtree of the back-end database.
|
2007-03-22 16:22:53 +08:00
|
|
|
|
|
|
|
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
|
2007-08-06 23:23:28 +08:00
|
|
|
If not configured, all non-operational (e.g., system) attributes must be
|
2004-04-17 16:17:43 +08:00
|
|
|
unique. Note that the
|
2007-03-22 16:22:53 +08:00
|
|
|
.B attributes
|
|
|
|
list of an
|
|
|
|
.B ignore
|
|
|
|
URI should generally contain the
|
2004-04-19 05:36:32 +08:00
|
|
|
.BR objectClass ,
|
|
|
|
.BR dc ,
|
2004-04-17 16:17:43 +08:00
|
|
|
.B ou
|
|
|
|
and
|
|
|
|
.B o
|
|
|
|
attributes, as these will generally not be unique, nor are they operational
|
|
|
|
attributes.
|
2007-03-22 16:22:53 +08:00
|
|
|
|
|
|
|
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
|
2009-06-03 08:43:44 +08:00
|
|
|
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.
|
2007-03-22 16:22:53 +08:00
|
|
|
.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.
|
2004-04-17 16:17:43 +08:00
|
|
|
.TP
|
|
|
|
.B unique_attributes <attribute...>
|
2007-03-22 16:22:53 +08:00
|
|
|
This legacy configuration parameter should be converted to a
|
|
|
|
.B unique_uri
|
|
|
|
parameter, as described above.
|
2004-04-17 16:17:43 +08:00
|
|
|
.TP
|
|
|
|
.B unique_strict
|
2007-03-22 16:22:53 +08:00
|
|
|
This legacy configuration parameter should be converted to a
|
|
|
|
.B strict
|
|
|
|
keyword prepended to a
|
|
|
|
.B unique_uri
|
|
|
|
parameter, as described above.
|
2004-04-17 16:17:43 +08:00
|
|
|
.SH CAVEATS
|
|
|
|
.LP
|
2007-03-22 16:22:53 +08:00
|
|
|
.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.
|
2004-04-17 16:17:43 +08:00
|
|
|
.LP
|
|
|
|
Typical attributes for the
|
2007-03-22 16:22:53 +08:00
|
|
|
.B ignore ldap:///...
|
|
|
|
URIs are intentionally not hardcoded into the overlay to allow for
|
2004-04-17 16:17:43 +08:00
|
|
|
maximum flexibility in meeting site-specific requirements.
|
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
ETCDIR/slapd.conf
|
|
|
|
default slapd configuration file
|
|
|
|
.SH SEE ALSO
|
2009-01-30 08:23:58 +08:00
|
|
|
.BR slapd.conf (5),
|
|
|
|
.BR slapd\-config (5).
|