[Twisted-Python] LDAP server based on python
Hello, My goal is to be able to access contacts that are into a (open source) CRM from any LDAP compatible client (mostly email clients that can access an LDAP server as a shared contact database). This is a fairly simple LDAP server, mostly implementing search on emails and get contacts back (+a very simple ACL). I read a post from Tommi Virtanen a (few) years ago http://twistedmatrix.com/pipermail/twisted-python/2005-May/010484.html And found more information on : http://www.inoi.fi/open/trac/ldaptor I've svn checkouted ldaptor, and did find ldaptor/protocols/ldap/ldapserver.py However, I'm kind of lost now and didn't find any examples (or discussion), and was wondering about the status of the ldap server. If this is still active, could you tell me where to find more info and hopefully some examples ? I saw this thread: http://twistedmatrix.com/pipermail/twisted-python/2008-January/016534.html about "ldaptor and bind" If I read properly, the ldap server is something for testing, but not production ready (eg no security/acl implemented by default). Am I right ? Did Ottavio Campana manage to have something working and did he publish the result of his modifications ? In short, is there a simple example of a server with a sql backend, that implement searches ? thanks in advance, Xavier
Hi, why not just use OpenLDAP's slapd-sql backend, until Ldaptor will "rise to World Domination some day" ;) ? That backend was designed specifically to solve the cases you describe, i think. As i've some rather good experience with Ldaptor's client part, i've never used the (unfinished) server parts though. But i haven't used the slapd-sql backend either ;) . Petr xavier dutoit napsal(a):
Hello,
My goal is to be able to access contacts that are into a (open source) CRM from any LDAP compatible client (mostly email clients that can access an LDAP server as a shared contact database).
This is a fairly simple LDAP server, mostly implementing search on emails and get contacts back (+a very simple ACL).
I read a post from Tommi Virtanen a (few) years ago http://twistedmatrix.com/pipermail/twisted-python/2005-May/010484.html And found more information on : http://www.inoi.fi/open/trac/ldaptor I've svn checkouted ldaptor, and did find ldaptor/protocols/ldap/ldapserver.py
However, I'm kind of lost now and didn't find any examples (or discussion), and was wondering about the status of the ldap server. If this is still active, could you tell me where to find more info and hopefully some examples ?
I saw this thread: http://twistedmatrix.com/pipermail/twisted-python/2008-January/016534.html about "ldaptor and bind"
If I read properly, the ldap server is something for testing, but not production ready (eg no security/acl implemented by default). Am I right ? Did Ottavio Campana manage to have something working and did he publish the result of his modifications ?
In short, is there a simple example of a server with a sql backend, that implement searches ?
thanks in advance,
Xavier
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
why not just use OpenLDAP's slapd-sql backend, until Ldaptor will "rise to World Domination some day" ;) ? That backend was designed specifically to solve the cases you describe, i think. As i've some rather good experience with Ldaptor's client part, i've never used the (unfinished) server parts though. But i haven't used the slapd-sql backend either ;) .
Hi, That was another option I had in mind, but I wanted to be amongs the first using ldaptor, to be able to impress my grand children and tell them that I did use it before it rised to world domination ! I'll try the openldap way, but for the record, and in case the ldaptor inforcement squad comes home: I did try ;) X+
Petr
xavier dutoit napsal(a):
Hello,
My goal is to be able to access contacts that are into a (open source) CRM from any LDAP compatible client (mostly email clients that can access an LDAP server as a shared contact database).
This is a fairly simple LDAP server, mostly implementing search on emails and get contacts back (+a very simple ACL).
I read a post from Tommi Virtanen a (few) years ago http://twistedmatrix.com/pipermail/twisted-python/2005-May/010484.html And found more information on : http://www.inoi.fi/open/trac/ldaptor I've svn checkouted ldaptor, and did find ldaptor/protocols/ldap/ldapserver.py
However, I'm kind of lost now and didn't find any examples (or discussion), and was wondering about the status of the ldap server. If this is still active, could you tell me where to find more info and hopefully some examples ?
I saw this thread: http://twistedmatrix.com/pipermail/twisted-python/2008-January/016534.html about "ldaptor and bind"
If I read properly, the ldap server is something for testing, but not production ready (eg no security/acl implemented by default). Am I right ? Did Ottavio Campana manage to have something working and did he publish the result of his modifications ?
In short, is there a simple example of a server with a sql backend, that implement searches ?
thanks in advance,
Xavier
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
xavier dutoit ha scritto:
If I read properly, the ldap server is something for testing, but not production ready (eg no security/acl implemented by default). Am I right ? Did Ottavio Campana manage to have something working and did he publish the result of his modifications ?
Yes, I got something useful, it's going to be deployed soon but eventually I didn't come out with acls. Even though I have to say ldaptor fits well in my project and for some aspects I'm happier than with openldap.
In short, is there a simple example of a server with a sql backend, that implement searches ?
I have a web application I wrote with twisted web. This application saves data in a sqlite file. Whenever the user modifies it from the web, the application updates also the files used by ldaptor, since what I need is only to export them with ldap. It does not have acls, but I managed to get something similar by patching how the ldap server works. Moreover, to prevent corruption I modified how operations different from search behave. What do you want to do? About doc: in ldaptor/protocols/ldap/ldapserver.py I found nearly everything I needed, give al look also to ldaptor/ldiftree.py to see how not to store everything in memory but in a filesystem. Also give a look at http://www.inoi.fi/open/trac/ldaptor/browser/trunk/test-ldapserver.tac I hope it is enough, I've been able to understand how it works from these files. Bye, Ottavio -- Non c'e' piu' forza nella normalita', c'e' solo monotonia.
right ? Did Ottavio Campana manage to have something working and did he publish the result of his modifications ?
Yes, I got something useful, it's going to be deployed soon but eventually I didn't come out with acls. Even though I have to say ldaptor fits well in my project and for some aspects I'm happier than with openldap.
Congrat ! Are you going to release the ldap code with an open source license ? I'm in discussion with Tommi about adding ACLs, would you be interested ? Beside, he told me ldaptor should be updated to work with the latest on twisted, something you've done already ?
I have a web application I wrote with twisted web. This application saves data in a sqlite file. Whenever the user modifies it from the web, the application updates also the files used by ldaptor, since what I need is only to export them with ldap.
Yes, more or less what I want to do (based on mysql instead of sqlite). What is the ldap client you use ? What is the ldap schema (my goal is to read it from a mail client)
It does not have acls, but I managed to get something similar by patching how the ldap server works. Moreover, to prevent corruption I modified how operations different from search behave.
What do you want to do?
Quite simply provide LDAP access (bind, search, unbind) on the contacts in a CRM (civicrm). I'm working for NGOs, and that's the easiest I found to provide access to the address book from within outlook/thunderbird/whatever mail client.
About doc: in ldaptor/protocols/ldap/ldapserver.py I found nearly everything I needed, give al look also to ldaptor/ldiftree.py to see how not to store everything in memory but in a filesystem. Also give a look at http://www.inoi.fi/open/trac/ldaptor/browser/trunk/test-ldapserver.tac
Thanks ! Why didn't you try fetching directly from the db instead of putting it in an intermediate file ?
I hope it is enough, I've been able to understand how it works from these files.
I hope too.
Bye,
Sorry for the delay, it took me a while to get in touch with tommi and move forward on how to work on that together. What is your application ? Is this something public ? X+
xavier dutoit ha scritto:
right ? Did Ottavio Campana manage to have something working and did he publish the result of his modifications ? Yes, I got something useful, it's going to be deployed soon but eventually I didn't come out with acls. Even though I have to say ldaptor fits well in my project and for some aspects I'm happier than with openldap.
Congrat ! Are you going to release the ldap code with an open source license ?
well I think I think I'm releasing it opensource. Two days ago I discovered a tremendous problem in the software due to utf-8 encoding required by sqlite... I'm trying to fix it, but it's not fixed yet, so I'd like to fix it before releasing.
I'm in discussion with Tommi about adding ACLs, would you be interested ? Beside, he told me ldaptor should be updated to work with the latest on twisted, something you've done already ?
well, I'm sorry but I don't think I'll have time. I just finished my doctorate, so I'm looking for a postdoc and I do not know what I'm doing (by the way, if you are aware of some positions... ;-) )
I have a web application I wrote with twisted web. This application saves data in a sqlite file. Whenever the user modifies it from the web, the application updates also the files used by ldaptor, since what I need is only to export them with ldap.
Yes, more or less what I want to do (based on mysql instead of sqlite).
What is the ldap client you use ? What is the ldap schema (my goal is to read it from a mail client)
I use sqlite instead of mysql because the software has to run on an embedded system. I use inetorgperson, since it works with all clients, as far as I know (and have tested).
It does not have acls, but I managed to get something similar by patching how the ldap server works. Moreover, to prevent corruption I modified how operations different from search behave.
What do you want to do?
Quite simply provide LDAP access (bind, search, unbind) on the contacts in a CRM (civicrm). I'm working for NGOs, and that's the easiest I found to provide access to the address book from within outlook/thunderbird/whatever mail client.
I do not know this crm...
About doc: in ldaptor/protocols/ldap/ldapserver.py I found nearly everything I needed, give al look also to ldaptor/ldiftree.py to see how not to store everything in memory but in a filesystem. Also give a look at http://www.inoi.fi/open/trac/ldaptor/browser/trunk/test-ldapserver.tac
Thanks ! Why didn't you try fetching directly from the db instead of putting it in an intermediate file ?
that was the easiest solution. But if you have patches... :-)
What is your application ? Is this something public ?
it is (wants to be in the future) a front end to asterisk. By now it has an addressbook, which can be accessed with a browser to execute calls or with ldap protocol. I'm working right now to understand how to fix the encoding problem, please email me next week, when I hope I'll have fixed it. Bye -- Non c'e' piu' forza nella normalita', c'e' solo monotonia.
participants (3)
-
Ottavio Campana
-
Petr Mifek
-
xavier dutoit