I'm setting up a new install of askbot and have everything working, with the exception of ldap. I can log into the system and it correctly authenticates against my ldap server, creating the user account. The problem comes in with logging out of the system. When you go to log back in, it is as if askbot doesn't recognize that the user is already registered in askbot. if you attempt to put your display name and email address back in, you get a duplicate key error.
I was able to figure this out. in askbot/deps/django_authopenid/backends.py, I had to add a line to bind to the server (our server requires authentication prior to being able to search the tree).
32 user_filter = "({0}={1})".format(askbot_settings.LDAP_USERID_FIELD,
33 username)
34
35 # Attempt at doing a simple bind to the ldap server
36 # This is needed before being alllowed to search the ldap tree
37 ldap_session.simple_bind_s("full_path_to_admin_user", "password")
38
39 # search ldap directory for user
40 res = ldap_session.search_s(askbot_settings.LDAP_BASEDN, ldap.SCOPE_SUBTREE, user_filter, None)
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2012-04-11 15:32:04 -0500
Seen: 105 times
Last updated: Apr 12 '12
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.