Django : looking for a good LDAP manipulation library

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 10:29:12

问题


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 !


回答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.




回答2:


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.




回答3:


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

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




回答4:


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.




回答5:


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.



来源:https://stackoverflow.com/questions/3906427/django-looking-for-a-good-ldap-manipulation-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!