-
What happened?While setting up LDAP auth, I get the following error:
That is indeed correct, as my identity provider includes an OTP, so a static hash is not available How can we reproduce the problem?I can reproduce the problem by doing the following steps:
Versionv0.11.x What database are you using?PostgreSQL What blob storage are you using?S3-compatible Where is your directory located?LDAP What operating system are you using?Docker Relevant log outputCode of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
While it is possible to bypass this requirement by setting any key that actually exists, this should probably not be the way, right? |
Beta Was this translation helpful? Give feedback.
-
I just encountered this error as well. Setting Weird part, it knows when the username/password is incorrect, as when it's correct it will throw "unauthorized" back instead of the "invalid username/password". |
Beta Was this translation helpful? Give feedback.
-
This seems like it's a know limitation, based on what I can read here https://stalw.art/docs/auth/backend/ldap#limitations-regarding-password-hashes and here #491 EDIT: if I create a |
Beta Was this translation helpful? Give feedback.
-
That is correct, Stalwart needs to have access to the secret in order to be able to invalidate OAuth tokens. |
Beta Was this translation helpful? Give feedback.
-
Hi there, A better approach to invalidate oauth tokens would be to read an attribute that describes when the userPassword attribute changed. We see this issue come up in Kanidm quite a bit, and the issue is that we will never expose a userPassword to any application for any reason. Even if we did, we store our passwords with argon2id (and in future with hmac from a HSM) so the password hash is useless to any external application. It would be better to use something like https://ldapwiki.com/wiki/Wiki.jsp?page=PwdChangedTime for this purpose instead, since that is not a security sensitive attribute and still allows the invalidation of sessions. |
Beta Was this translation helpful? Give feedback.
-
In this case use |
Beta Was this translation helpful? Give feedback.
Sorry about that, the password attribute is optional when the server reads the LDAP config but the webadmin was requiring it. It has now been fixed.