[ 
https://issues.apache.org/jira/browse/NIFI-10532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17609662#comment-17609662
 ] 

Alex Sherwin commented on NIFI-10532:
-------------------------------------

FWIW I just ran up against this too in PutSFTP.

We have a pattern where we route to hundreds of different destination users 
based on an attribute on the FlowFile for the target username, but all to the 
same target SFTP server.

We pull authentication info using a ControllerService for SSH key based auth 
information (so no sensitive info is in FlowFile attributes).

I traced it down to the batching behavior and just found this ticket, so, make 
that two people that were surprised the optimistic SFTPClient reuse cache is by 
host only, it would make sense to me to be host + port + username (seems 
unlikely the credentials should be accounted for here, the change of the 
credentials differing for the same host + port + username seems slim)

> PutFTP does not group the batch by user name
> --------------------------------------------
>
>                 Key: NIFI-10532
>                 URL: https://issues.apache.org/jira/browse/NIFI-10532
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.17.0, 1.16.1
>            Reporter: Christoph Langheld
>            Assignee: Joe Witt
>            Priority: Critical
>             Fix For: 1.18.0
>
>         Attachments: 01-PutFTP-ProcessGroup.png, 02-PutFTP-Setting.png, 
> 03-PutFTP-Result.png, PutFTP-Bug.xml
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Hello,
> for the PutFTP processor we set the host, name, password, port, and target 
> directory dynamically via UpdateAttribute.
> We now have the problem, that the PutFTP processor transmits every file with 
> the same user even the ftp user name changed. The target host does not 
> change, only the user.
> To reproduce I attached a process group as template ([^PutFTP-Bug.xml]). You 
> have to adapt the ftp server settings within the UpdateAttribute processor to 
> your environment.
> The process group generates 50 flow files.
> UpdateAttribute sets the ftp user credentials and sets a filename prefix 
> (NIFI-A_ respectively NIFI-B_).
> If everything would work correctly all files with prefix NIFI-A_ should be 
> transfered to the ftp server as user nifi-a and the rest as user nifi-b.
> But every file will be transferred as the same user (nifi-a).
> PutFTP should group the batch by host, login credentials (user, password, 
> port) and target directory.
> !01-PutFTP-ProcessGroup.png|width=639,height=607!
> PutFTP settings:
> !02-PutFTP-Setting.png|width=750,height=523!
> Result on the ftp server (logged in as user nifi-a):
> !03-PutFTP-Result.png|width=268,height=482!
>  
> Thank you and regards
> Christoph
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to