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

Implement Amazon's Request-signing Test Suite #98

Open
joearasin opened this issue Nov 30, 2016 · 4 comments
Open

Implement Amazon's Request-signing Test Suite #98

joearasin opened this issue Nov 30, 2016 · 4 comments

Comments

@joearasin
Copy link

I was digging through some of my notes from originally building the S3 functionality and dug this up. Amazon provides a test suite for AWS signature libraries. It might make sense to use it.

http://docs.aws.amazon.com/general/latest/gr/signature-v4-test-suite.html

@ktoso
Copy link
Member

ktoso commented Nov 30, 2016

That would be great indeed, anyone up for jumping on this task?

@devsprint
Copy link

Hi, I've started to implement a new test suite using Amazon provided test suite. First problem that I have found with the current implementation is the missing hash of the payload (hash of empty string) in building Canonical Request. In Canonical Request object:
val hashedBody = req.headers.find(_.name == "x-amz-content-sha256") .map(_.value).getOrElse("")

See: Task 1: Create a Canonical Request for Signature Version 4

I'll come with PR tomorrow.

devsprint added a commit to devsprint/alpakka that referenced this issue Dec 16, 2016
devsprint added a commit to devsprint/alpakka that referenced this issue Dec 18, 2016
… Scala test suite refactoring, in prgress.
devsprint added a commit to devsprint/alpakka that referenced this issue Dec 18, 2016
devsprint added a commit to devsprint/alpakka that referenced this issue Dec 19, 2016
@devsprint
Copy link

@joearasin @ktoso implementation is completed. There is only one test that is skipped (you'll see in the code). This is because I did not found a way to build a HttpRequest with body, without having it adding the charset part to content type. If you know a way to do this, then I will update the code in a second.

@jrudolph
Copy link
Member

As commented in #120 it is not possible to use the AWS signing test suite verbatim because akka-http cannot be made to render exactly the same requests. This comment gives a few hints how better test coverage could be achieved anyways.

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

No branches or pull requests

5 participants