Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Provide a stream for group members? #8

Open
tfrancois opened this issue Aug 12, 2022 · 4 comments
Open

Feature Request: Provide a stream for group members? #8

tfrancois opened this issue Aug 12, 2022 · 4 comments

Comments

@tfrancois
Copy link

I have found the stream capability of the user search an invaluable and unique way to handle large AD queries, and was wondering if there was a way to have a stream object be returned for group members of a given group? Thanks!

@wickning1
Copy link
Contributor

Two potential conflicts with providing a .groupMembers() function:

  • Not all LDAP implementations maintain memberOf, so I probably would have to avoid relying on it. That would make .groupMembers() take two round trips - one for the group (and its member property), and a second to search/stream the members. Most users would be better off doing a search based on memberOf after confirming that their target service supports it.
  • Some group members are groups. We would need to provide a recursive and non-recursive version of .groupMembers() and provide cycle protection when recursive. Doable, but a little bit of work.

wickning1 added a commit that referenced this issue Jan 15, 2024
…ing group members recursively, release 2.1.0 #8
@wickning1
Copy link
Contributor

wickning1 commented Jan 15, 2024

I took a stab at this and published it in 2.1.0, but it's hard to fully test against openldap. It's more of a beta feature. getMembers() is documented but there is also getMemberStream().

@wickning1
Copy link
Contributor

I went ahead and made it always recursive if it finds subgroups. It's hard to imagine why you'd want to ignore subgroups. It does have cycle detection to avoid infinite loops.

@tfrancois
Copy link
Author

tfrancois commented Jan 17, 2024

Wow - I just saw this update! I have a Windows AD instance and a Samba/OpenLDAP instance and will test against both in the next couple of days and report back if I find any issues! Thank you for continuing to support this excellent lib!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants