-
Notifications
You must be signed in to change notification settings - Fork 575
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
feat: Add Cloudfront package to sign URLs and cookies #3461
Conversation
I realized the commit message conventions are incorrect. I'll fix these. |
ab7d755
to
b367840
Compare
Great work. I'm hoping someone from AWS will review this soon |
hi @keithalpichi , Thanks for submitting this PR. There are some changes I'd like to make before merging the code. Would you like me to add my commits on top of yours, or would you like to receive PR review comments? I will take the former route if you're otherwise occupied. |
PR review comments will work for me. |
Woops. Messed up there. I'll remove these unnecessary commits unrelated to the PR. |
…h a custom policy
…hard-coded string
…olicy of signed URL
…ey buffer contents
…nts instead of file path
49ecc2b
to
0e05f4b
Compare
d753301
to
e842b16
Compare
Thanks for the PR updates. I plan to merge this soon. One last thing you could change, or leave to me, is renaming the package again (sorry). After some discussion about the various signing packages, we realized this package should be called simply |
You're welcome. Feel free to go ahead and change the package name. I'm a bit busy the rest of the week. |
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. |
Issue
#1822 & #1862
Description
This PR adds a new package called
@aws-sdk/cloudfront-sign
that exposes two functions (signUrl
andsignCookies
) related to signing Cloudfront URL & cookies. It's implemented as a package, likes3-request-presigner
, as it doesn't use any code related to theclient-cloudfront
client.Testing
With Jest unit tests. Signatures are created and verified using NodeJS
crypto
library.Additional context
There hasn't been much discussion in #1822 for the details of this implementation so I went ahead and took a stab on an initial implementation. I am sure there will be many comments surrounding design and requests for change. Please feel free to let me know what those comments are. I'll get them changed as soon as I can.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.