cocoapods-downloader icon indicating copy to clipboard operation
cocoapods-downloader copied to clipboard

Download file from a private S3 bucket

Open azalan opened this issue 8 years ago • 3 comments

We have private pods which references to vendored_frameworks stored on a private Amazon S3 bucket. We do not want to make these files public, so we have to provide the necessary authentication information to Amazon.

Currently curl does not support Amazon authentication (.netrc seems to be insufficient for this) and they do not plan to add support for it. Amazon has an authentication tool for curl, which is a Perl wrapper around curl and cannot be applied to our scenario. We could also add the necessary information as url query parameters in the podspec, but it is not an option as well.

Based on the amazon docs, support requires to add a per-request Authorization header (it contains the request hash signed with the AWS secret).

What would be the best way to add support for this?

azalan avatar Oct 27 '16 12:10 azalan

I would probably start with a plugin, since you'll probably want to use some kind of gem to help with the S3 legwork. https://github.com/CocoaPods/cocoapods-plugins

benasher44 avatar Oct 28 '16 13:10 benasher44

@azalan Any luck with this? I am facing the same problem and based on this thread will look into a plugin that builds the authorization header given supplied AWS credentials.

Edit: @benasher44 After looking into the plugin option I'm a bit confused as to how a plugin could be used here.

The plugin could handle downloading the source from the private s3 bucket using AWS credentials, but what then? What is different about running pod install after having done that? What else does the plugin need to do other than just download the source from the private s3 bucket?

Ultimately I would love to be able to use source files in a private s3 bucket and just type pod install (or very similar.)

Thanks!

sealz avatar Feb 08 '17 21:02 sealz

To everyone landing here, I did a plug-in to this scenario: https://github.com/samuelabreu/cocoapods-s3-download

samuelabreu avatar Jun 21 '20 12:06 samuelabreu