-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-3572: Migrate SFTP from jsch
to sshd-sftp
#3892
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
Conversation
This is huge breaking change for SFTP module, but it is still justified with today's trends. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor doc change and a question/comment.
this.comparator = comparator; | ||
@SuppressWarnings("unchecked") | ||
public void setComparator(@Nullable Comparator<? extends F> comparator) { | ||
this.comparator = (Comparator<F>) comparator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not change the field (and FileUtils
) too? (Instead of casting here).
@@ -10,6 +10,12 @@ The SFTP protocol requires a secure channel, such as SSH, and visibility to a cl | |||
Spring Integration supports sending and receiving files over SFTP by providing three client side endpoints: inbound channel adapter, outbound channel adapter, and outbound gateway. | |||
It also provides convenient namespace configuration to define these client components. | |||
|
|||
NOTE: Starting with version 6.0, an outdated JCraft JSch client has been replaced with modern https://mina.apache.org/sshd-project/index.html[Apache MINA SSHD] framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: Starting with version 6.0, an outdated JCraft JSch client has been replaced with modern https://mina.apache.org/sshd-project/index.html[Apache MINA SSHD] framework. | |
NOTE: Starting with version 6.0, the outdated JCraft JSch client has been replaced with the https://mina.apache.org/sshd-project/index.html[Apache MINA SSHD] framework. |
Please rebase to address what's new conflct. |
Fixes spring-projects#3572 * Rework SFTP module from the JSch API to more modern `sshd-sftp` * Migrate generics of most API from `ChannelSftp.LsEntry` to the `SftpClient.DirEntry` * Rework `DefaultSftpSessionFactory` to deal with an `SshClient` and create `SftpClient` wrapped to the `SftpSession` * Implement a `ResourceKnownHostsServerKeyVerifier` to load `known-hosts` from any possible resource * Implement an expected `SftpSession.list()` with just file name to take or pattern matching * Remove some unused tests and their config * Remove tests for custom `UserInfo` since we don't provide any custom out-of-the-box * Test a new `ResourceKnownHostsServerKeyVerifier` against default `known-hosts` file
Fixes #3572
sshd-sftp
ChannelSftp.LsEntry
to theSftpClient.DirEntry
DefaultSftpSessionFactory
to deal with anSshClient
and createSftpClient
wrapped to theSftpSession
ResourceKnownHostsServerKeyVerifier
to loadknown-hosts
from any possible resourceSftpSession.list()
with just file name to take or pattern matchingUserInfo
since we don't provide any custom out-of-the-boxResourceKnownHostsServerKeyVerifier
against defaultknown-hosts
file