-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
internal users authentication broken when ldap in use #4216
Comments
I was able to fix this issue by adding an attribute check on line 288 of synapse/synapse/util/logcontext.py Line 288 in 678ad15
to this: if self.parent_context is not None and hasattr(self.parent_context, '_resource_usage'): I thought of making a PR for this but I was afraid the root cause of the problem was more complex. |
@cuibonobo I think that's an entirely valid workaround. I'd accept a PR that did that. The root of the issue is that the ldap code is not correctly preserving the log context, so when we come back to the password check code, there is no active log context. So the correct solution is to find out where the ldap code is dropping the logcontext, and fix that. Doing so will then make sure that CPU used by /login requests (which can be very significant) is correctly attributed to the requests that cause them. The ldap code looks to be calling However, that could get fiddly, and making line 288 more robust wouldn't be a bad thing anyway. |
@richvdh What is the status? Is there already a pull request or the issue fixed in another form? The main problem for me is, that I don't found a way to make a ldap user to an admin user so the admin user rely on a working ldap and local auth in parallel. |
FWIW: I am sorry for the commit message related spam in this issue. |
fixed by #4486, hopefully |
i'm using both external ldap and internal synapse database for authentication.
after upgrading to 0.33.9 internal users can't login anymore.
using debian stretch and packages from https://matrix.org/packages/debian/.
The text was updated successfully, but these errors were encountered: