-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update to 1.9.0 breaks authentication via LDAP (ma1sd / rest client) #6772
Comments
Got the same problem after upgrading to 1.9.0:
|
Unfortunately downgrade to 1.8.0 does not work, synapse does not start ("ValueError: Cannot use this database as it is too new for the server to understand"). A hotfix is highly appreciated as the only other way is to restore my backup from last night, losing data of today. |
Seems the source of problem is in https://github.com/ma1uta/matrix-synapse-rest-password-provider/blob/master/rest_auth_provider.py near the:
because |
Hi all, firstly let me say that this is unfortunate, especially as v1.9.0 doesn't let you downgrade. However, this has been broken because we've changed As such, ideally this would be fixed in the ldap plugin you used to only use the public API, this may in turn require us to expand the As an immediate and temporary fix you can patch synapse to re-expose the diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py
index d680ee95e..80298ecee 100644
--- a/synapse/module_api/__init__.py
+++ b/synapse/module_api/__init__.py
@@ -37,6 +37,7 @@ class ModuleApi(object):
def __init__(self, hs, auth_handler):
self._hs = hs
+ self.hs = hs
self._store = hs.get_datastore()
self._auth = hs.get_auth() Or alternatively you could patch the plugin to use If neither of those two are possible we are willing to consider a hot fix this time round, but we would aim to remove support again in the next release (likely in roughly two weeks). We're really not keen on continuing to support this precisely because we want to ensure that these sort of don't breakages happen again in the future. |
@erikjohnston, great thanks for quick fix - it works well for me! |
Can you please also provide the right way how to fix this problem in https://github.com/ma1uta/matrix-synapse-rest-password-provider module? If Synapse will not expose |
@erikjohnston Thank you also from my side for the lightning fast reaction and fix! Highly appreciated! |
You're welcome 👍
A quick browse of the code suggests its doing three things:
The first two seem like reasonable additions to the For the third one either we can add it to the interface as well, or you can simply replace it with the following, as its not doing anything special and just getting the timestamp in milliseconds: import time;
def time_msec():
"""Get the current timestamp in milliseconds
"""
int(time.time() * 1000) |
@erikjohnston |
It looks like a temporary fix is in place in the latest rest_auth_provider: https://github.com/ma1uta/matrix-synapse-rest-password-provider/blob/master/rest_auth_provider.py#L84 |
The `ModuleAPI` moved the `hs` attribute to be 'private'. This is a temporary fix. See matrix-org/synapse#6772
Thanks for this thread. Has anyone any rewrite ready apart of temporary fixes? |
I'm going to close this, as it needs fixing in ma1sd etc. |
The `ModuleAPI` moved the `hs` attribute to be 'private'. This is a temporary fix. See matrix-org/synapse#6772
Description
After updating synapse to 1.9.0 no user can login. Users are stored in a LDAP database, authentication via REST-API / ma1sd.
Steps to reproduce
Open Riot Web
Log in with any existing user
Error message: Fehler: Problem bei der Kommunikation mit dem angegebenen Home-Server. (M_UNKNOWN)
Version information
Synapse 1.9.0 installed via official repo.
Ubuntu 18.04 LTS
Log file of the issue:
The text was updated successfully, but these errors were encountered: