qazmlp a écrit :
Great, that reminds me of using a multi-valued RDN attribute for this
purpose.
dn:productID=15+productID=16+productID=17+productID=18+productID=19+productID=20+productID=21+productID=22,
<remainingPartsOfDN>
colour: White
size: small
<other attribute values>
With that, I can simply search for "(productID=18)" and it will match with
the above entry.
No need to declare such a DN if you have an MV attribute which contains
all the possible values. A search based on the DN minus the RDN with a
singleLevel scope is ok :
dn: pidRange=products15-22, products=some-produc,dc=your-company,dc=com
pid: 15
pid:15
...
pid:22
<other attributes>
search with a baseDN = products=some-produc,dc=your-company,dc=com, with
a filter like : (pid=17) and a singleLevelScope will simply find the
entry you are looking for.
Is such a multi-valued RDN possible with the LDAP specification?
yes. But it is not really used for this purpose (it allows
disembiguation of entries, like in sn=smith+gn=john when you have more
than one smith in a level)
If yes,
my requirement can be easily fulfilled with the multi-valued RDN
attribute.
Sure, but I warn you that it will be heavy and not really performant.
But, I suppose the maximum length possible for the DN in the LDAP
add/modify request will impose a limit to this approach, because if the
range is bigger the DN string will also become bigger.
The limit is the tool you will use to insert such elements. Remember
that each attribute used in the DN must also be present in the entry. I
guess that the DN is useless in your case, and having something like dn:
productRange=15-22,... is enough for your need (in this case, the DN
will just be used to uniquely identify your entry).
Is there such a
limit exists with the LDAP server implementations(E.g.openLDAP)?
I don't know for OpenLdap. Apache DS does not have such a limit, but the
shortest the limit, the better (parsing such a DN is one of the most
expensive operation : you have to internally check against Matching
rules each element, after having normalized them. Costly, really ...
Does the
LDAP specification mention anything about any such limit?
yes, but the use of {<limit} declaration for an attribute. You might for
isntance limit an attribute to, say, 32 chars by adding {32} at the end
of the attribute syntax (http://www.faqs.org/rfcs/rfc2252.html, 4.3.2),
but this is something you have to declare in the schema. There is no
such limit for a DN, but again, this is not really a good idea to have
long DNs.
Emmanuel
---
You are currently subscribed to [email protected] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the
SUBJECT of the message.
---
You are currently subscribed to [email protected] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the
SUBJECT of the message.