Use it to configure any custom parameters the server may require, such as explicit or implicit data transfer encryption. FTP • Alpakka Documentation
The FTPSClient has a isImpicit flag internally but it’s final.
In the example, I can only modify an already created FTPSClient.
FtpsSettings.create(InetAddress.getByName(HOSTNAME))
.withPort(PORT)
.withCredentials(CREDENTIALS)
.withBinary(true)
.withPassiveMode(true)
.withConfigureConnectionConsumer(
(FTPSClient ftpClient) -> {
// ftpClient.setImplicit(true) not possible because its final
});
Looks like the docs are wrong about being able to configure implicit, and that it would need explicit support added in the FTP connector (passing that flag at construction).
There, the flag was skipped because of the configureConnection method.
Also in very old versions of Apache Commons net (e.g. 3.0) the flag is final.
That is confusing.
Looking at
akka.stream.alpakka.ftp.impl.FtpSourceFactory
protected val ftpClient: () => FTPSClient = () => new FTPSClient
declared inside a package private trait that as annotated as an internal API.
It is using the default constructor of org.apache.commons.net.ftp.FTPSClient
whose javadoc states
Constructor for FTPSClient, calls [FTPSClient(String, boolean)]
… Sets protocol to DEFAULT_PROTOCOL - i.e. TLS - and security mode to explicit (isImplicit = false)
And the isImplicit field of FTPSClient is immutable
It is not clear how implicit FTPs is possible here