On Wed, Feb 4, 2015 at 2:46 PM, David Shepherd <dsheph...@novell.com> wrote:
> I am looking for any examples of using the ldapbindingchecker to > authenticate a custom SSH Server written with Twisted and Python 2.7. At > the moment I am trying to hack an existing SSHD example in the Twisted > O'Reilly book. The docs refer to a "cfg" but I cannot find where it > discusses what CFG actually is ? > > I've yet to really dig into the code in that area of Ldaptor yet, but I believe this might be what you want: ldapChecker = LDAPBindingChecker(ldaptor.config.LDAPConfig()) p.registerChecker(ldapChecker) or cfg = LDAPConfig() checker = LDAPBindingChecker(cfg) realm = TODOGetRidOfMeRealm(config=cfg) porta = portal.Portal(realm) porta.registerChecker(checkers.AllowAnonymousAccess(), credentials.IAnonymous) porta.registerChecker(checker) > I seem to need a service account to authenticate with the > ldapbindingchecker so I can decide my user accound and password are valid > over ldap. Where is this defined and what is the format ? I have found the > global.cfg file and that gets me part of the way there but effectively I > still cannot set a password. Can anyone help ? > > Looking here: http://ldaptor.readthedocs.org/en/latest/_modules/ldaptor/checkers.html seems to indicate that you need to pass in your credentials. There are a few TODO items in here as well. I hope this gets you started into a better direction! I hope there are others that can chime in as well Cheers, Bret references: https://twistedmatrix.com/pipermail/twisted-python/2005-November/011928.html https://searchcode.com/codesearch/view/15584430/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python