-1

I am looking for a good ldap library on Django, that would allow me to manage my ldap server :

  • adding, modifying, deleting entries
  • for groups, users, and all kind of objects

The library django-ldapdb looked promising, it offers a Model base class that can be used to declare ldap objects in a Django fashion (which is what we ideally want), however we've had some bugs with it, and furthermore it seems like it is not maintained any more.

Does somebody know a good library that could do the trick ? Otherwise I guess I'll just try to improve and debug django-ldapdb ...

Thanks !

sebpiq
  • 7,540
  • 9
  • 52
  • 69
  • django-ldapdb looks like it still has an active maintainer in Jeremy Lainé; last commit was 10/10. – Wogan Oct 13 '10 at 03:26
  • Yes you're right ... However, most recent commit before this one is 5 months earlier ! – sebpiq Oct 18 '10 at 05:51
  • I noticed your comment below that you gave up on django-ldapdb... what did you use instead? – Nils Jan 30 '12 at 17:51
  • Custom-built solution. But I am not satisfied with that either - basically because models are so tied in, you have to forget most of Django. My next try will be to duplicate the ldap directory as Django models and try to keep it in sync ... let's see what's it worth. – sebpiq Jan 31 '12 at 14:12

5 Answers5

1

sebpiq, you say you applied "one or two fixes" to django-ldapdb, would you care to share them? So far django-ldapdb meets my needs, but I'd be happy to integrate any fixes you might have.

Jeremy
  • 1,308
  • 10
  • 11
1

When using ldapdb to query ldap with more results than the server allows instead of getting the partial list (of say the first 500 users) I get SIZELIMIT_EXCEEDED exception. Trying to change the code to catch that exception resulted in an empty result objects. Anyone else had that problem?

I fixed that problem by changing the search_s function to use search_ext and read the results one by one until the exception happens.

Ely
  • 11
  • 2
0

http://www.python-ldap.org/doc/html/index.html

The beauty of Django is that you can use any python module within your application.

Andrew Sledge
  • 10,163
  • 2
  • 29
  • 30
  • Actually, django-ldapdb is already built on python-ldap. Using directly python-ldap is too low-level, what I would really like is to be able to use my ldap directory as a database, and that's why django-ldapdb corresponds to my needs... – sebpiq Oct 12 '10 at 05:58
0

There is also django-auth-ldap which claims

LDAP configuration can be as simple as a single distinguished name template, but there are many rich options for working with User objects, groups, and permissions.

André Caron
  • 44,541
  • 12
  • 67
  • 125
0

Actually, I have found out that with one or two fixes, django-ldapdb is a pretty good library. The only bad point is that it is not very actively maintained... I will use it anyways, because it is the best solution I have found.

sebpiq
  • 7,540
  • 9
  • 52
  • 69