Microsoft has added a new LDAP feature to AD in Windows 2003 SP2 and Longhorn server called the LDAP_MATCHING_RULE_IN_CHAIN. Essentially, it is an extension filter type that allows you to search withing the content of a distinguished name-syntax attribute and do matching throughout the entire chain of linked values instead of just within the immediate values. The docs are here and the syntax looks like this:
(memberOf:1.2.840.113556.1.4.1941:=CN=some group,CN=xxxx,DC=xxxx,DC=xxxx)
I showed some examples of this in my talk at DEC where I used some searches with and without the extension filter type to show traversal of some nested group membership.
Ryan also wrote about this a while ago and discovered that while useful, this technique is very slow for expanding group membership and it seems to be much faster to just use recursive searches.
As it turns out, the problem is that we were trying to use this feature incorrectly. The "In Chain" filter type should NOT be used for transitive link expansion! It is intended to be used for matching only. Perhaps that's why they called it LDAP_MATCHING_RULE_IN_CHAIN. :)
As such, you should really only use it in a base level query. If you use the filter shown above in a base level query, it will still tell you if the object that is used as the search root is a member of the specified group anywhere in the nesting chain, but it will perform fine. If you use it for anything else, you are asking for trouble.
Now, when will we get some sort of transitive link expansion widget that actually works well for this purpose?
Remember Me
Theme design by Jelle Druyts
Powered by: newtelligence dasBlog 1.9.6264.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Joseph E. Kaplan
E-mail