# Using implicit Ftps

**URL:** <https://discuss.akka.io/t/using-implicit-ftps/10591>\
**Category:** Akka Streams & Alpakka\
**Tags:** java\
**Created:** [January 8, 2024, 4:12pm UTC](https://discuss.akka.io/t/using-implicit-ftps/10591 "2024-01-08T16:12:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sigurd](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sigurd](https://discuss.akka.io/u/sigurd)\
**Post date:** [January 8, 2024, 4:12pm UTC](https://discuss.akka.io/t/using-implicit-ftps/10591/1 "2024-01-08T16:12:09Z")

</div>

Hey guys,

I’m trying to use implicit FTPS.

In the documentation, there is written

> Use it to configure any custom parameters the server may require, such as explicit or implicit data transfer encryption.  
> [FTP • Alpakka Documentation](https://doc.akka.io/docs/alpakka/current/ftp.html#configuring-the-connection-settings)

The `FTPSClient` has a `isImpicit` flag internally but it’s final.  
In the example, I can only modify an already created FTPSClient.

```auto
FtpsSettings.create(InetAddress.getByName(HOSTNAME))
        .withPort(PORT)
        .withCredentials(CREDENTIALS)
        .withBinary(true)
        .withPassiveMode(true)
        .withConfigureConnectionConsumer(
            (FTPSClient ftpClient) -> {
                // ftpClient.setImplicit(true) not possible because its final
              });

```

How I can configure implicit FTPS?

Best  
Sigurd

---

<div class="post-metadata">

**Author:** ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)\
**Post date:** [January 9, 2024, 8:10am UTC](https://discuss.akka.io/t/using-implicit-ftps/10591/2 "2024-01-09T08:10:27Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![sigurd](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sigurd](https://discuss.akka.io/u/sigurd)\
**Post date:** [January 9, 2024, 8:32am UTC](https://discuss.akka.io/t/using-implicit-ftps/10591/3 "2024-01-09T08:32:06Z")

</div>

I found a very old pull request about that.

> <https://github.com/akka/alpakka/pull/977>
>
> I've tested it agains the server, which requires encrypted data transfer and it …works.
> 
> I'm not super sure how to add this case to the specs yet.

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.

---

<div class="post-metadata">

**Author:** ![colmoflynn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/colmoflynn/32/3272_2.png) [@colmoflynn](https://discuss.akka.io/u/colmoflynn)\
**Post date:** [July 10, 2025, 10:50pm UTC](https://discuss.akka.io/t/using-implicit-ftps/10591/4 "2025-07-10T22:50:57Z")

</div>

Hi team

Is there any update on this one?.

As @sigurd points out with the Apache Commons Net FTPSClient [FTPSClient (Apache Commons Net 3.11.1 API)](https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPSClient.html) the flag is immutable on creation

Looking at  
akka.stream.alpakka.ftp.impl.FtpSourceFactory

```auto
 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

> **[FTPSClient (Apache Commons Net 3.11.1 API)](https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPSClient.html#%3Cinit%3E())**
>
> declaration: package: org.apache.commons.net.ftp, class: 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

Thanks in advance
