Closed nickretallack closed 10 years ago
That salt is for the HMAC signature, not for use with bcrypt. Passlib, the library used for hashing passwords, supplies a random salt for each password when using bcrypt.
What's the HMAC signature for?
The error I get is literally RuntimeError: The configuration value
SECURITY_PASSWORD_SALT must not be None when the value of
SECURITY_PASSWORD_HASHis set to "bcrypt"
It's raised here. I guess you're salting and hashing the password manually before you even hand it to bcrypt?
HMAC is applied for an extra layer of encryption in addition to bcrypt. Its certainly arguable if its necessary or not necessary. I chose to use this approach to get the "best of both worlds".
I set
SECURITY_PASSWORD_HASH = 'bcrypt'
and then it complained that I didn't setSECURITY_PASSWORD_SALT
. Bcrypt should generate its own salt for each password. Why does FlaskSecurity ask me to specify a salt?