Menu

#74 LDAP in 2.6

v2
closed
nobody
None
1
2015-03-19
2013-08-20
Brad Landis
No

I think you might want to check LDAP setup. When I set it up, it says "Missing parameters: local", which I think I've narrowed down to the process_login function in RootController.py. It seems the code gets a little funky in there with kwargs[local] and local as a variable. Please verify that it is working and let me know.

Discussion

  • Brad Landis

    Brad Landis - 2013-08-21

    Here are my changes.

    --- filelocker2-code-954-branches-2.6/src/controller/RootController.py  2012-11-28 21:48:19.000000000 -0600
    +++ /var/www/filelocker2/controller/RootController.py   2013-08-21 11:20:42.000000000 -0500
    @@ -96,9 +96,9 @@ class RootController:
             return str(tpl)
    
         @cherrypy.expose
    -    def process_login(self, local, username, password, **kwargs):
    +    def process_login(self, username, password, **kwargs):
             rootURL, local = cherrypy.request.app.config['filelocker']['root_url'], False
    -        if kwargs.has_key("local") and local ==str(True):
    +        if kwargs.has_key("local") and kwargs['local'] == str(True):
                 local = True
             username = strip_tags(username)
    
     
  • Brad Landis

    Brad Landis - 2013-08-22

    Also noticed something else (which I thought I had submitted a bug, but I couldn't find it, and it is somewhat related). If you set directory_type to local, and auth_type to ldap, it still tries to authenticate locally, because I believe of a misuse of the variable in the code. Here is my changes there:

    diff -wrup /root/filelocker2-code-954-branches-2.6/src/lib/AccountService.py ./lib/AccountService.py
    --- /root/filelocker2-code-954-branches-2.6/src/lib/AccountService.py   2012-09-19 22:24:14.000000000 -0500
    +++ ./lib/AccountService.py     2013-08-21 11:35:49.000000000 -0500
    @@ -120,7 +120,7 @@ def setup_session(user):
     class ExternalDirectory(object):
         directory = None
         def __init__(self, localOverride=False):
    -        directoryType = session.query(ConfigParameter).filter(ConfigParameter.name=="directory_type").one().value
    +        directoryType = session.query(ConfigParameter).filter(ConfigParameter.name=="auth_type").one().value
             if directoryType == "local" or localOverride:
                 from directory import LocalDirectory
                 self.directory = LocalDirectory.LocalDirectory()
    
     
  • David Hutchins

    David Hutchins - 2015-03-19

    This seems to be a correct assessment, I have committed this in rev. 966

     
  • David Hutchins

    David Hutchins - 2015-03-19
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB