Hi,
does the unique overlay support checking multiple values for a single uniqueness check? Our clients can use emails in two attributes (think mail and mailAlias) and addresses have to be unique in regard to both fields, which means an address that is used in either of them cannot be used in any other of them. Is that possible?
+Karsten
Am Fri, 13 Oct 2017 14:44:09 +0200 schrieb Karsten Heymann karsten.heymann@gmail.com:
Hi,
does the unique overlay support checking multiple values for a single uniqueness check? Our clients can use emails in two attributes (think mail and mailAlias) and addresses have to be unique in regard to both fields, which means an address that is used in either of them cannot be used in any other of them. Is that possible?
slapo-unique(5) plus slapo-constraint(5)
-Dieter
Dieter Klünter wrote:
Am Fri, 13 Oct 2017 14:44:09 +0200 schrieb Karsten Heymann karsten.heymann@gmail.com:
does the unique overlay support checking multiple values for a single uniqueness check? Our clients can use emails in two attributes (think mail and mailAlias) and addresses have to be unique in regard to both fields, which means an address that is used in either of them cannot be used in any other of them. Is that possible?
slapo-unique(5) plus slapo-constraint(5)
IMHO this does not work without adding all possible values to at least one of the attributes *or* SUP-ing all attribute values from a common attribute type.
Ciao, Michael.
2017-10-13 16:25 GMT+02:00 Michael Ströder michael@stroeder.com:
Dieter Klünter wrote:
slapo-unique(5) plus slapo-constraint(5)
Interesting, I hadn't that in mind. Unfortunately I think Michael is right that using a constraint in this scenario won't work. But I have other uses for slapo-contraint in mind already.
IMHO this does not work without adding all possible values to at least one of the attributes *or* SUP-ing all attribute values from a common attribute type.
How would attribute inheritance tie into this? I'm relatively free in modifying our ldap schema so making mailAlias SUP mail would be possible.
+Karsten
Karsten Heymann wrote:
IMHO this does not work without adding all possible values to at least one of the attributes *or* SUP-ing all attribute values from a common attribute type.
How would attribute inheritance tie into this? I'm relatively free in modifying our ldap schema so making mailAlias SUP mail would be possible.
slapo-unique simply searches for an attribute type and value (should be eq-indexed). A SUP-ed attribute type also matches a search for all sub-types.
E.g. try searching with parent attribute 'name'.
Note: Depending on your clients and attributes used this might *not* be what you want.
In my LDAP directories for e-mail the value in 'mail' is always also present in e.g. 'mailLocalAddress' for which I have a unique constraint.
Ciao, Michael.
openldap-technical@openldap.org