#260: OpenLDAP
---------------------------------------+------------------------------------
Reporter: jusis...@… | Owner: wsanc...@…
Type: Feature | Status: new
Priority: 3: Important | Milestone: CalendarServer-2.x
Component: Calendar Server | Severity: Other
Keywords: |
---------------------------------------+------------------------------------
Comment(by ra...@…):
Replying to [comment:14 so...@…]:
> Replying to [ticket:260 jusis...@…]:
> > To implement OpenLDAP as a directory service.
Yes it is possible. There is no special configuration for this. Also I
have a small suggestion. Instead of using pwauth for authentication, PAM
could be used. Below is a sample implementation of the verifyCredentials
function.
{{{
#!python
import PAM
def verifyCredentials(self,credentials):
"""
Verify that the given credentials can authenticate the principal
represented by this record.
@param credentials: the credentials to authenticate with.
@return: C{True} if the given credentials match this record,
C{False} otherwise.
"""
def pam_conv(auth, query_list, userData):
return [(credentials.password, 0)]
auth = PAM.pam()
auth.start("caldav") # PAM service name is "caldav"
auth.set_item(PAM.PAM_USER, credentials.username)
auth.set_item(PAM.PAM_CONV, pam_conv)
try:
auth.authenticate()
except PAM.error, resp:
return False
else:
return True
}}}
--
Ticket URL: <http://trac.calendarserver.org/ticket/260#comment:15>
CalendarServer </>
HTTP/WebDAV/CalDAV Server
_______________________________________________
calendarserver-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/calendarserver-dev