Reputation: 10319
LDAP can contain multi-valued attributes. For example, cn
can be multi-valued attribute. See below LDAP RFC.
My application can process (show) only one cn
value.
Will all entries in LDAP have same number of cn
attributes?
Can I configure always to take second cn
value?
What is a best practice to process multi-valued attributes in LDAP?
https://www.rfc-editor.org/rfc/rfc4519#section-2.3
The 'cn' ('commonName' in X.500) attribute type contains names of an
object. Each name is one value of this multi-valued attribute. If
the object corresponds to a person, it is typically the person's full
name.
Upvotes: 3
Views: 2433
Reputation: 10986
Will all entries in LDAP have same number of cn attributes?
No. Well, unless they are specifically added.
BTW: Some LDAP Server Implementations do NOT support multiple Values for cn. Microsoft Active Directory is one of them
Can I configure always to take second cn value?
No. The return order of attributes is not defined within the RFC specifications and therefore is unknown. Some Specific LDAP Server implementations do return multi-valued attributes in a specific order. (Like FIFO or LIFO.
What is a best practice to process multi-valued attributes in LDAP?
Can't say I have ever heard of a best practice. Guess it depends on the task you are trying to perform.
Upvotes: 4