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

Blagoi Anastasov commented on JCLOUDS-1501:
-------------------------------------------

Yes, I made the S3 provider to use V4 signing. Here is the stack trace.

Caused by: org.jclouds.rest.AuthorizationException: GET 
https://s3.custom-region.cloud.x.net:443/bucketName/FILE.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxx/custom-region/s3/aws4_request&X-Amz-Date=20190603T145511Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=5e1daad1ad6ca1b561319e3990e9dd8bd6d89d7663158ac53cd93fb297bf266f
 HTTP/1.1 -> HTTP/1.1 403 Forbidden at 
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.refineException(ParseAWSErrorFromXmlContent.java:122)
 at 
org.jclouds.s3.handlers.ParseS3ErrorFromXmlContent.refineException(ParseS3ErrorFromXmlContent.java:97)
 at 
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:89)
 at 
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
 at 
com.axway.securetransport.plugins.site.s3.jclouds.ssl.CustomJavaUrlHttpCommandExecutorService.shouldContinue(CustomJavaUrlHttpCommandExecutorService.java:127)
 at 
com.axway.securetransport.plugins.site.s3.jclouds.ssl.CustomJavaUrlHttpCommandExecutorService.invoke(CustomJavaUrlHttpCommandExecutorService.java:95)
 at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91) 
at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74) 
at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45) 
at 
org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
 at 
org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
 at com.sun.proxy.$Proxy173.invoke(Unknown Source) at 
com.axway.securetransport.plugins.site.s3.connector.connectorImpl.S3ConnectorImpl.download(S3ConnectorImpl.java:147)
 ... 81 more Caused by: org.jclouds.aws.AWSResponseException: request GET 
https://s3.custom-region.cloud.x.net:443/bucketName/FILE.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxx/20190603/custom-region/s3/aws4_request&X-Amz-Date=20190603T145511Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=5e1daad1ad6ca1b561319e3990e9dd8bd6d89d7663158ac53cd93fb297bf266f
 HTTP/1.1 failed with code 403, error: 
AWSError\{requestId='tx00000000000016078137e-005cf534cf-9a20ef-default', 
requestToken='null', code='SignatureDoesNotMatch', 
context='{HostId=9a20ef-default-default}'} at 
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)




Logs attached in [^SignatureDoesNotMatchLogs]

 

 

> S3 SignatureDoesNotMatch when trying to get the response from GET Request
> -------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1501
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1501
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 2.1.2
>            Reporter: Blagoi Anastasov
>            Priority: Major
>              Labels: s3
>         Attachments: SignatureDoesNotMatchLogs
>
>
> HttpRequest request = {color:#660e7a}mBlobStoreContext{color}.getSigner()
>  .signGetBlob({color:#660e7a}mBeanConfigurations{color}.getS3Bucket(), 
> targetObjectKey);
>  HttpResponse response = 
> {color:#660e7a}mBlobStoreContext{color}.utils().http().invoke(request);
>  
> When pointing to s3 custom endpoint and trying to get the response from the 
> GET Request it fails with SignatureDoesNotMatch message in the 
> AWSResponseException. Strange behavior is that it has no issues while PUT 
> requests so it has nothing wrong with the Access Key and the Secret Key. 
> V4 Signature is used for Authorization.



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

Reply via email to