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

Tests are failing #10

Closed
keichan34 opened this issue Oct 31, 2017 · 4 comments
Closed

Tests are failing #10

keichan34 opened this issue Oct 31, 2017 · 4 comments

Comments

@keichan34
Copy link

Two tests are failing when trying them locally.

  1) test test/testsuite/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req (AwsSigV4Test)
     test/aws_sig_v4_test.exs:72
     Assertion with == failed
     code:  assert authz == Map.get(sig_data, "Authorization")
     left:  "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1"
     right: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9edc3141d0593b544cd4a62b4813f99f33ae0ce979d7a3a6ab9828e2b9355ef4"
     stacktrace:
       test/aws_sig_v4_test.exs:72: (test)

  2) test test/testsuite/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req (AwsSigV4Test)
     test/aws_sig_v4_test.exs:72
     Assertion with == failed
     code:  assert authz == Map.get(sig_data, "Authorization")
     left:  "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694"
     right: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb"
     stacktrace:
       test/aws_sig_v4_test.exs:72: (test)

Any idea?

I'm trying to use this library to generate presigned S3 URLs, but with little luck.

@handnot2
Copy link
Owner

Does your call match what is shown in the pre-signed url example in readme? Specifically the option body: unsigned? Also make sure that the parameters are merged before sending out. If it still doesn't work, provide code sample that fails.

Tests failing: Looks like AWS added new tests to the test suite. Thanks for pointing out. Will check out the new tests and provide an update.

@handnot2
Copy link
Owner

Both of the tests, get-vanilla-query-order-key and get-vanilla-query-order-value have duplicate query parameters. The AWS signature V4 signing process doc does not specify what to do in such case. (If there is a doc link describing this please include it here).

Because of this, there will not be any fixes for this. The tests will be updated to skip these two test cases. This issue will be closed when that change is merged. Please re-open this if there is a concrete description from AWS on how to do the signature computation.

@keichan34
Copy link
Author

I see! Thanks for checking it out. I'll open a separate issue for the pre-signed URLs if it comes up again.

@handnot2
Copy link
Owner

handnot2 commented Nov 7, 2017

aws/aws-sdk-go#1495

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

No branches or pull requests

2 participants