Skip to content

Commit

Permalink
updated versions of dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrandes committed Mar 9, 2022
1 parent 4caa3b9 commit b447ff5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 45 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SFTP Server (SSH File Transfer Protocol) based on `Apache MINA SSHD`. Open Source Java project under Apache License v2.0

### Current Stable Version is [1.3.5](https://maven-release.s3.amazonaws.com/release/org/javastack/sftpserver/1.3.5/sftpserver-1.3.5-bin.zip)
### Current Stable Version is [1.4.0](https://maven-release.s3.amazonaws.com/release/org/javastack/sftpserver/1.4.0/sftpserver-1.4.0-bin.zip)

---

Expand All @@ -14,6 +14,7 @@ SFTP Server (SSH File Transfer Protocol) based on `Apache MINA SSHD`. Open Sourc
| 1.1.x | 1.6+ |
| 1.2.x | 1.7+ |
| 1.3.x | 1.8+ |
| 1.4.x | 1.8+ |

## Config:

Expand Down Expand Up @@ -128,14 +129,14 @@ Maven Dependencies:

* commons-codec-`XXX`.jar

[Log4J (logging)](http://logging.apache.org/log4j/1.2/)
[Log4J/Reload4J (logging)](https://reload4j.qos.ch/manual.html)

* log4j-`XXX`.jar
* reload4j-`XXX`.jar

[SLF4J (logging)](http://www.slf4j.org/)

* slf4j-api-`XXX`.jar
* slf4j-log4j12-`XXX`.jar
* slf4j-reload4j-`XXX`.jar

[Bouncy Castle (encryption)](http://www.bouncycastle.org/java.html)

Expand Down
63 changes: 39 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

<groupId>org.javastack</groupId>
<artifactId>sftpserver</artifactId>
<version>1.3.5</version>
<version>1.4.0</version>
<description>SFTP Server (SSH File Transfer Protocol)</description>

<name>${project.groupId}:${project.artifactId}</name>
<url>https://github.com/ggrandes/${project.artifactId}</url>
<url>https://github.com/ggrandes/sftpserver</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
Expand All @@ -32,69 +32,78 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<slf4j.version>1.7.36</slf4j.version>
<mina.version>2.1.6</mina.version>
<sshd.version>2.8.0</sshd.version>
<commons-codec.version>1.15</commons-codec.version>
<bc.version>1.70</bc.version>
<eddsa.version>0.3.0</eddsa.version>
<jzlib.version>1.1.3</jzlib.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.1.3</version>
<version>${mina.version}</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>2.5.0</version>
<version>${sshd.version}</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-sftp</artifactId>
<version>2.5.0</version>
<version>${sshd.version}</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-scp</artifactId>
<version>2.5.0</version>
<version>${sshd.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.14</version>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.65.01</version>
<version>${bc.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.65</version>
<version>${bc.version}</version>
</dependency>
<dependency>
<!-- For ed25519 support -->
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<version>0.3.0</version>
<version>${eddsa.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<!-- Log4j 1.2 replacement -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.30</version>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jzlib</artifactId>
<version>1.1.3</version>
<version>${jzlib.version}</version>
</dependency>
</dependencies>

Expand All @@ -103,22 +112,28 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!-- Package Classes to JAR to upload to repo -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<version>3.2.2</version>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<forceCreation>true</forceCreation>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Built-By>maven</Built-By>
<Implementation-Vendor>${project.groupId}</Implementation-Vendor>
<Implementation-Title>${project.groupId}:${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</archive>
<excludes>
Expand All @@ -133,7 +148,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.2.1</version>
<executions>
<execution>
<goals>
Expand All @@ -157,9 +172,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<version>3.3.0</version>
<configuration>
<descriptor>assembly/package.xml</descriptor>
<descriptors>assembly/package.xml</descriptors>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
<executions>
Expand Down
28 changes: 13 additions & 15 deletions src/main/java/org/javastack/sftpserver/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.apache.sshd.common.NamedFactory;
import org.apache.sshd.common.NamedResource;
import org.apache.sshd.common.PropertyResolver;
import org.apache.sshd.common.PropertyResolverUtils;
import org.apache.sshd.common.cipher.BuiltinCiphers;
import org.apache.sshd.common.compression.BuiltinCompressions;
import org.apache.sshd.common.compression.Compression;
Expand All @@ -54,10 +53,11 @@
import org.apache.sshd.common.session.SessionContext;
import org.apache.sshd.common.session.SessionHeartbeatController.HeartbeatType;
import org.apache.sshd.common.util.security.SecurityUtils;
import org.apache.sshd.core.CoreModuleProperties;
import org.apache.sshd.scp.server.ScpCommandFactory;
import org.apache.sshd.server.Environment;
import org.apache.sshd.server.ExitCallback;
import org.apache.sshd.server.ServerBuilder;
import org.apache.sshd.server.ServerFactoryManager;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.auth.password.PasswordAuthenticator;
import org.apache.sshd.server.auth.pubkey.CachingPublicKeyAuthenticator;
Expand All @@ -68,12 +68,11 @@
import org.apache.sshd.server.kex.Moduli;
import org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider;
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
import org.apache.sshd.server.scp.ScpCommandFactory;
import org.apache.sshd.server.session.ServerSession;
import org.apache.sshd.server.shell.ShellFactory;
import org.apache.sshd.server.subsystem.sftp.SftpFileSystemAccessor;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemProxy;
import org.apache.sshd.sftp.server.SftpFileSystemAccessor;
import org.apache.sshd.sftp.server.SftpSubsystemFactory;
import org.apache.sshd.sftp.server.SftpSubsystemProxy;
import org.javastack.sftpserver.readonly.ReadOnlyRootedFileSystemProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -243,7 +242,7 @@ private void closeQuietly(final Closeable c) {
}

private void hackVersion() {
PropertyResolverUtils.updateProperty(sshd, ServerFactoryManager.SERVER_IDENTIFICATION, "SSHD");
CoreModuleProperties.SERVER_IDENTIFICATION.set(sshd, "SSHD");
}

/**
Expand Down Expand Up @@ -290,8 +289,7 @@ private void hackModuliDHGEX() {
}
if ((newModuli != null) && newModuli.canRead() && (newModuli.length() > 0)) {
LOG.warn("Using moduli file: " + newModuli);
PropertyResolverUtils.updateProperty(sshd, ServerFactoryManager.MODULI_URL,
newModuli.toURI().toString());
CoreModuleProperties.MODULI_URL.set(sshd, newModuli.toURI().toString());
}
}
}
Expand Down Expand Up @@ -706,38 +704,38 @@ public void destroy(final ChannelSession channel) {

static class CustomSftpFileSystemAccessor implements SftpFileSystemAccessor {
@Override
public void setFileAttribute(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file,
public void setFileAttribute(final SftpSubsystemProxy subsystem, final Path file,
final String view, final String attribute, final Object value, final LinkOption... options)
throws IOException {
throw new UnsupportedOperationException("Attribute set not supported for " + file);
}

@Override
public void setFileOwner(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file,
public void setFileOwner(final SftpSubsystemProxy subsystem, final Path file,
final Principal value, final LinkOption... options) throws IOException {
throw new UnsupportedOperationException("Owner set not supported for " + file);
}

@Override
public void setGroupOwner(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file,
public void setGroupOwner(final SftpSubsystemProxy subsystem, final Path file,
final Principal value, final LinkOption... options) throws IOException {
throw new UnsupportedOperationException("Group set not supported");
}

@Override
public void setFilePermissions(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file,
public void setFilePermissions(final SftpSubsystemProxy subsystem, final Path file,
final Set<PosixFilePermission> perms, final LinkOption... options) throws IOException {
throw new UnsupportedOperationException("Permissions set not supported");
}

@Override
public void setFileAccessControl(final ServerSession session, final SftpSubsystemProxy subsystem,
public void setFileAccessControl(final SftpSubsystemProxy subsystem,
final Path file, final List<AclEntry> acl, final LinkOption... options) throws IOException {
throw new UnsupportedOperationException("ACL set not supported");
}

@Override
public void createLink(final ServerSession session, final SftpSubsystemProxy subsystem, final Path link,
public void createLink(final SftpSubsystemProxy subsystem, final Path link,
final Path existing, final boolean symLink) throws IOException {
throw new UnsupportedOperationException("Link not supported");
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/javastack/sftpserver/ServiceLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import org.apache.sshd.common.session.SessionListener;
import org.apache.sshd.common.util.logging.AbstractLoggingBean;
import org.apache.sshd.server.session.ServerSession;
import org.apache.sshd.server.subsystem.sftp.Handle;
import org.apache.sshd.server.subsystem.sftp.SftpEventListener;
import org.apache.sshd.sftp.server.Handle;
import org.apache.sshd.sftp.server.SftpEventListener;
import org.slf4j.event.Level;

public class ServiceLogger extends AbstractLoggingBean implements SftpEventListener, SessionListener {
Expand Down

0 comments on commit b447ff5

Please sign in to comment.