indico / indico-plugins

Indico plugins developed by the Indico team
MIT License
28 stars 44 forks source link

Add an S3 storage plugin #61

Closed ThiefMaster closed 5 years ago

ThiefMaster commented 6 years ago

(Brainstorming - comments welcome!)

This storage plugin (storage_s3) would use boto3 (or any other well-maintained AWS/S3 client) to implement a storage backend (s3:...) for attachments etc. backed by S3.

Some functionality the plugin should have:

While we will most likely use Ceph's S3 API at CERN - also for testing/development - we should make sure the backend works fine with the "real' Amazon S3 as well. The free trial account might do the job, since it includes S3 storage as well.

Useful docs link: http://boto3.readthedocs.io/en/latest/guide/s3.html

ThiefMaster commented 6 years ago

@mvidalgarcia suggested libcloud which looks VERY nice in terms of its Python API - when using that the plugin would be a generic cloud storage plugin instead of being S3-specific.

The only real drawback I see is that it seems to lack an equivalent of boto3's generate_presigned_url() method that generates a temporary public URL to download a specific file. While it might not be too hard to implement the signature generation, it would be problematic when used with something that isn't S3...

cloudstorage looks good as well, but unfornately it supports only Python 3. Besides that, it has hard dependencies against all the various cloud storage client libraries which isn't amazing since it pulls in a ton of new packages (especially for Azure). BTW, their docs indicate that libcloud does indeed lack support for generating signed URLs:

Generate temporary signed URLs for downloading and uploading files.