[CalendarServer-dev] [CalendarServer] #260: OpenLDAP directory service

CalendarServer trac at macosforge.org
Wed Oct 7 05:03:08 PDT 2009

#260: OpenLDAP directory service
 Reporter:  jusiskin@…                 |       Owner:  sagen@…           
     Type:  Feature                    |      Status:  new               
 Priority:  2: Expected                |   Milestone:  CalendarServer-2.x
Component:  Calendar Server            |    Severity:  Other             
 Keywords:                             |  

Comment(by rahul@…):

 The patch should work exactly this way. I have just tested it. The dn and
 password entries should be present in the configuration file but their
 values should be empty. As per the code, if the user is not found in the
 ldap database, authentication does not proceed.

 Replying to [comment:31 rlalkaka@…]:
 > Replying to [comment:29 rahul@…]:
 > > I have modified the patch given to me by Oxullo to include LDAP TLS
 support as well as filters. Also authentication is done using PAM rather
 than LDAP. I have only commented out the LDAP authentication code just in
 case you intend to revert to using LDAP server for authentication. The
 configuration options are as below now (I have included a sample filter
 option as well). Also the tlsCACertDir option does not seem to be working
 (no idea as to why this option is not working).
 > I'm having some trouble getting this working. Leaving the credentials
 field blank (which the comments in
 twistedcaldav/directory/ldapdirectory.py imply will anonymously bind)
 prompts ./run to spew errors about the blank credentials DN (log and trace
 below). Is there an easy way to change the patched LDAP to bind to
 uid=<username>,ou=people,dc=example,dc=com and then proceed with PAM auth
 if the record exists, instead of searching as in the current
 implementation? Apologies if this is a trivial change -- I can't make head
 or tail of LDAP right now.
 > {{{
 > [startup] Configuring directory service of type:
 > [LdapDirectoryService] Calling ldap.initialize('ldap://ldap.server-
 > [-] Traceback (most recent call last):
 > [-]   File "../Twisted/bin/twistd", line 21, in ?
 > [-]     run()
 > [-]   File "/tmp/src/Twisted/twisted/scripts/twistd.py", line 27, in run
 > [-]     app.run(runApp, ServerOptions)
 > [-]   File "/tmp/src/Twisted/twisted/application/app.py", line 379, in
 > [-]     runApp(config)
 > [-]   File "/tmp/src/Twisted/twisted/scripts/twistd.py", line 23, in
 > [-]     _SomeApplicationRunner(config).run()
 > [-]   File "/tmp/src/Twisted/twisted/application/app.py", line 157, in
 > [-]     self.application = self.createOrGetApplication()
 > [-]   File "/tmp/src/Twisted/twisted/application/app.py", line 202, in
 > [-]     ser = plg.makeService(self.config.subOptions)
 > [-]   File "/tmp/src/CalendarServer-1.2/twistedcaldav/tap.py", line 749,
 in makeService
 > [-]     service = serviceMethod(options)
 > [-]   File "/tmp/src/CalendarServer-1.2/twistedcaldav/tap.py", line 471,
 in makeService_Slave
 > [-]     baseDirectory =
 > [-]   File
 line 144, in __init__
 > [-]     self._updateStorage(recordType)
 > [-]   File
 line 238, in _updateStorage
 > [-]     logging.info("Retrieving subtree of %s." % ldap.dn.dn2str(base),
 > [-] AttributeError: 'module' object has no attribute 'dn'
 > }}}

Ticket URL: <http://trac.calendarserver.org/ticket/260#comment:33>
CalendarServer </>

More information about the calendarserver-dev mailing list