whitlockjc / sync-ldap-groups-to-svn-authz

Simple Python script that can take your LDAP group definitions and create a Subversion authz file equivalent.
MIT License
26 stars 26 forks source link

add paging to ldap search #22

Open TheoAndersen opened 6 years ago

TheoAndersen commented 6 years ago

on larger directories, a single-query can exceed the size limit of a single search, giving the errorr (SIZE_EXCEEDED).

This commit changes the ldap search to use paging, whereas multiple search requests of a default size of 1000 results are made.

This was created with inspiration from the following sources:

troelsarvin commented 6 years ago

Verified working with three different Active Directories.

whitlockjc commented 6 years ago

So the LDAP version is a CLI option but paging (and its options) aren't. Thoughts?

TheoAndersen commented 6 years ago

You have a point that these might be related, and i did add the LDAP version CLI addition, mainly because of your comments.

The paging ldap functionality is part of ldap v3, and dates to 1999. Its RFC is here RFC2696. So it would seem quite old.

I don't really know the users of this project very well, so I really cannot say whether this change would be a breaking change.

Otherwise one would have to look into adding functionality, which would make the script able to detect wether paging is possible, and fall back to the old logic if it isn't. But thats fairly more complex code.