Skip to content

Do not load deprecated SASL mechanisms by default - #58

Closed
nevans wants to merge 1 commit into
masterfrom
deprecated-SASL-mechanisms
Closed

Do not load deprecated SASL mechanisms by default#58
nevans wants to merge 1 commit into
masterfrom
deprecated-SASL-mechanisms

Conversation

@nevans

Copy link
Copy Markdown
Collaborator

n.b. the mechanisms haven't been removed. They just aren't loaded by
default. ClosesGH-55.

By making these optional, there's no reason to require the digest or
strscan gems anymore. ClosesGH-56.

n.b. the mechanisms haven't been removed. They just aren't loaded by
default. ClosesGH-55.
By making these optional, there's no reason to require the `digest` or
`strscan` gems anymore. ClosesGH-56.
@nevans

Copy link
Copy Markdown
CollaboratorAuthor

The list of non-deprecated SASL mechanisms is down to only PLAIN! I'lt try to tidy up my XOAUTH2 and OAUTHBEARER PR this week.

@nevansnevans mentioned this pull request Feb 22, 2022
Comment threadnet-imap.gemspec
Comment on lines +35 to +36
spec.add_development_dependency "digest"
spec.add_development_dependency "strscan"

@eregoneregonFeb 24, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure how gem dev deps are treated by Bundler, but I guess they are ignored if e.g. a app Gemfile depends on mail or net-imap?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are ignored with bundle install by default.

@nevans

Copy link
Copy Markdown
CollaboratorAuthor

👍 I've been sitting on code for a couple of new SASL mechanisms, and a bugfix for "DIGEST-MD5" (when frozen_string_literal: true is being used). I'll try and finish up the PRs for all of that today. It would be a shame if the only "good" mechanism is "PLAIN"! 🙂

nevans added a commit to nevans/net-imap that referenced this pull request Jul 16, 2022
Mark obolete SASL mechanisms as deprecated (fixesrubyGH-55):
* Warn every time a deprecated mechanism is used.
* Warnings can be disabled with `warn_deprecation: false`
* delay loading stdgem dependencies until `#initialize`. FixesrubyGH-56.
* This is a backwards-compatible alternative to the approach in rubyGH-58
(don't require and add the deprecated authenticators automatically).
We can use that incompatible approach in a later version.
Additionally:
* Adds basic tests for every authenticator (to avoid another rubyGH-52!)
* Fixes a frozen string bug in DigestMD5Authenticator.
* By making these optional, there's no reason to require the `digest` or
`strscan` gems anymore; fixesrubyGH-56.
The DIGEST-MD5 bug was originally reported, tested, and fixed by
@singpolyma here: nevans/net-sasl#3.
Co-authored-by: Stephen Paul Weber <singpolyma@singpolyma.net>
nevans added a commit that referenced this pull request Jul 16, 2022
Mark obolete SASL mechanisms as deprecated (fixesGH-55):
* This is a backwards-compatible alternative to the approach in GH-58
(don't require and add the deprecated authenticators automatically).
We can use that incompatible approach in a later version.
* Warn every time a deprecated mechanism is used.
* Warnings can be disabled with `warn_deprecation: false`
* delay loading stdgem dependencies until `#initialize`. FixesGH-56.
Additionally:
* Adds basic tests for every authenticator (to avoid another GH-52!)
* Fixes a frozen string bug in DigestMD5Authenticator.
* By making these optional, there's no reason to require the `digest` or
`strscan` gems anymore; fixesGH-56.
The DIGEST-MD5 bug was originally reported, tested, and fixed by
@singpolyma here: nevans/net-sasl#3.
Co-authored-by: Stephen Paul Weber <singpolyma@singpolyma.net>
nevans added a commit that referenced this pull request Jul 16, 2022
Mark obolete SASL mechanisms as deprecated (fixesGH-55):
* This is a backwards-compatible alternative to the approach in GH-58
(don't require and add the deprecated authenticators automatically).
We can use that incompatible approach in a later version.
* Warn every time a deprecated mechanism is used.
* Warnings can be disabled with `warn_deprecation: false`
* FixesGH-56: delay loading standard gem dependencies until
`#initialize`, and convert the gems to development dependencies.
Additionally:
* Adds basic tests for every authenticator (to avoid another GH-52!)
* Fixes a frozen string bug in DigestMD5Authenticator.
* Fixes constant resolution for exceptions in DigestMD5Authenticator.
* Can register an authenticator type that responds to #call (instead of
#new). I was originally going to register deprecated authenticators
with a Proc that required the file and issued a warning, but I decided
to put everything into the initializer instead. `#authenticator`
needed to be updated to safely delegate all args, and I left this in.
The DIGEST-MD5 bug was originally reported, tested, and fixed by
@singpolyma here: nevans/net-sasl#3.
Co-authored-by: Stephen Paul Weber <singpolyma@singpolyma.net>
@nevans

Copy link
Copy Markdown
CollaboratorAuthor

I remembered why I hadn't pushed a PR for that other SASL code yet. My refactorings went a little bit further than I wanted for a ticket like this, and I wasn't quite done yet! But I might have that one ready for review soon, too.

At any rate, that branch reminded me that I wanted to try a different backward-compatible approach. That approach and the DIGEST-MD5 bugfixes are here:

If you think that approach is okay, let's close this ticket and merge that one instead.

@hsbt

hsbt commented Sep 28, 2022

Copy link
Copy Markdown
Member

@nevans Sorry to late response. #62 is looks good. I'll close this.

@hsbthsbt closed this Sep 28, 2022
@hsbt
hsbt deleted the deprecated-SASL-mechanisms branch September 28, 2022 08:15
@nevansnevans added the SASL 🔒 Authentication and authentication mechanisms label Feb 12, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SASL 🔒Authentication and authentication mechanisms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC6331: Moving DIGEST-MD5 to Historic

3 participants

@nevans@hsbt@eregon