github/github-ldap — pull request #64 by mtodd (2014-11-25 03:59:31+00:00)
Title: Recursive group member search strategy

This adds a recursive search strategy to find all members of a given group, including nested groups.

This implementation has two desirable qualities for a search strategy like this:

1. tracks entries already found so circular or repeated members are queried for exactly once
2. defines a maximum (configurable) depth to recurse
3. queries for the required attributes and nothing else

Unfortunately, `member` attributes are DNs which requires a search per DN, resulting in as many queries as there are unique DNs to search for, resulting in potentially huge query volume. One option is to experiment with querying based on the RDN, but that could result in ill-defined behavior.

Still to do:

- [ ] generalize for various member attributes (currently hardcoded to `member`)
- [ ] experiment with extracting RDNs from DNs to do bulk searches for
- [ ] more tests
- [ ] benchmark against `Group#members` and `Group#subgroups`

cc @jch @github/ldap