-
Notifications
You must be signed in to change notification settings - Fork 6
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
Updated to check against SHA-256 signature of request body (fixes #47) #57
Conversation
6cd5253
to
7cc4398
Compare
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.
Great work!
CHANGELOG.md
Outdated
@@ -1,3 +1,7 @@ | |||
## 3.0.0 | |||
* BREAKING: Updated to check against SHA-256 signature of request body (#47) |
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.
My understanding is that both the sha-256 and the sha1 headers are still present in the Amazon response headers, and updating to this module doesn't involve any breaking changes, but maybe I'm missing something?
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.
You are correct, they still do have both headers. I figured if Amazon wants to use SHA-256 over SHA-1, they'll drop the latter at some point, and that would be a big behaviour change by itself (hence the major version bump).
However I'm not strongly rooted in this idea and open to other ideas too.
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 semver is only referring to the impact of the module on a person's local codebase. In the case of someone importing alexa-verifier-middleware
, I don't see any changes that would be breaking on the code side.
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.
The reason why I'm bringing this up is the downside to bumping the major version is it results in fewer people updated. Bumping the minor number instead will result in more people adopting it quickly, which is nice for an API change that might someday break if/when Amazon removes the non-256 version of the signature header.
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.
You bring up a good point about version adoption. I'll make the changes later today.
7cc4398
to
d843d13
Compare
d843d13
to
bd7e556
Compare
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.
nice work!
Thanks! I'll do the release on NPM |
This should address #47. I'm thinking this should warrant a major version as it behaves differently enough. @mreinstein any thoughts on this and this PR?
Here's a full list of the changes:
Features:
alexa-verifier
dependency to 4.0.0Testing:
alexa-verifier
does)