Skip to content

Feature/run sigv4 test suite #58

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

Merged
merged 11 commits into from
Nov 1, 2017
Merged

Feature/run sigv4 test suite #58

merged 11 commits into from
Nov 1, 2017

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Oct 23, 2017

Adds a runner for the official SigV4 test suite. The last commit also adds a node package that automatically injects the Node SHA-256 signer; the inclusion of the official test suite makes testing it a breeze!

@AllanZhengYP
Copy link
Contributor

looks good to me~

415: 'Unsupported Media Type',
416: 'Requested range not satisfiable',
417: 'Expectation Failed',
418: 'I\'m a teapot',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think someone opened an RFC to deprecate this code, but it's still the canonical reason for a 418.

const matches = headers.host.match(/:(\d+)$/);
if (matches) {
message.hostname = headers.host.substr(0, matches.index);
message.port = parseInt(matches[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: specify base 10

@@ -16,17 +16,17 @@
"@aws/crypto-sjcl-codecString": "^0.0.1",
"@aws/crypto-sjcl-hmac": "^0.0.1",
"@aws/crypto-sjcl-sha256": "^0.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you still need all these other crypto-sjcl dependencies? It looks like several of them were only used by the JS implementation of sha256, which is now a separate package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's true. None of these are direct dependencies. Will remove

@chrisradek
Copy link
Contributor

Ironic merge conflict...

@jeskew
Copy link
Contributor Author

jeskew commented Nov 1, 2017

Yeah, had to rebase to get CodeBuild to run. Unfortunately, CodeBuild has no corollary to Travis's "only build if .travis.yml file is present" setting, so all outstanding CRs will need to be rebased.

Sorry for the churn 😞

@jeskew jeskew merged commit 45815d0 into aws:master Nov 1, 2017
@jeskew jeskew deleted the feature/run-sigv4-test-suite branch November 2, 2017 02:29
trivikr referenced this pull request in trivikr/aws-sdk-js-v3 Dec 10, 2018
* Ensure asynchronous region and credential resolution is covered by tests

* Factor SJCL-based SHA-256 into its own package to all usage without requiring all browser-based implementations

* Add an HTTP message serialization/parsing library

* Add support for switching to "S3 mode" via constructor parameters (applyChecksum = true and uriEscapePath = false)

* Add official sigv4 test suite

* Add a standalone NodeJS-based SigV4 package

* Add a standalone browser-based SigV4 package

* Add a standalone universal JS SigV4 package

* Specify base when parsing HTTP status codes

* Remove extra dependencies from crypto-sha256-browser

* Ensure tests in signature-v4 are all using crypto-sha256-js
@lock
Copy link

lock bot commented Sep 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants