1SLAPO-CONSTRAINT(5)           File Formats Manual          SLAPO-CONSTRAINT(5)
2
3
4

NAME

6       slapo-constraint - Attribute Constraint Overlay to slapd
7

SYNOPSIS

9       /etc/openldap/slapd.conf
10

DESCRIPTION

12       The  constraint  overlay  is used to ensure that attribute values match
13       some constraints beyond basic LDAP syntax.  Attributes can have  multi‐
14       ple  constraints placed upon them, and all must be satisfied when modi‐
15       fying an attribute value under constraint.
16
17       This overlay is intended to be used to force syntactic regularity  upon
18       certain  string represented data which have well known canonical forms,
19       like telephone numbers, post codes, FQDNs, etc.
20
21       It constrains only LDAP add, modify and rename commands and only  seeks
22       to control the add and replace values of modify and rename requests.
23
24       No constraints are applied for operations performed with the relax con‐
25       trol set.
26

CONFIGURATION

28       This slapd.conf option applies to the constraint  overlay.   It  should
29       appear after the overlay directive.
30
31       constraint_attribute  <attribute_name>[,...]  <type>  <value>  [<extra>
32       [...]]
33              Specifies the constraint which should apply to  the  comma-sepa‐
34              rated  attribute  list named as the first parameter.  Five types
35              of constraint are currently supported - regex, size, count, uri,
36              and set.
37
38              The  parameter  following the regex type is a Unix style regular
39              expression (See regex(7) ). The parameter following the uri type
40              is  an  LDAP  URI.  The  URI will be evaluated using an internal
41              search.  It must not include a hostname, and it must  include  a
42              list of attributes to evaluate.
43
44              The  parameter following the set type is a string that is inter‐
45              preted according to the syntax in use for ACL sets.  This allows
46              one to construct constraints based on the contents of the entry.
47
48              The  size  type  can  be used to enforce a limit on an attribute
49              length, and the count type limits the number  of  values  of  an
50              attribute.
51
52              Extra  parameters  can  occur in any order after those described
53              above.
54
55              <extra> : restrict=<uri>
56
57              This extra parameter allows one to restrict the  application  of
58              the  corresponding  constraint  only  to  entries that match the
59              base, scope and filter portions of the LDAP URI.  The  base,  if
60              present, must be within the naming context of the database.  The
61              scope is only used when the base  is  present;  it  defaults  to
62              base.  The other parameters of the URI are not allowed.
63
64
65       Any  attempt  to  add  or modify an attribute named as part of the con‐
66       straint overlay specification which does not fit the constraint  listed
67       will fail with a LDAP_CONSTRAINT_VIOLATION error.
68

EXAMPLES

70              overlay constraint
71              constraint_attribute jpegPhoto size 131072
72              constraint_attribute userPassword count 3
73              constraint_attribute mail regex ^[[:alnum:]]+@mydomain.com$
74              constraint_attribute title uri
75                ldap:///dc=catalog,dc=example,dc=com?title?sub?(objectClass=titleCatalog)
76              constraint_attribute cn,sn,givenName set
77                "(this/givenName + [ ] + this/sn) & this/cn"
78                restrict="ldap:///ou=People,dc=example,dc=com??sub?(objectClass=inetOrgPerson)"
79
80       A  specification  like  the above would reject any mail attribute which
81       did not look like <alpha-numeric string>@mydomain.com.  It  would  also
82       reject  any  title  attribute whose values were not listed in the title
83       attribute of any titleCatalog entries in the given  scope.  (Note  that
84       the  "dc=catalog,dc=example,dc=com"  subtree ought to reside in a sepa‐
85       rate database, otherwise the initial set of titleCatalog entries  could
86       not  be  populated  while  the  constraint  is in effect.)  Finally, it
87       requires the values of the attribute cn to be  constructed  by  pairing
88       values  of  the  attributes sn and givenName, separated by a space, but
89       only for entries derived from the objectClass inetOrgPerson.
90

FILES

92       /etc/openldap/slapd.conf
93              default slapd configuration file
94

SEE ALSO

96       slapd.conf(5), slapd-config(5),
97

ACKNOWLEDGEMENTS

99       This module was written in 2005 by Neil Dunbar of  Hewlett-Packard  and
100       subsequently  extended  by  Howard  Chu and Emmanuel Dreyfus.  OpenLDAP
101       Software  is  developed  and  maintained  by   The   OpenLDAP   Project
102       <http://www.openldap.org/>.  OpenLDAP Software is derived from the Uni‐
103       versity of Michigan LDAP 3.3 Release.
104
105
106
107OpenLDAP 2.4.47                   2018/12/19               SLAPO-CONSTRAINT(5)
Impressum