-
Notifications
You must be signed in to change notification settings - Fork 38
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-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) supports #57
Comments
I don't have any plans to implement this myself, but I would gladly review a patch that adds this support. |
@jparise: 11 months after, have you looked? I have added drafts "Channel Bindings for SCRAM over TLS 1.3 / SCRAM-SHA-512(-PLUS) / SCRAM-SHA3-512(-PLUS) / 2FA" and added details of Cyrus SASL / Dovecot SASL / GNU SASL. Thanks a lot in advance. |
As I said earlier, I'd be glad to review a Pull Request that adds support for these new algorithms. |
@Neustradamus I have developed a first draft of SCRAM support, but i have to test it first before i can create a pull request. Do you have a docker container within a SMTP server wich supports any or all kinds of SCRAM? |
indimail has docker images at https://hub.docker.com/r/cprogrammer/indimail. Some documentation is here. The steps would be to
You can reach out to me privately if you need any help in setting up accounts using indimail docker. gsasl also has a tiny smtp server in the examples directory. One can compile it and do a basic test. AFAIK, The gsasl utility too can act as a server using the --server option. But I have never tried those option. But I have used the client options to test SCRAM auth methods against indimail server. |
@schengawegga: Have you seen the @mbhangui comment? |
@Neustradamus @mbhangui |
@mbhangui now i tried about 4 hours to run and configure indimail to test my developement, but it won´t work on my own. |
Which image did you use? Sure I can give a full configured indimail server with .vbox image, but that could take me a day or two. |
So I tried this and it worked. You can repeat the steps exactly as below
Any issue let me know. You can replace podman with docker command. The syntax is the same for both. I prefer podman because it runs without needing a daemon running as root. The response to the gsasl command will be like this and in the end you should get
|
@mbhangui Thanks for your manual.
Maybe can you please provide a vbox image to me? |
Not sure why you are getting error with docker. This is cut-paste of what I tried just now with docker. I will try make a vbox image tonight
|
No i´m sorry.
Or this error:
Although i entered the needed credentials via:
and
Maybe i do not have the needed permissions? |
This error is expected because redhat.io doesn't have the image. Only ghcr.io and docker.io has the images
This indicates that you have not signed into the docker repository or the sign-in wasn't successful. Login to docker
Also you can add ghcr.io to /etc/containers/registries.conf. This is my registries.conf
Then pull the image from the docker registory
|
Login works
Pulling works
Step 3 works not
|
The error is because of error in step 3. Either you have to use docker throughout or you have to use podman throughout. As in
In step 3 replace podman with docker. i.e.
|
i found the problem. |
Install Once you have created a user on the container, you can connect and test authentication like this. You can create two users. One with SCRAM-SHA-256 and the other with SCRAM-SHA-1. And then for each mechanism, you have two methods (the non-plus variant where you don't do channel binding and the PLUS variant where you do channel binding).
|
@mbhangui Thanks for your support. The pull request for adding SCRAM support is already done. Next steps will be adding SCRAM-PLUS support. For this, the PEAR/Auth_SASL Class must support channel binding. I will try to do a pull request there. But a first question to you. Do your container |
Yes it does support channel binding (SCRAM-SHA1-PLUS and SCRAM-SHA256-PLUS) but not SCRAM-SHA512-PLUS |
Additionally you will need to create users which support channel binding
|
@mbhangui Thanks for the example. I will try this soon. |
@mbhangui can you send me the |
@mbhangui: Have you seen the last @schengawegga comment? |
Totally slipped my mind that I have to reply. Here is the command. You just have to use -C option and it will support all CRAM methods. The -C option can be used with SCRAM methods too. However, the default setting of SMTP service in indimail doesn't support CRAM because of the danger of storing clear text passwords in the database. If someone steals the database, the person will walk away happily with un-encrypted passwords. To enable CRAM in SMTP a one time setting of ENABLE_CRAM variable is required, which is given below
There is a detailed topic on setting up authenticated smtp mechanisms in indimail here. But feel free to post any doubts/clarification here itself |
Thanks for reminding me. It had totally slipped my mind as I was busy planning a vacation. I have updated the above post with few things that I had missed out |
…M-SHA-512 support (#76) * SCRAM-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) supports #57 * Update README.rst * Sort authentication methods alphabetical and mark CRAM-MD5 and DIGEST-MD5 as DEPRECATED * Mark LOGIN and PLAIN as DEPRECATED * Mark CRAM-MD5, DIGEST-MD5, LOGIN and PLAIN as DEPRECATED in Sourcecode * Trigger deprecation warning for CRAM-MD5, DIGEST-MD5, LOGIN and PLAIN in error-log * Split lines for deprecation warnings * SCRAM-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) supports #57 * Remove deprecation warning for PLAIN authentication method
@mbhangui Do indimail support XOAuth and OAuthbearer? And how do i configure this methods? Thanks you :-) |
On Tue, 9 Jan 2024 at 04:44, Armin Graefe ***@***.***> wrote:
@mbhangui <https://github.com/mbhangui> Do indimail support XOAuth and
OAuthbearer? And how do i configure this methods? Thanks you :-)
No. None of these two are supported ATM.
|
Can you add the SCRAM supports?
For example Rouncube has needed: roundcube/roundcubemail#6917
Cyrus SASL supports:
-> https://cyrusimap.org/sasl/sasl/authentication_mechanisms.html
-> https://github.com/cyrusimap/cyrus-sasl/commits/master
Dovecot SASL supports:
-> https://doc.dovecot.org/configuration_manual/authentication/password_schemes/
GNU SASL supports:
-> http://www.gnu.org/software/gsasl/
"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".
SCRAM-SHA-1(-PLUS):
-- https://tools.ietf.org/html/rfc5802
-- https://tools.ietf.org/html/rfc6120
SCRAM-SHA-256(-PLUS):
-- https://tools.ietf.org/html/rfc7677 since 2015-11-02
-- https://tools.ietf.org/html/rfc8600 since 2019-06-21: https://mailarchive.ietf.org/arch/msg/ietf-announce/suJMmeMhuAOmGn_PJYgX5Vm8lNA
SCRAM-SHA-512(-PLUS):
-- https://tools.ietf.org/html/draft-melnikov-scram-sha-512
SCRAM-SHA3-512(-PLUS):
-- https://tools.ietf.org/html/draft-melnikov-scram-sha3-512
SCRAM BIS: Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms:
-- https://tools.ietf.org/html/draft-melnikov-scram-bis
https://xmpp.org/extensions/inbox/hash-recommendations.html
-PLUS variants:
IMAP:
LDAP:
HTTP:
2FA:
IANA:
Linked to:
The text was updated successfully, but these errors were encountered: