You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Will Buck (JIRA)" <ji...@apache.org> on 2018/05/01 14:01:00 UTC

[jira] [Updated] (VFS-663) SftpClientFactory does not pass proxyUser or proxyPassword to non-PROXY_STREAM types

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

Will Buck updated VFS-663:
--------------------------
    Description: 
I've discovered that while version 2.1 added `setProxyUser` and `setProxyPassword` to `SftpFileSystemConfigBuilder`, these properties are only read via `getProxyUser` and `getProxyPassword` for the `ProxyType` `PROXY_STREAM`, but not for the other two supported proxy types (`PROXY_HTTP` and `PROXY_SOCKS5`)

The fix for this is reasonably straightforward, as both `com.jcraft.jsch.ProxyHTTP` and `com.jcraft.jsch.ProxySOCKS5` support a `setUserPasswd` function and utilization of a username and password for connection.

I've created a fork with the changes I would propose to fix the bug, but am open to changes with it if I have missed any style guidelines. I am unsure how to go about writing a clear test for this and would love some assistance in doing so, however I have built the fork and imported it into a project my client is working on, and it seems to have solved the issue we were having (an exception was being thrown, 'Proxy Authentication Required').

I would welcome feedback and hope to resolve this issue so that other users of the library will be able to connect to authenticated proxies easily!

 

  was:
I've discovered that while version 2.1 added `setProxyUser` and `setProxyPassword` to `

SftpFileSystemConfigBuilder`, these properties are only read via `getProxyUser` and `getProxyPassword` for the `ProxyType` `PROXY_STREAM`, but not for the other two supported proxy types (`PROXY_HTTP` and `PROXY_SOCKS5`)

The fix for this is reasonably straightforward, as both `com.jcraft.jsch.ProxyHTTP` and `com.jcraft.jsch.ProxySOCKS5` support a `setUserPasswd` function and utilization of a username and password for connection.

I've created a fork with the changes I would propose to fix the bug, but am open to changes with it if I have missed any style guidelines. I am unsure how to go about writing a clear test for this and would love some assistance in doing so, however I have built the fork and imported it into a project my client is working on, and it seems to have solved the issue we were having (an exception was being thrown, 'Proxy Authentication Required').

I would welcome feedback and hope to resolve this issue so that other users of the library will be able to connect to authenticated proxies easily!

 


> SftpClientFactory does not pass proxyUser or proxyPassword to non-PROXY_STREAM types
> ------------------------------------------------------------------------------------
>
>                 Key: VFS-663
>                 URL: https://issues.apache.org/jira/browse/VFS-663
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>            Reporter: Will Buck
>            Priority: Major
>
> I've discovered that while version 2.1 added `setProxyUser` and `setProxyPassword` to `SftpFileSystemConfigBuilder`, these properties are only read via `getProxyUser` and `getProxyPassword` for the `ProxyType` `PROXY_STREAM`, but not for the other two supported proxy types (`PROXY_HTTP` and `PROXY_SOCKS5`)
> The fix for this is reasonably straightforward, as both `com.jcraft.jsch.ProxyHTTP` and `com.jcraft.jsch.ProxySOCKS5` support a `setUserPasswd` function and utilization of a username and password for connection.
> I've created a fork with the changes I would propose to fix the bug, but am open to changes with it if I have missed any style guidelines. I am unsure how to go about writing a clear test for this and would love some assistance in doing so, however I have built the fork and imported it into a project my client is working on, and it seems to have solved the issue we were having (an exception was being thrown, 'Proxy Authentication Required').
> I would welcome feedback and hope to resolve this issue so that other users of the library will be able to connect to authenticated proxies easily!
>  



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