Skip to content
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

Cloudfront, signed urls and desync ? #222

Open
om26er opened this issue Jul 2, 2022 · 3 comments
Open

Cloudfront, signed urls and desync ? #222

om26er opened this issue Jul 2, 2022 · 3 comments

Comments

@om26er
Copy link

om26er commented Jul 2, 2022

Have anyone tried desync with cloudfront and that too with presigned urls ? OR to rephrase my question what is the recommended way to access caync chunks over S3, should that be an unprotected (no auth) url ?

@folbricht
Copy link
Owner

While I haven't used it with cloudfront, S3 auth is definitely supported. Take a look at https://github.com/folbricht/desync#s3-chunk-stores and https://github.com/folbricht/desync#example-config

@charles-dyfis-net
Copy link
Collaborator

Have anyone tried desync with cloudfront and that too with presigned urls ? OR to rephrase my question what is the recommended way to access caync chunks over S3, should that be an unprotected (no auth) url ?

To come at your question from a different perspective...

Because the chunks are content-addressed, there's no need for an additional signature: If they don't hash to the value in their filename, they'll be recognized as invalid.

Thus, it's only the index that needs to be signed, and one can reasonably choose to use a different distribution method (or add out-of-band signatures with existing solutions -- OpenPGP, Saltpack, etc) there.

@om26er om26er closed this as completed Oct 20, 2022
@om26er om26er reopened this Dec 3, 2022
@om26er
Copy link
Author

om26er commented Dec 3, 2022

I have found a solution. We can easily do that by using Cloudfront's custom policy https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html -- I have also validated that with desync and it works (with a small patch). see #229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants