Gábor Gyimesi created MINIFICPP-2169:
----------------------------------------

             Summary: PutS3Object fails on Windows
                 Key: MINIFICPP-2169
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-2169
             Project: Apache NiFi MiNiFi C++
          Issue Type: Bug
            Reporter: Gábor Gyimesi
            Assignee: Gábor Gyimesi


S3 upload fails with the following message when using WinHTTP client on Windows 
platform.
{code:java}
[2023-07-14 16:07:29.300] [org::apache::nifi::minifi::aws::utils::AWSSdkLogger] 
[error] [WinHttpSyncHttpClient] Failed to add HTTP request headers: 
amz-sdk-invocation-id: A47F213E-E882-4874-A672-476928DCF98D
amz-sdk-request: attempt=1
authorization: AWS4-HMAC-SHA256 
Credential=AKIAUYLDB5SQVHSVDTJS/20230714/eu-west-2/s3/aws4_request, 
SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-grant-full-control;x-amz-grant-read;x-amz-grant-read-acp;x-amz-grant-write-acp;x-amz-server-side-encryption;x-amz-storage-class,
 Signature=cb2bb298a825a9c44fe8901f8aecc50cf1301e1c850e20dd1144e73ea313b27a
content-length: 13
content-md5: ZajifYh5KDgxtmS9i38K1A==
content-type: application/octet-stream
host: <bucket>.s3.eu-west-2.amazonaws.com
user-agent: aws-sdk-cpp/1.11.118 Windows/10.0.19041.3155 AMD64 MSVC/1929
x-amz-content-sha256: UNSIGNED-PAYLOAD
x-amz-date: 20230714T140729Z
x-amz-grant-full-control: 
x-amz-grant-read: 
x-amz-grant-read-acp: 
x-amz-grant-write-acp: 
x-amz-server-side-encryption: 
x-amz-storage-class: STANDARD
, with error code: 12150
[2023-07-14 16:07:29.458] [org::apache::nifi::minifi::aws::utils::AWSSdkLogger] 
[warning] [AWSErrorMarshaller] Encountered AWSError 'SignatureDoesNotMatch': 
The request signature we calculated does not match the signature you provided. 
Check your key and signing method.
[2023-07-14 16:07:29.458] [org::apache::nifi::minifi::aws::utils::AWSSdkLogger] 
[error] [AWSXmlClient] HTTP response code: 403
Resolved remote host IP address: 
Request ID: EF8H8BECB3N9KE0A
Exception name: SignatureDoesNotMatch
Error message: The request signature we calculated does not match the signature 
you provided. Check your key and signing method.
7 response headers:
connection : close
content-type : application/xml
date : Fri, 14 Jul 2023 14:07:27 GMT
server : AmazonS3
transfer-encoding : chunked
x-amz-id-2 : 
6gApL4IUcv8x1DyoE2jrmips9TvoCzQJsYPywjgYQA/BAb0oUUQ3fP1b6qDCUcxwn349+Wxnii4=
x-amz-request-id : EF8H8BECB3N9KE0A
[2023-07-14 16:07:29.458] [org::apache::nifi::minifi::aws::utils::AWSSdkLogger] 
[warning] [AWSClient] If the signature check failed. This could be because of a 
time skew. Attempting to adjust the signer.
[2023-07-14 16:07:29.458] [org::apache::nifi::minifi::aws::s3::S3RequestSender] 
[error] PutS3Object failed with the following: 'The request signature we 
calculated does not match the signature you provided. Check your key and 
signing method.' {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to