-
Notifications
You must be signed in to change notification settings - Fork 79
[Feature request] Support CRYPT password hashing scheme with ldap user module #114
Comments
Hello @nlgranger , thanks for the feature request. I didn't implement CRYPT password hashing in LDAP because I never really understood how it was implemented. If I understand the documentation you're pointing, and the way Apache Directory shows me the CRYPT hashing result:
I've made some tests and the first one can be implemented quickly, although it looks like a very weak password hashing algorithm. |
Am I correct in my assumptions? |
I'm mostly following recommendations but my knowledge of cryptography is limited. My understanding is the same as your: crypt without scheme id is deprecated and only the glibc-specific extensions with a scheme id are used in practice. I don't think you'd want to re-implement that yourself indeed, so it would have to be added as an extra dependency. Just to make things clear: I'm just playing around with ldap at the moment, I don't need this feature strictly speaking but someone else might. |
Ok I think I found it, the paragraph "Features in glibc" in the page http://man7.org/linux/man-pages/man3/crypt.3.html explains how to use ids. In my case, and according to https://en.wikipedia.org/wiki/Crypt_(C)#Support_in_operating_systems , only the schemes DES, MD5, SHA-256 and SHA-512 are supported. I'll add the feature shortly if I can. |
FYI, here is an implementation in a single C file: https://github.com/rfc1036/whois/blob/next/mkpasswd.c |
@nlgranger , I've pushed in the master branch the CRYPT hash for passwords in the LDAP modules. Can you test this new feature and send feedbacks if required? |
Is your feature request related to a problem? Please describe.
Built-in LDAP password hashing scheme are weak by nowadays standards.
Describe the solution you'd like
Add support for CRYPT hashing scheme, it requires adding an extra form entry for the salt format.
Describe alternatives you've considered
Read-only access limits works around password manipulation all-together but limits available functionalities.
Additional context
https://www.redpill-linpro.com/techblog/2016/08/16/ldap-password-hash.html
The text was updated successfully, but these errors were encountered: