Croway opened a new pull request, #30056:
URL: https://github.com/apache/camel/pull/30056

   The sftp page had no section on URI paths or private keys, named no endpoint 
option for the legacy algorithms, and gave no help with the JSch errors behind 
`Cannot connect to`. The absolute-path WARN still said the paths would become 
invalid after Camel 2.16.
   
   - **URI format and paths** (new): the directory is relative to the login 
directory. Leading slashes, also of `//`, are removed with a WARN 
(`FtpUtils.ensureRelativeFtpDirectory`), and as `autoCreate` creates the 
directory (`AbstractSftpConsumer.doStart`, `GenericFileProducer`), a wrong path 
gives a new directory, not an error. A directory outside the login directory 
needs a symbolic link, or `../` with `jailStartingDirectory=false`: with the 
default, the consumer skips the files and the producer refuses to write 
(`GenericFileHelper.isWithinDirectory`).
   - **Providing the private key** (new): `privateKeyFile`, `privateKeyUri` 
(classpath by default, `file:`), `privateKey` (`byte[]`) and `keyPair`, as 
`SftpOperations.createSession` reads them. A key whose line breaks were 
replaced fails with `invalid privatekey`.
   - **Restoring Deprecated Key Types and Algorithms**: showed only 
`JSch.setConfig` and said the URI parameters exist without naming them. It now 
names `serverHostKeys`, `publicKeyAcceptedAlgorithms`, `keyExchangeProtocols` 
and `ciphers`, which `createSession` sets on the session, so they replace the 
JSch list for that endpoint only, while `JSch.setConfig` changes the whole JVM.
   - **Connection errors** (new): maps the cause of `Cannot connect to` 
(`reject HostKey`, `Algorithm negotiation fail`, `Auth fail`, `invalid 
privatekey`, `Incorrect passphrase provided.`, from JSch 2.28.8 `Session`, 
`KeyExchange`, `KeyPair` and `JSch.addIdentity`) to the options to check.
   - **ftp page**: "The directory name is a relative path" now says relative to 
what (the login directory).
   - **WARN**: no longer says "After Camel 2.16, absolute paths will be 
invalid", as the path is still converted; it says the converted path is 
relative to the login directory.
   
   The catalog copies of both pages are regenerated.
   
   _Claude Code on behalf of Federico Mariani_
   


-- 
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]

Reply via email to