-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔒 SASL DIGEST-MD5: realm, host, service_name, etc
Yes, DIGEST-MD5 is deprecated! But that also means that it was lower risk for experimenting with other SASL changes. It's complexity vs most other mechanisms makes it a good test-bed for the completeness of net-imap's SASL implementation: e.g: it demonstrated that we were missing features such as `done?`, demonstrates the utility of using callbacks for attributes such as `realm` (the user might select from a server-provided list), it shows that `service` cannot be hard-coded to `imap` and must be provided by the client, and requires other attributes that should be provided by the client such as `host`, `port` (also used by `OAUTHBEARER`). I improved the existing authenticator in several ways: * ✨ User can configure `realm`, `host`, `service_name`, `service`. This allows a correct "digest-uri" for non-IMAP clients. * 🔒 Use SecureRandom for cnonce (not Time.now + insecure PRNG!) * ✨ Default `qop=auth` (as in RFC) * ✨ Enforce requirements for `sparam` keys (required and no-multiples). * ♻️ Refactor toward the style used in the new ScramAuthenticator. However... it's still deprecated, so don't use it! 🙃
- Loading branch information
Showing
2 changed files
with
322 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.