-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCRAM - support for using Hashed and salted passwords #863
Comments
For the SCRAM Plugin you can set the options "scram_secret_generate=y" to force storing hashed passwords in the SASL database. You can also use the option "scram_iteration_counter=10000" to increase calculation time of the hashes. Strange, I just see this response is four years too late ... Is this project still alive? |
Hello. I have the same question. I want to allow only SCRAM authentication in my application and avoid storing plain text passwords in the sasldb file. Can I use the following command? saslpasswd2 -f my.sasldb -a myapp -n --scram_secret_generate=y -c user001 |
To change options in a server or utils you have to implement a Here is one example among others: Line 473 in ed79de0
Just add a line to your server/tools option function like:
|
It was very helpful to see specific examples. Lines 239 to 253 in ed79de0
{
if (sasldb_path && !strcmp(option, "sasldb_path")) {
*result = sasldb_path;
if (len)
*len = (unsigned) strlen(sasldb_path);
return SASL_OK;
+ } else if (!strcmp(option, "scram_secret_generate")) {
+ *result = "y";
+ if (len)
+ *len = (unsigned)strlen(*result);
+ return SASL_OK;
}
return SASL_FAIL;
} I modified the saslpasswd2 -f myapp.sasldb -a myapp -c user01
# Password: 1234
saslpasswd2 -f myapp.sasldb -a myapp -c -n user02
# Password: 5678
Now I can use
Lines 1650 to 1655 in ed79de0
Are there any other guides for using |
Your server should not offer all SCRAM-SHA-* variants. E.g. SCRAM-SHA-512 is not an approved standard yet. If you start from scratch, you could use SCRAM-SHA-256(-PLUS) and limit your offered mechanims e.g. with the option: This way your saslpasswd2 will create the entries for SCRAM-SHA-256 |
Good to see that more and more people use SCRAM SASL! Note: About SCRAM-SHA-512(-PLUS) is not yet official but a lot of projects always use: Linked to: |
Hi all,
Reading the documentation of this project it seems to imply that SCRAM needs cleartext passwords in order to work. https://github.com/cyrusimap/cyrus-sasl/blob/master/docsrc/sasl/faqs/plaintextpasswords.rst
However I don't think this is true, as some reference implementations I've seen do store the hash, salt and iterations on the backend instead of the cleartext password.
If storing an hashed password currently is not supported, what could we do to support it?
The text was updated successfully, but these errors were encountered: