weisserd / LDAP-Sync

LDAP Sync adapter for Android

Home Page:http://www.danielweisser.de/blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Will this work for LDAP servers with a lot of entries?

jwhendy opened this issue · comments

I'm trying to test this out now that I've successfully built it. I tried via the Virginia Tech public LDAP server. My settings (basic):

  • URL: ldap.virginia.edu
  • Port: 389
  • No security, empty username/password
  • Base DN: o=University of Virginia, c=us

That's it. When LDAP-Sync tries to do it's thing, I get the error, "Size limit exceeded."

This is going to be a problem to use at work, as when I setup Thunderbird to test my corporate LDAP and chose to import contacts, it brought in something like 90k.

How does one either:

  1. Change the limit, or
  2. Search directories live (vs. sync) -- perhaps I can add contacts to LDAP synced account as I look them up, or
  3. Something else for this type of situation?

Thanks,
John

By default, this software is sort of designed for a private LDAP server where you intend to sync all items from the server. If you want to check out my fork of the software, I've got it doing something similar for the University of Florida, and it's only syncing LDAP entries where an email address matches a pre-existing contact. Otherwise, you'll have to modify the code to start doing loops of fetches that pulls down whatever the server's limit is, using some search criteria each time.

@martinb3 Good to know. I'd like to pass it a few filters so that it doesn't sync everyone, but would still like it to be a nice in-phone reference to my corporate directory. Are you implying that the "limit exceeded" error would be coming from trying more than the server wants to provide, or that there's some sort of limit set by LDAP-Sync?

Yours sounds interesting except that I don't have existing contacts for my work in phone contacts. I'd just like to turn on sync during the day, use it when I need to, and then turn off when I leave to just use my default phone contacts.

That and I'm logging my work activities and would like to have quick (and repeatable) copy/paste of contact information, which is most easily done through one's address book. The Google Play app LDAP Client works pretty well also, but searching isn't nearly as easy as when the contacts are in the phone and you can search via any field quite quickly. With LDAP Client you have to choose the field you want to search, and your entry has to be exact. You can't search "Hender" and expect Hendersons and Hendersens to show up. Big issue when I work at a company with a lot of different ethnic backgrounds and I'm not sure how to spell first or last names!

@jwhendy, usually the "limit exceeded" is a configurable setting on your LDAP server. You'd have to modify search filter setting, base DN setting, or the code itself in order to figure out a good compromise that yields the results you want without syncing everyone. For the fork I have that defaults to our LDAP server (with hundreds of thousands of entries), I settled on adding a dummy phone contact with only email address, and then I modified the code to only search by individual email addresses, and then every email address is searched in my LDAP and only ones that yield a result are synced (and then Android aggregates the contact with my dummy phone contact, presenting a unified contact entry).

In order to what you want, you'd have to somehow limit the contacts you want to sync. Maybe you have a department with a base DN or a search against an attribute? You're going burn a lot of battery syncing all possible contacts. Have you tried searching with asterisks? Like "(uid=foo)"?

Hope this helps,
Martin