[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
uniqueness on multiple attributes
- To: openldap-technical@openldap.org
- Subject: uniqueness on multiple attributes
- From: "A. Schulze" <sca@andreasschulze.de>
- Date: Sun, 20 Jan 2019 12:13:42 +0100
- Content-language: en-US
- Dkim-signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=andreasschulze.de; i=@andreasschulze.de; q=dns/txt; s=ed25519; t=1547982880; h=to : from : subject : message-id : date : mime-version : content-type : content-transfer-encoding : from : subject : date; bh=DqKSwGzsmvMEKANuz3XErVp0x/PKepC8Nu0sgMA/Gfo=; b=ZHkLJNm0IYjyfRUhaKBPov+ql90ijwErOK29RqVKIwnRT+yVs+I09D+t L2Y/CDd1Ci2OIB5tDRf0CKR6tc5JDQ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andreasschulze.de; s=20181220-DFA7; t=1547982879; x=1552982879; bh=DqKSwGzsmvMEKANuz3XErVp0x/PKepC8Nu0sgMA/Gfo=; h=To:From:Subject:Message-ID:Date:Content-Type:from:reply-to: subject:date:to:cc:content-type:message-id; b=kJGtcsWDq91gL7h9FBPQA3mtVtUAyuKh6wVUMc4LzPGfkL5203aQwtELnLtYJcwxT GwqErZsVlZ85CpQHvdIJ96WtVOmTH7X7AZHwIa3BGB8PVOiJLKtP/LgmHfkBruzC1j M0UKWA+vYMqQktUlt7UFv0qVB4euqdJQOTO6Y/vf/XYQ9RRh0buzuRpZMvZ6OoylZ0 +LXYrI9qJ17epTwVLeADb5WYQq2A9hRHI9dS9Y0DpJawPZexAaKfY0yCTMbUqa24yI 1MV7zwpqy1BqY64PX+1k3mttu9+rh3ci0W5YN2PJ59TWit1YWwlkRXIqP+L2xKe76p 48dbVRWFkJnGw==
- Openpgp: preference=signencrypt
Hello,
my goal it to extend a uniqueness configuration. I do already enforce uniqueness of mail addresses:
slapd.conf:
moduleload unique.la
overlay unique
unique_uri ldap:///dc=basedn?mail?sub?
that works.
Now also address rewriting data should be migrated LDAP. Rewriting addresses are stored in the attribute "mailalternateaddress"
Requirement: no address may occur twice no matter if stored as "mail" or "mailalternateaddress"
Logical it's something like
unique_uri (ldap:///dc=basedn?mail?sub?) OR (ldap:///dc=basedn?mail?sub?)
Now I fail to correctly translate that to a valid configuration.
https://www.openldap.org/software/man.cgi?query=slapo-unique say "unique_uri <[strict ][ignore ]URI[URI...]...>"
with a formal definition of URI "ldap:///[base dn]?[attributes...]?scope[?filter]"
It also say "Multiple URIs may be specified within a domain, allowing complex selections of objects."
As the manpage doesn't give an example I tried:
unique_uri ldap:///dc=ldap?mailalternateaddress?sub ldap:///dc=ldap?mail?sub
slapd logs
5c445384 /etc/openldap/slapd.conf: line 149 (unique_uri ldap:///dc=ldap?mailalternateaddress?sub ldap:///dc=ldap?mail?sub)
-> slapd starts but uniqueness is not enforced
So I tried multiple versions:
To make it readable: uri1=ldap:///dc=ldap?mailalternateaddress?sub
uri2=ldap:///dc=ldap?mail?sub
unique_uri uri1 uri2
unique_uri uri1uri2
unique_uri uri1,uri2
unique_uri uri1, uri2
unique_uri "uri1 uri2"
unique_uri "uri1""uri2"
unique_uri "uri1","uri2"
unique_uri "uri1", "uri2"
Mostly slapd failed to start with an error "invalid ldap urilist"
If slapd started, the uniqueness wasn't enforced
One version (unique_uri "uri1 uri2") result in slapd consume 100% cpu time.
Anybody have a hint how to enforce uniqueness on multiple attributes?
Andreas