-
Notifications
You must be signed in to change notification settings - Fork 619
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
Conversation
looks good to me~ |
415: 'Unsupported Media Type', | ||
416: 'Requested range not satisfiable', | ||
417: 'Expectation Failed', | ||
418: 'I\'m a teapot', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to look this one up https://sitesdoneright.com/blog/2013/03/what-is-418-im-a-teapot-status-code-error
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Ironic merge conflict... |
…plyChecksum = true and uriEscapePath = false)
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 😞 |
* 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
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. |
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!