Skip to content
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

Working with new Amazon S3 Regions doesn't work due to missing V4 authentication scheme #101

Closed
philippdhh opened this issue Dec 2, 2015 · 6 comments
Assignees
Labels

Comments

@philippdhh
Copy link

Hi,

while the loopback-component-storage seems to work well with most AWS S3 regions it does not work with regions created later than 2014 like the Frankfurt region in Europe.

The following error is returned:

{
"error": {
"name": "InvalidRequest",
"status": 400,
"message": "The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.",
"code": "InvalidRequest",
"time": "2015-12-02T23:30:05.289Z",
"statusCode": 400,
"retryable": false,
"retryDelay": 60,
"stack": "InvalidRequest: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.\n at Request.extractError (C:\Users\Philipp\WebstormProjects\GroupTravelMgrJs\node_modules\loopback-component-storage\node_modules\pkgcloud\node_modules\aws-sdk\lib\services\s3.js:343:35)\n at Request.callListeners
[........]
}
}

It seems to be related to this issue: http://stackoverflow.com/questions/26533245/the-authorization-mechanism-you-have-provided-is-not-supported-please-use-aws4

Best,
Philipp

@ataraxus
Copy link

ataraxus commented Dec 4, 2015

Same issue here.

@ataraxus
Copy link

ataraxus commented Dec 4, 2015

I hade a quick glance onto the impl. it seems to be an upstream issue. loopback-component-storage uses internally pkgcloud: https://www.npmjs.com/package/pkgcloud
There is already a version 1.2.0-alpha.0 but bumping the version loopback-component-storage uses (1.1.0) didn't help

@ataraxus
Copy link

ataraxus commented Dec 9, 2015

Hey @philippdhh,

I fixed it for me now. See here whats was the issue: aws/aws-sdk-js#829
for Frankfurt you have just to set the "correct" region:

 var publicHandler = new StorageService(
    {
      provider: 'amazon',
      region: "eu-central-1",
      keyId: "",
      key: ""
    });

I think it can be closed now

@philippdhh
Copy link
Author

Thank you very much.
I will try it tomorrow.

@ataraxus
Copy link

ataraxus commented Jan 5, 2016

so did it worked for you?

@richardpringle
Copy link
Contributor

@philippdhh did @ataraxus' solution work? I am going to close the issue, but please re-open the issue and mention me directly if the problem persists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants