Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task]: File connector SFTP password should get url encoded by default #3669

Open
Bhashinee opened this issue Oct 8, 2024 · 0 comments
Open

Comments

@Bhashinee
Copy link
Member

Description

Please consider below SFTP connection made for the file connector.

<localEntry key="pnc-claim-partners-sftp-connection" xmlns="http://ws.apache.org/ns/synapse">

    <file.init>

        <strictHostKeyChecking>false</strictHostKeyChecking>

        <connectionType>SFTP</connectionType>

        <password>{wso2:vault-lookup('pnc_claim_partners_sftp_password_with_special_char')}</password>

        <host>ftp.abc.com</host>

        <fileLockScheme>Local</fileLockScheme>

        <workingDir>/</workingDir>

        <sftpConnectionTimeout>100000</sftpConnectionTimeout>

        <setAvoidPermission>false</setAvoidPermission>

        <userDirIsRoot>true</userDirIsRoot>

        <port>22</port>

        <name>pnc-claim-partners-sftp-connection</name>

        <sftpSessionTimeout>150000</sftpSessionTimeout>

        <username>{wso2:vault-lookup('pnc_claim_partners_sftp_username')}</username>

    </file.init>

</localEntry>

We are getting the key from secure vault. When the value of the password key contains a special character like @, the file connector will not work. Workaround is to url encode the password and place it in the secure vault.

If a different team is managing the enviornment (i.e Manage Services Team), if we see a special character in password, we need to specifically instruct them to url encode the password. Or be default, they always need to url encode. This is a special instruction for them. The developer who attends to this should know this edge case. Thus, these is a chance to miss this.

What if we fix at the connector level, always we url encode the password and take it in.

Describe your task(s)

No response

Related issue(s) (optional)

https://github.com/wso2-enterprise/wso2-mi-internal/issues/711

Suggested label(s) (optional)

Product : WSO2MI 4.2.0
Update level : 56
Opened by : hasithah@wso2.com

Suggested assignee(s) (optional)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant