]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapo-constraint.5
ITS5359 doc update.
[openldap] / doc / man / man5 / slapo-constraint.5
1 .TH SLAPO-CONSTRAINT 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2005-2006 Hewlett-Packard Company
3 .\" Copyright 2006-2007 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .\" $OpenLDAP$
6 .SH NAME
7 slapo-constraint \- Attribute Constraint Overlay to slapd
8 .SH SYNOPSIS
9 ETCDIR/slapd.conf
10 .SH DESCRIPTION
11 The constraint overlay is used to ensure that attribute values match
12 some constraints beyond basic LDAP syntax.  Attributes can
13 have multiple constraints placed upon them, and all must be satisfied
14 when modifying an attribute value under constraint.
15 .LP
16 This overlay is intended to be used to force syntactic regularity upon
17 certain string represented data which have well known canonical forms,
18 like telephone numbers, post codes, FQDNs, etc.
19 .SH CONFIGURATION
20 This
21 .B slapd.conf
22 option applies to the constraint overlay.
23 It should appear after the
24 .B overlay
25 directive.
26 .TP
27 .B constraint_attribute <attribute_name> <type> <value>
28 Specifies the constraint which should apply to the attribute named as
29 the first parameter.
30 Two types of constraint are currently supported -
31 .B regex
32 and
33 .BR uri .
34
35 The parameter following the
36 .B regex
37 type is a Unix style regular expression (See
38 .BR regex (7)
39 ). The parameter following the
40 .B uri
41 type is an LDAP URI. The URI will be evaluated using an internal search.
42 It must not include a hostname, and it must include a list of attributes
43 to evaluate.
44
45 Any attempt to add or modify an attribute named as part of the
46 constraint overlay specification which does not fit the 
47 constraint listed will fail with a
48 LDAP_CONSTRAINT_VIOLATION error.
49 .SH EXAMPLES
50 .LP
51 .RS
52 .nf
53 overlay constraint
54 constraint_attribute mail regex ^[:alnum:]+@mydomain.com$
55 constraint_attribute title uri
56   ldap:///dc=catalog,dc=example,dc=com?title?sub?(objectClass=titleCatalog)
57 .fi
58
59 A specification like the above would reject any
60 .B mail
61 attribute which did not look like
62 .B
63 <alpha-numeric string>@mydomain.com
64 It would also reject any
65 .B title
66 attribute whose values were not listed in the
67 .B title
68 attribute of any
69 .B titleCatalog
70 entries in the given scope.
71 .RE
72 .SH FILES
73 .TP
74 ETCDIR/slapd.conf
75 default slapd configuration file
76 .SH SEE ALSO
77 .BR slapd.conf (5).
78 .SH ACKNOWLEDGEMENTS
79 This module was written in 2005 by Neil Dunbar of Hewlett-Packard and subsequently
80 extended by Howard Chu and Emmanuel Dreyfus.
81 .so ../Project