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

ASF subversion and git services commented on NIFI-797:
------------------------------------------------------

Commit 2a90bd501b5b3aad11ee8b92f276302741e5a91e in nifi's branch 
refs/heads/master from [~tkurc]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=2a90bd5 ]

NIFI-797 Corrected URL for PutS3 to include correct protocol and endpoint by 
region.
 - corrected a missed 'final' on 
org.apache.nifi.processors.aws.AbstractAWSProcessor.relationships
 - added protected method 
org.apache.nifi.processors.aws.AbstractAWSProcessor.getRegion()
 - added protected method 
org.apache.nifi.processors.aws.s3.AbstractS3Processor.getUrlForObject(String, 
String)
 - explicitly set AWS client protocol to HTTPS, and created a static final 
field with comments if other protocols may be considered
 - added a static final field for the UserAgent

Reviewed by Aldrin Piri <[email protected]>


> PutS3Object logs the URL as HTTP when the URL is HTTPS
> ------------------------------------------------------
>
>                 Key: NIFI-797
>                 URL: https://issues.apache.org/jira/browse/NIFI-797
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Ryan Hendrickson
>            Assignee: Tony Kurc
>            Priority: Trivial
>              Labels: aws-s3
>             Fix For: 0.4.0
>
>         Attachments: NIFI-797.000.patch
>
>
>    The PutS3Object reports to provenance that it uses an HTTP url, when the 
> default for the S3 is actually HTTPS.  This makes it pretty misleading as to 
> what is happening.
>     This is verified HTTPS via wireshark and a code review.
> https://git-wip-us.apache.org/repos/asf?p=nifi.git;a=blob;f=nifi/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java;h=24c82dd036f68b6cc1ed1df39d9a89b4cf7c0555;hb=HEAD
> 171             final String url = "http://"; + bucket + ".s3.amazonaws.com/" 
> + key;\r
> 172             final long millis = 
> TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos);\r
> 173             session.getProvenanceReporter().send(flowFile, url, millis);\r
> https://github.com/aws/aws-sdk-java/blob/8397ef2731c9ea57de1a529a2e3991eebb96b257/aws-java-sdk-core/src/main/java/com/amazonaws/ClientConfiguration.java
> Lines 104-110:
>  /**
> * The protocol to use when connecting to Amazon Web Services.
> * <p>
> * The default configuration is to use HTTPS for all requests for increased
> * security.
> */
> private Protocol protocol = Protocol.HTTPS;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to