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

Kislay Kumar edited comment on NIFI-4621 at 12/6/18 2:25 AM:
-------------------------------------------------------------

[~patricker] Some code snippets from SFTPTransfer.java which implements 
processors's functionality is under: 

 *Username, hostname, port:*
{quote}final String username = 
ctx.getProperty(USERNAME).*evaluateAttributeExpressions*(flowFile).getValue();
 final Session session = jsch.getSession(username,
 ctx.getProperty(HOSTNAME).*evaluateAttributeExpressions*(flowFile).getValue(),
 
ctx.getProperty(PORT).*evaluateAttributeExpressions*(flowFile).asInteger().intValue());
  
{quote}
 
 *privateKeyFile, password*
{quote}final String privateKeyFile = 
ctx.getProperty(PRIVATE_KEY_PATH).evaluateAttributeExpressions(flowFile).getValue();
 if (privateKeyFile != null)
Unknown macro: \{ jsch.addIdentity(privateKeyFile, 
ctx.getProperty(PRIVATE_KEY_PASSPHRASE).*evaluateAttributeExpressions*(flowFile).getValue());
 }
final String password = 
ctx.getProperty(FileTransfer.PASSWORD).evaluateAttributeExpressions(flowFile).getValue();
  
{quote}
 


was (Author: kislayom):
[~patricker] Some code snippets from SFTPTransfer.java which implements 
processors's functionality is under: 

 *Username, hostname, port:*
{quote}final String username = 
ctx.getProperty(USERNAME).evaluateAttributeExpressions(flowFile).getValue();
 final Session session = jsch.getSession(username,
 ctx.getProperty(HOSTNAME).evaluateAttributeExpressions(flowFile).getValue(),
 
ctx.getProperty(PORT).evaluateAttributeExpressions(flowFile).asInteger().intValue());
  
{quote}
 
 *privateKeyFile, password*
{quote}final String privateKeyFile = 
ctx.getProperty(PRIVATE_KEY_PATH).evaluateAttributeExpressions(flowFile).getValue();
 if (privateKeyFile != null)
Unknown macro: \{ jsch.addIdentity(privateKeyFile, 
ctx.getProperty(PRIVATE_KEY_PASSPHRASE).evaluateAttributeExpressions(flowFile).getValue());
 }
final String password = 
ctx.getProperty(FileTransfer.PASSWORD).evaluateAttributeExpressions(flowFile).getValue();
  
{quote}
 

> Allow inputs to ListSFTP and ListFTP
> ------------------------------------
>
>                 Key: NIFI-4621
>                 URL: https://issues.apache.org/jira/browse/NIFI-4621
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.4.0
>            Reporter: Soumya Shanta Ghosh
>            Assignee: Peter Wicks
>            Priority: Critical
>
> ListSFTP supports listing of the supplied directory (Remote Path) 
> out-of-the-box on the supplied "Hostname" using the 'Username" and 'Password" 
> / "Private Key Passphrase". 
> The password can change at a regular interval (depending on organization 
> policy) or the Hostname or the Remote Path can change based on some other 
> requirement.
> This is a case to allow ListSFTP to leverage the use of Nifi Expression 
> language so that the values of Hostname, Password and/or Remote Path can be 
> set based on the attributes of an incoming flow file.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to