-
Notifications
You must be signed in to change notification settings - Fork 2.9k
NIFI-4175 - Add HTTP proxy support to *SFTP processors #2018
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
Conversation
pvillard31
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @trixpan. Just had a quick look and left two comments.
| ); | ||
| // Check if Username is set and populate the proxy accordingly | ||
| if (ctx.getProperty(PROXY_USERNAME).evaluateAttributeExpressions(flowFile).isSet()) { | ||
| proxy.setUserPasswd(ctx.getProperty(PROXY_USERNAME).evaluateAttributeExpressions(flowFile).getValue(), ctx.getProperty(PROXY_PASSWORD).evaluateAttributeExpressions(flowFile).getValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[WARNING] src/main/java/org/apache/nifi/processors/standard/util/SFTPTransfer.java[445] (sizes) LineLength: Line is longer than 200 characters (found 206).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... missed that one. Will fix.
| .defaultValue("true") | ||
| .required(true) | ||
| .build(); | ||
| public static final PropertyDescriptor PROXY_HOST = new PropertyDescriptor.Builder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if, since FileTransfer is only used for FTP and SFTP, it would make sens to move the proxy-related properties to FileTransfer instead of duplicating code. I believe, as far as I can see, that we could use the existing properties in FTPTransfer for SFTPTransfer as well with HTTP Proxy and SOCK proxy. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvillard31 I saw that and considered it but ended up adopting the current approach due to my view that I prefer not supporting SOCKS ... Don't get me wrong, I appreciate the reason why SOCKS exists but most processors are only able to support HTTP so I rather provide... consistency (I know I have been sounding repetitive lately... 😄 )
Since FTP already supports SOCKS I reckon we can leave it there, but for SFTP I rather not add it at all.
Let me know if you agree and I will adjust accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't have any opinion on this subject but I agree that if we do not add SOCKS option to SFTP processors, then it's OK to have the corresponding properties in SFTPTransfer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
We would really like to see that the development goes into the direction that SOCKS Proxy with authentication will also be available.
In many bigger companies it is a basic requirement and for us it is not possible to provide those parameters through the -D Options as mentioned in this comment: https://community.hortonworks.com/questions/30339/how-to-configure-proxy-server-details-with-user-an.html
As JSCH offers all the possibilities and a reference implementation it should be possible to integrate it and broaden the functionality of Nifi and thus make it more attractive to companies.
Please feel free to discuss my opinion.
Best regards
This closes apache#2018. Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
|
@trixpan Since this PR is really close to get merged, but got inactive, and I have another PR tackling the same theme, I have merged your commit into my PR in #2704. SOCKS proxy support is also added there. When #2704 is merged successfully after being reviewed, this PR will be closed, too. I hope continuing work at #2704 would be fine for you. Please let me know if not the case. @trixpan @pvillard31 @jugi92 would you please take a look on #2704 and post any feedback there, thanks! |
This closes apache#2018. Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
This closes apache#2018. Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
This closes apache#2018. Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
This closes apache#2018. Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.