33

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?

Michael
  • 10,063
  • 18
  • 65
  • 104

3 Answers3

39

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.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Can you please share one sample syntax make user DNpattern as case sensitive. We have set in properties file like below ldap.user.dnPattern=uid={0},ou=people,dc=abcxxx,dc=eu – rinilnath Aug 05 '22 at 16:14
7

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.

jwilleke
  • 10,467
  • 1
  • 30
  • 51
  • Do you know if LDAPConnection.getEntry of Unboundid is case insensitive? or it is depend on LDAP and therefore I already have the answer? – Michael Apr 29 '15 at 09:45
  • 2
    I tried AD, eDirectory and OUD with all upper and all lower case and found no differences. – jwilleke Apr 29 '15 at 11:23
4

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.

Flow
  • 23,572
  • 15
  • 99
  • 156
Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30