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

Switch to a recent version of a supported Jsch fork #711

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

mc1arke
Copy link
Contributor

@mc1arke mc1arke commented Feb 11, 2024

The version of JSch bundled in the plugin has not been maintained in a few years so has not kept up-to-date with newer cryptographic keys, ciphers, and signatures. This causes challenges for users attempting to use Git with configuration using up-to-date cryptographic recommendations, as the library only supports SHA1 signatures for RSA which distributions like OpenSSH have stopped supporting.

The JSch implementation has been switched to an actively maintained fork and an up-to-date version of BouncyCastle included in the dependencies to ensure elliptic curves and recent cipher suites. The existing RemoteRejectionTest has been altered to use public key authentication and an up-to-date container running a recent version of OpenSSH to allow realistic connectivity testing of remote Git over SSH connections.

As the Jsch distribution is a multi-version JAR including Java 16 class files, the plugin has had to be updated to Gradle 7 as the ASM version used in Gradle 6 is not compatible with Java 16 classes.

The version of JSch bundled in the plugin has not been maintained in a
few years so has not kept up-to-date with newer cryptographic keys,
ciphers, and signatures. This causes challenges for users attempting to
use Git with configuration using up-to-date cryptographic
recommendations, as the library only supports SHA1 signatures for RSA
which distributions like OpenSSH have stopped supporting.

The JSch implementation has been switched to an actively maintained fork
and an up-to-date version of BouncyCastle included in the dependencies
to ensure elliptic curves and recent cipher suites are available. The
existing RemoteRejectionTest has been altered to use public key
authentication and an up-to-date container running a recent version of
OpenSSH to allow realistic connectivity testing of remote Git over SSH
connections.

As the Jsch distribution is a multi-version JAR including Java 16 class
files, the plugin has had to be updated to Gradle 7 as the ASM version
used in Gradle 6 is not compatible with Java 16 classes.
@mc1arke
Copy link
Contributor Author

mc1arke commented Feb 14, 2024

This should fix #633

@bgalek
Copy link
Member

bgalek commented Feb 14, 2024

Hi, thank you for this contribution!
I'll check it out

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (7851af2) 61.00% compared to head (63ba6ac) 62.70%.
Report is 3 commits behind head on main.

Files Patch % Lines
...ructure/git/SshAgentIdentityRepositoryFactory.java 0.00% 35 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #711      +/-   ##
============================================
+ Coverage     61.00%   62.70%   +1.70%     
  Complexity      398      398              
============================================
  Files            81       81              
  Lines          1554     1515      -39     
  Branches        147      144       -3     
============================================
+ Hits            948      950       +2     
+ Misses          535      498      -37     
+ Partials         71       67       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bgalek
Copy link
Member

bgalek commented Feb 15, 2024

@mc1arke hi! I like the change, I'll merge this, test it out and release new minor version!

@bgalek bgalek merged commit 4ad4309 into allegro:main Feb 15, 2024
2 of 3 checks passed
@bgalek
Copy link
Member

bgalek commented Feb 15, 2024

@mc1arke released, thx!

@mc1arke mc1arke deleted the jsch-update branch February 15, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants