Skip to content
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

Filter out SHA-1 key exchanges and MD5/truncated SHA-1 MACs #35

Merged
merged 4 commits into from
Oct 12, 2020

Conversation

daniel-beck
Copy link
Member

By default, exclude SHA1 based key exchanges. Allow customizing which to exclude, and add logging to understand exactly what happens during filtering.

Exclusion of SHA1 based key exchanges has been implemented in newer versions of Mina according to https://github.com/apache/mina-sshd#implementedavailable-support but upgrading Mina seems like a bigger project (#33). So choose this approach instead.

If this looks like a reasonable approach, we probably want to disable hmac-md5, hmac-md5-96, and hmac-sha1-96 in a similar manner. They are also no longer available by default in Mina 2 (https://issues.apache.org/jira/browse/SSHD-1004).

@daniel-beck daniel-beck requested a review from jvz September 18, 2020 11:40
@oleg-nenashev oleg-nenashev requested a review from a team September 18, 2020 13:03
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Looks good in principle, needs to be documented somewhere.

@daniel-beck please also request reviews from all core maintainers, not just me. I am quite loaded with other tasks, and I do not commit to provide timely reviews

Copy link
Member

@jtnord jtnord left a comment

Choose a reason for hiding this comment

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

code looks OK to me, only comment is that we enabled ciphers, yet disable key-exchange - which seems inconsistent, but 🤷

@daniel-beck
Copy link
Member Author

code looks OK to me, only comment is that we enabled ciphers, yet disable key-exchange - which seems inconsistent, but 🤷

Right, but that entire mechanism seems unfinished, and is only private (package-private for test) with no way for the outside to control it, so I didn't feel like letting myself be influenced too much by it.

@jglick
Copy link
Member

jglick commented Sep 18, 2020

upgrading Mina seems like a bigger project

Seems fine to do this as a temporary expedient; just leave in TODO comments reminding us to delete the obsolete code when sshd is converted to a plugin and given an upgrade.

@daniel-beck
Copy link
Member Author

just leave in TODO comments reminding us to delete the obsolete code when sshd is converted to a plugin and given an upgrade.

This option wouldn't be the worst thing to leave in even then IMO. We'd need to commit to track Mina closely for us to likely not need something like this again.

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Sep 18, 2020 via email

@jglick
Copy link
Member

jglick commented Sep 18, 2020

We'd need to commit to track Mina closely

Dependabot!

@jvz
Copy link
Member

jvz commented Sep 18, 2020

I follow Mina development nowadays ever since I contributed a few random things earlier this year (including the security report that raised that linked Jira ticket). Based on that, depending on which APIs you're using, upgrading between minor versions sometimes requires code updates (nothing too serious unless you're highly customizing things).


== Changelog

See link:CHANGELOG.md[CHANGELOG.md].
Copy link
Member

Choose a reason for hiding this comment

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

move to Release Drafter

Copy link
Member Author

Choose a reason for hiding this comment

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

Way out of scope. The changelog file currently exists and GH releases are unused. I'm only adding this file because of #35 (comment)

Copy link
Contributor

@Wadeck Wadeck left a comment

Choose a reason for hiding this comment

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

Code looks fine, not tested

@daniel-beck daniel-beck changed the title Filter out SHA1 key exchanges Filter out SHA-1 key exchanges and MD5/truncated SHA-1 MACs Sep 24, 2020
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @daniel-beck !

@daniel-beck daniel-beck merged commit 35d5a75 into jenkinsci:master Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants