-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDAP user sync bugs in webserver auth mode #395
Comments
Hi @pboguslawski . Thank you for taking the time to create this issue. It sounds like you are describing the designed/expected behaviour. I'll mark this issue to be reviewed by our Product team to take your enhancement suggestions under advisement. |
@pboguslawski The setting of random password is to support our existing design, also the change to update the password after login was introduced in #294, you can disable this by disabling "Enable User Access Synchronization from LDAP" setting in your LDAP config. |
|
@pboguslawski I just check locally and it seems to be called only twice, can you explain how are you observing that it is trying to update the password multiple times ? Also can you check if replacing this line with below code fixes the issue for you ?
|
The problem was noticed in MariaDB bin log - there were multiple user record updates after user moving between pages in Matomo UI. Just checked in test Matomo 5.2.1 installation that opening Matomo dashboard from other Matomo page generated many updates with random passwords (password in not used for auth in this scenario and Matomo does not have access to password attribute in LDAP). Matomo debug log said:
MariaDB bin log said:
Patching
does not resolve problem - still many updates on dashboard opening in UI. |
Just checked that |
Test env is based on Debian 12 (php v8.2.26, apache v2.4.62, php fpm). Matomo system check in UI does not contain any session handling related problems. |
@pboguslawski Strange, for me locally its only 2 times at the time of login, I will check within the team if we can do anything about this, I suspect your setup is trying to authenticate on every request, which could be the problem.
@pboguslawski Does changing the patch line to below helps ?
|
Changing to
does not help. I can see Matomo has session handling using PHP session ID https://github.com/matomo-org/matomo/blob/5.x-dev/core/Session.php I can see
set in browser requests but I cannot see any session file in PHP session directory configured. Only record in Should Matomo/PHP sessions ( |
@pboguslawski Its stored in the database, you can view |
When matomo authenticates users with LDAP + webserver auth (users in LDAP do not use passwords)...
...every successful UI request is updating users record in SQL
Enabling DEBUG shows
Random password generation is explained on
#212
#204
Every LDAP sync job execution from cron...
...also generates SQL user update commands like above (but this time password in updates is not changing).
Problems to be resolved:
synchronize_users_after_login = 1
user LDAP sync should not be performed on every UI page change, but as name says once after login (new session creation).The text was updated successfully, but these errors were encountered: