Michael
Michael

Reputation: 10319

Is LDAP DN case insensitive?

I build some feature that assumes that LDAP DN is case insensitive.

I have checked it with ActiveDirectory, Oracle and OpenLDAP and it is case insensitive.

Is it correct for all LDAPs?

Upvotes: 33

Views: 46421

Answers (3)

Ludovic Poitou
Ludovic Poitou

Reputation: 4868

An LDAP DN is composed of several attribute value pairs (RDNs) and each one may have a different syntax. By default, all of the attributes used in naming are DirectoryString and thus case-insensitive. But one can use other attributes, such as integers, Unique Identifiers ou case-sensitive strings. As EJP said, this is rare, but it can happen.

Upvotes: 4

user207421
user207421

Reputation: 310893

LDAP DNs and all attributes are case-insensitive by default. It is possible to define an attribute as case-sensitive in the schema, but this is rare, and it is also possible to override the default comparison rules, but again this is rare.

Upvotes: 41

jwilleke
jwilleke

Reputation: 10986

I think it Depends on what you are doing.

During a bind, the DN should not be case sensitive regardless of the make up of the attributes within the DN.

Distinguished names in Active Directory are not case sensitive.

Edirectory "Distinguished Names are not case sensitive, even if one of the naming attributes is case sensitive."

According to the LDAP protocol request for comments (RFCs), distinguished names should be compared case-insensitively.

Upvotes: 8

Related Questions