-
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. Its complexity vs most other mechanisms made it a good test-bed for the completeness of net-imap's SASL implementation. For example: * It demonstrated that we were missing features such as `done?`. * It demonstrates the utility of using callbacks for attributes such as `realm` (the user might select from a server-provided list). _Please note: the initial work I did to support attribute callbacks was reverted, to simplify the big SASL re-write. It could still be a useful feature for this and other mechanisms._ * It shows that `service` should not be hard-coded to `imap`, and should be provided by the client (or the protocol adapter). _Please note: Although the current (experimental) client adapters _do_ have a `#service` method, it is not used by the (experimental) AuthenticationExchange yet._ * It 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: * ✨ Add `realm`, `host`, `service_name`, `service` attributes. This allows non-IMAP clients to construct the correct `digest-uri`. * 🔒 Use SecureRandom for cnonce (not Time.now + insecure PRNG!) * ✨ Default `qop=auth` (as in RFC) * ✨ Enforce requirements for `sparam` keys (required and no-multiples). * ♻️ Various other minor refactorings. However... it's still deprecated, so don't use if you don't need to! 🙃
- Loading branch information
Showing
2 changed files
with
284 additions
and
54 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.