13

What is the syntax for performing a case-insensitive match on a uid attribute? If attribute definition matters then how would that be changed?

In particular I am using ApacheDS for my LDAP store.

WoJ
  • 27,165
  • 48
  • 180
  • 345
harschware
  • 13,006
  • 17
  • 55
  • 87

2 Answers2

13

(uid=miXedCaseUSer) will match a uid of mixedcaseuser.

According to the OID Description for 0.9.2342.19200300.100.1.1 - Userid userId is defined to have EQUALITY MATCHING RULE caseIgnoreMatch

This means it is one of the attribute definitions that employ case-insensitive matching by default.

WoJ
  • 27,165
  • 48
  • 180
  • 345
harschware
  • 13,006
  • 17
  • 55
  • 87
  • 1
    Of course, but SO imposes a waiting period for that. Besides, I'm not even convinced mine is the best answer. One thing that annoys me here is that the search type is modeled into the attribute, what do I do if I now want case-sensitive searches on uid? Are there other ways? There must be a way to change case sensitivity in the search... I hope. – harschware Jan 07 '10 at 15:45
  • 4
    Try overriding the default matching rule for the attribute using extensible matching: (uid:caseExactMatch:=mixCaseUSer). If it works it will probably be a lot slower than using the default matching rule for the attribute. – Per Noalt Jan 09 '10 at 22:53
  • How can I apply `caseExactMatch` on `uid`? Does it possible? – SatyaTNV May 30 '20 at 07:21
  • how to give this syntax in .properties file? – rinilnath Aug 05 '22 at 17:17
5

I think they are case insensitive by default, unless its a password attribute.