[ 
https://issues.apache.org/jira/browse/CAMEL-27019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Federico Mariani reassigned CAMEL-27019:
----------------------------------------

    Assignee: Federico Mariani

> camel-sftp - a wrong password is sent up to 18 times per poll, and the WARN 
> does not say the login failed
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27019
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27019
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-sftp
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>
> With a wrong password, the sftp consumer sends the password up to 18 times 
> per poll, on every poll. JSch asks again for the password each time the 
> server rejects it, up to its {{MaxAuthTries}} (6) per connection, and Camel 
> gives it again each time, with the {{password}} or the 
> {{keyboard-interactive}} method. {{SftpOperations.connect}} then opens 
> another connection, up to {{maximumReconnectAttempts}} (3), also when the 
> server rejected the login. With the default {{autoCreate=true}} the consumer 
> connects once more when it starts, so the server sees 36 failed logins before 
> the first poll ends. On a server with a lockout policy, this locks the 
> account, also for the other clients that use it.
> {code:java}
> from("sftp://admin@host/inbox?password=wrong";)
>     .to("mock:result");
> // the server sees 18 failed logins on each poll (6 per connection, 3 
> connections)
> {code}
> The WARN of the consumer is {{Cannot connect/login to: sftp://admin@host:22. 
> Will skip this poll.}}: it does not say that the login failed. The cause, 
> {{Auth fail for methods '...'}}, is only logged at DEBUG.
> Expected: the password is sent once per connection, a rejected login is not 
> retried by the reconnect attempts (the next poll tries again), and the WARN 
> gives the reason.
> _Claude Code on behalf of Federico Mariani_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to