View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006151 | SOGo | Backend General | public | 2025-10-08 14:59 | 2025-10-15 15:48 |
Reporter | the2nd | Assigned To | qhivert | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | assigned | Resolution | open | ||
Platform | amd64 | OS | Ubuntu | OS Version | 22.04 |
Product Version | nightly master | ||||
Summary | 0006151: Dont reject authentication if password_hash != cached_password_hash | ||||
Description | Hello, i encountered the following issue. When authenticating sogo against OTPme (https://github.com/the2nd/otpme) via ldap with different token types (static password and OTP), the authentication with the second token fails with the following error: <0x0x55b150d6a790[SOGoDAVAuthenticator]> tried wrong password for user 'username'! The problem seems to be the following:
As a workaround i set SOGoCacheCleanupInterval = 1; which fixes the issue but puts a lot more load on the ldap server. So i would like to ask, if it would be possible to add a configuration parameter to control the behavior of sogo in case the request password (hash) does not match the cached password hash. Failing with "tried wrong password " makes it impossible to use sogo with different token types. So adding an option to change the behavior to "try ldap auth if password_hash != cached_hash" would fix the issue. I think the same error should appear, if a user tries to login shortly after changing its password, while the old password is still cached. But i have not tested it. Regards | ||||
Tags | No tags attached. | ||||
Hello, |
|
Hello, no, I don’t think that’s the problem. OTPme uses python-ldaptor to implement its own LDAP server. The passwords/OTPs are not stored in LDAP but verified during LDAP authentication. The OTP is a session-based OTP that comes from the OTPme SSO login page. The usual steps are:
This session-OTP is then used by SOGo/IMAP to authenticate against otpme-ldapd. The session-OTP remains valid as long as the user is logged into the OTPme SSO portal. This works fine without any issues. The problem is that while the user is logged into SOGo webmail with the session-OTP, there might be a second request (e.g., from DAVx5 on a mobile phone) using a static password. If this request is sent to otpme-ldapd by SOGo/IMAP, it would normally be verified successfully. However, it seems that SOGo compares the static password from the new DAVx5 request against the cached session-OTP from the SOGo webmail login - which obviously fails - and then rejects the request. If I set SOGoCacheCleanupInterval = 1; as described here: https://www.sogo.nu/support/faq/sogo-caches-my-password.html the problem disappears. But since the password is no longer cached, every single request (e.g., clicking an email in webmail) triggers an authentication request to otpme-ldapd, resulting in higher load. I hope this clarifies things a bit. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2025-10-08 14:59 | the2nd | New Issue | |
2025-10-15 14:48 | qhivert | Note Added: 0018356 | |
2025-10-15 14:48 | qhivert | Assigned To | => qhivert |
2025-10-15 14:48 | qhivert | Status | new => feedback |
2025-10-15 15:48 | the2nd | Note Added: 0018359 | |
2025-10-15 15:48 | the2nd | Status | feedback => assigned |