Hello everybody!

 

I try to configure Active Directory authentication on our local instance.  So far, I got the authentication to work using direct binding.  I have these options in the auth_conf.xml :

 

            <allow-register>No</allow-register>

            <auto-register>Yes</auto-register>

            <server>ldap:/REDACTED /</server>

            <bind-user>{username}@REDACTED</bind-user>

            <bind-password>{password}</bind-password>

            <continue-on-failure>False</continue-on-failure>

            <auto-register-username>{sAMAccountName}</auto-register-username>

            <login-use-username>True</login-use-username>

            <auto-register-email>{mail}</auto-register-email>

 

Paster.log:

galaxy.auth.providers.ldap_ad DEBUG 2015-09-03 11:26:20,158 LDAP authenticate: whoami is u:REDACTED\GagnonY

galaxy.auth.providers.ldap_ad DEBUG 2015-09-03 11:26:20,159 LDAP authentication successful

 

However, the authentication module does not seem to be able to fetch information from LDAP to auto register

With these settings, I get the debug message in galaxy when I try to log in :

 

URL: http://localhost:8080/user/login?use_panels=False

File '/home/galaxy/galaxy_app/galaxy/eggs/WebError-0.8a-py2.6.egg/weberror/evalexception/middleware.py', line 364 in respond

  app_iter = self.application(environ, detect_start_response)

File '/home/galaxy/galaxy_app/galaxy/eggs/Paste-1.7.5.1-py2.6.egg/paste/recursive.py', line 84 in __call__

  return self.application(environ, start_response)

File '/home/galaxy/galaxy_app/galaxy/eggs/Paste-1.7.5.1-py2.6.egg/paste/httpexceptions.py', line 633 in __call__

  return self.application(environ, start_response)

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/web/framework/base.py', line 133 in __call__

  return self.handle_request( environ, start_response )

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/web/framework/base.py', line 191 in handle_request

  body = method( trans, **kwargs )

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/webapps/galaxy/controllers/user.py', line 482 in login

  message, status, user, success = self.__validate_login( trans, **kwd )

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/webapps/galaxy/controllers/user.py', line 524 in __validate_login

  autoreg = trans.app.auth_manager.check_auto_registration(trans, login, password)

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/auth/__init__.py', line 100 in check_auto_registration

  auth_result, auto_email, auto_username = provider.authenticate(email, username, password, options)

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/auth/providers/ldap_ad.py', line 177 in authenticate

  _get_subs(options, 'auto-register-email', params),

File '/home/galaxy/galaxy_app/galaxy/lib/galaxy/auth/providers/ldap_ad.py', line 19 in _get_subs

  return str(d[k]).format(**params)

KeyError: 'mail'

 

So for some reason, the module cannot fetch the mail field from AD.  If I try to bypass this by putting a harcoded email, same issue occurs with sAMAccountName field.  Did anybody encounter this before? 

 

Thanks in advance for the help.


Yves Gagnon