WSO2 MI 4.1.0 SFTP protocol: How to construct URI from Environment variables

109 Views Asked by At

In my scenario, I download files from FTP. My transport.vfs.FileURI look like vfs:sftp://login:password@ip/. Is it possible to set the login and password by dynamically retrieving the value from an environment variable?

1

There are 1 best solutions below

0
ycr On

You should be able to pass the entire URL like below. AFAIK you cannot concat multiple variables and construct the URL within the Parameter.

<parameter name="ransport.vfs.FileURI">$SYSTEM:SFTP_ENV_NAME</parameter>

You can also use the securevalt for this.

<parameter name="transport.vfs.FileURI">vfs:sftp://{wso2:vault-decrypt('encryptedValue')}</parameter>