Closed bck01215 closed 2 years ago
You can use the built-in PagedResults
search adapter, see the search_adapted_paged_plus_sync.rs
example. Adapted search gives you a generator-like struct from which you must retrieve entries sequentially. (They can be pushed to a vector or collected in one, although with thousands of results it's probably better to process them in a streaming manner.) Python's ldap3 has a dedicated search_paged()
function, which this crate won't emulate.
This worked in the sense, I can change my ldap query to look for member of group as opposed to the member attribute of a group, but it didn't load all the attributes.
If I change the query to be
(&(objectClass=user)(memberOf={}))
I can get more than threshold of results because it's paged. but the attributes themselves are not paged and remain 1500. My original query which returns one group still returns one entry with only 1500 entries of the attribute
Ah, I misunderstood; you have an attribute limit, not an entry limit. I found this article (and, tbh, you could have, too.) Try to adapt their second solution (ranged searches) to your Rust code.
Closing for lack of feedback and being a usage issue.
I am using ldap3 = { version = "0.10.5", features = ["gssapi"] } in my rust program.
I use an ldap query to get the members of a group,
Instead of getting all members I get a hashmap like
Only the range has any information in it. The problem is, there are more members than just that range. No other ranges were returned.
I believe this should be default functionality as is with ptyhon's ldap3 package.
I'm new to rust so I'm struggling to find a way to implement this.