-
Notifications
You must be signed in to change notification settings - Fork 284
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
AWS S3 Signature v4 #273
base: master
Are you sure you want to change the base?
AWS S3 Signature v4 #273
Conversation
Thanks for working on this. However,
please remove this part of the PR. As noted in https://github.com/LearnBoost/knox#multipart-upload we are leaving that for other packages. |
I'm not 100% sure but AFAIK there's no way to PUT files on S3 using Signature v4 without knowing their length. All request Must be signed and if there's a body, body hash must be a part of the signature. Removing this part will break Correct me if im wrong. |
Do you have to know just the Content-Length, or the entire body at once? If you have to know the entire body at once, I wonder if maybe this is better for another library instead of Knox, hmm... will have to think on this more. |
Wait. Just found this. So there is a way, we just need to overwrite I'll try to fix it. Small patch on aws4 repo to allow overwrite |
@shfx I'm so sorry, but I didn't see the above comment until now! Given the many people clamoring for this feature in #254, I would love if we could get that patch accepted and get this working with streaming. Also, am I misreading, or does that link also give us a way to avoid having to always set the Content-Length header?! That would be huuuuge for knox. |
Any updates on this PR? Would love to get things working for eu-central-1 soon! |
I see @domenic and other people are still interested in this PR. I'll do my best to study what I wrote 6 months ago and try to prepare a valid PR. It might be tricky tho. |
Are there any updates for this PR? Lots of people still looking for a solution for the v4 signature. |
I would really love to see this problem solved = ) |
Would be great if we could use Knox in Frankfurt and US-Central. |
still waiting... |
Wow it took a while to find this. So Knox does not work with Frankfurt. Would be nice to document this, I spent 2 days on this. |
+1 on fixing this |
+1 |
Not sure if it will make a difference, but +1! |
+1! |
Latest guy on the ship. |
+1 |
alternative solutions for this? |
+1 |
+1 |
At 29/6/2019 amazon will stop use v2 signature: |
Is any solution for this problem? |
This PR holds implementation for AWS S3 Signature v4 for each non-put requests. While main strength of Knox is streaming instead of buffering, I also reimplemented PUT stream to use REST Multipart Upload.
Instead of rewriting
lib/auth.js
module to match the specification, I added aws4 as a depedency and removed obsolete functions inlib/auth.js
and coresponding tests fromtest/auth.test.js
. One thing that I left inlib/auth.js
wassignQuery()
mainly because aws4 library haven't got this implemented yet for some reason.Despite my effort to keep the API intact I suggest bumping the major version number, because this patch might break some existing code integrations (e.g if somebody was using the auth module that is exported in
lib/index.js
)Fixes #254
FYI: This PR does not contain any optimisation, just pure implementation of Signature v4