matrix-synapse-ldap3: Cant login with LDAP after update

Hi there, Today I updated synapse to version 0.18.5. I use debian8 package for both matrix-synapse and python-matrix-synapse-ldap3, however after update, I can’t no longer authenticate. This is the traceback:

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/synapse/http/server.py", line 116, in wrapped_request_handler yield request_handler(self, request, request_metrics) AttributeError: 'NoneType' object has no attribute 'bind'

Am I missing something?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

in ldap_auth_provider.py , line 168 (fetch metadata for account creation):

searchbase=self.ldap_base

requires that user will have rights to query all attributes under ldap_base. In our use case users do not have full permissions and can only query themselves, so no results are returned. We did a dirty fix and changed the query to this:

search_base="cn={ldap_user},{ldap_base}".format(
                         ldap_user=localpart,
                         ldap_base=self.ldap_base
                     ),

And that seems to fix the issue of new user registration for now. If there is a better way to get same results, please let me know.

yes. The module was changed to “ldap_auth_provider.LdapAuthProvider” in homeserver.yaml config

Edit:

 password_providers:
      - module: "ldap_auth_provider.LdapAuthProvider"

ldap_auto_provider.py is indeed different. odd. I wget the newer file version from the repo but the error remains.