Argon2 is a password hashing algorithm that was selected as the winner of the Password Hashing Competition in July 2015. It is a secure and efficient algorithm that is resistant to brute-force attacks.
I am currently using OpenLdap v2.5 packaged as bitnami/openldap image to store user information, including passwords. I would like to implement Argon2 to hash passwords so that I can help to protect them from being compromised.
Specifically, I need to know:
- How to install the argon2 module on OpenLdap ?
- How to configure OpenLdap to use Argon2 for password hashing ?
- How to test my configuration to make sure that it is working correctly ?
To implement Argon2 Hash on OpenLDAP, you can do the following steps:
1 - Add Argon2 as OpenLdap hash module & allowed method
Modify LDAP config in order to load Argon2
with modules.ldif:
2 - Create/Modify userpassword with Argon2
Generate a hashed password with Argon2 module
It should return something like :
{ARGON2}$argon2i$v=19$m=4096,t=3,p=1$G+lDOYm0ra9Gl/e/gZ+FZw$HlePGPXj2ghUZfznIvKvzgRZaEXm0/4YVWttmztakgMThen, modify an existing user password:
with
changeUserPassword.ldif:3 - Verify user authentication
Now, verify that the user can be authenticated with his new hashed password:
If ìt is ok, it should return the DN :
dn:cn=JohnDoe,,ou=users,dc=example,dc=comI hope this helps! Let me know if you have any other questions.