davsclaus opened a new pull request, #3319:
URL: https://github.com/apache/camel-kamelets/pull/3319
`ftps-source` and `ftps-sink` get the `securityProtocol` option of the Camel
`ftps` component, under the title **TLS Version**. It sets the newest TLS
version that the connection offers.
- **When it is not set:** `TLSv1.3`, which is the default of the component
and what the Kamelets used until now. A server that speaks only TLS 1.2 is
reached too: the existing `ftps-source-route` and `ftps-sink-route` tests
already show this, because Apache FtpServer speaks only TLSv1.2 by default.
- **With `TLSv1.2`:** the connection never uses TLS 1.3. This is for a
server whose TLS 1.3 connections fail or hang. A server that speaks only TLS
1.3 then refuses the connection, with `protocol_version` in the error.
The Good to know paragraph of both Kamelets now has one more sentence: "To
keep the connection on TLS 1.2, set `securityProtocol` to `TLSv1.2`." The
option is mapped with `{{?securityProtocol}}`, so nothing changes when it is
not set.
This was finding 29b of the Citrus test work: `ftps-source` sometimes hangs
in CI, and we can't tell whether a real TLS 1.3 server does the same. Claus
decided to expose the option. `implicit` was already on both Kamelets.
`execProt` and `execPbsz` are left out, because the defaults Camel sets for a
secure data channel (`PROT P`, `PBSZ 0`) are what servers expect.
### Test
New: `ftp/ftps-protocol-route` (FileIT), with
`ftp/ftpsServerProtocols.groovy`. That script is a copy of `ftpServer.groovy`
whose server speaks only the TLS versions in `ftp.tls.protocols`, here
`TLSv1.3`. The existing FTP test files are not changed. Against that server:
- `ftps-source` without the option reads the file.
- `ftps-sink` with `TLSv1.3` uploads it, as `upload/order 1.csv`.
- `ftps-sink` with `TLSv1.2` fails the message with `Received fatal alert:
protocol_version`.
- `ftps-source` with `TLSv1.2` logs the refused handshake
(`protocol_version`) on every poll.
Local runs, on a local build of Camel `main`:
- `./mvnw -o clean install -DskipTests`, twice: BUILD SUCCESS. The library
copies match.
- `library/camel-kamelets-catalog` tests pass.
- `FileIT#ftp`: 6/6 pass, in 3 runs.
### Upgrade note (for #3190)
`ftps-source` and `ftps-sink` have a new option, `securityProtocol` (TLS
Version). When it is not set, the connection offers TLS 1.3, as before. Set it
to `TLSv1.2` for a server whose TLS 1.3 connections fail.
_Claude Code on behalf of Claus Ibsen_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]