You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
passlib was introduced in #2918, on the basis that it would give us "future proof and easily migrateable password management should we change password hashing algorithms/parameters."
Unfortunately passlib looks unmaintained (no commits in 2 years and the upstream issue tracker has literal spam tickets sitting for weeks). We're also not using any of the migration functionality, we're just invoking argon2 hashing directly:
I don't think the migration functionality is worth the ~20k lines of Python passlib brings in (counted by tokei, minus tests). If we need migration, we'd probably implement it with something like:
argon2-cffi handles migrations pretty well. First it reads the algorithm out of the generated hash, so we don't need any special handling for argon2i vs argon2id. Then it has a check_needs_rehash(hash) function which checks for type and any other parameters (like iterations, etc.) being out of sync and recommending a rehash if so. So going forward, if we want, we can increase the strength of the hashes pretty transparently.
Unfortunately passlib appears unmaintained with no commits in the past 2
years and literal spam tickets in their issue tracker. It brings in ~20k
lines of code (per tokei), but we only need the argon2 functionality
that is in argon2-cffi already.
Using argon2-cffi directly is roughly the same, with just a few renames
(e.g. rounds → time_cost) and different method signatures (verify()
throws an exception instead of returning false).
We explicitly specify a type=argon2i, in the next commit we'll switch
over to argon2id.
Fixes#6631.
passlib was introduced in #2918, on the basis that it would give us "future proof and easily migrateable password management should we change password hashing algorithms/parameters."
Unfortunately passlib looks unmaintained (no commits in 2 years and the upstream issue tracker has literal spam tickets sitting for weeks). We're also not using any of the migration functionality, we're just invoking argon2 hashing directly:
I don't think the migration functionality is worth the ~20k lines of Python passlib brings in (counted by tokei, minus tests). If we need migration, we'd probably implement it with something like:
So my preference would be to drop passlib and use argon2-cffi directly.
The text was updated successfully, but these errors were encountered: