CloudVE / cloudbridge

A consistent interface to multiple IaaS clouds; in Python.
https://cloudbridge.cloudve.org
MIT License
113 stars 51 forks source link

Allow users to create signed urls with write permissions #294

Closed FabioRosado closed 2 years ago

FabioRosado commented 2 years ago

Fixes #293

This is a draft PR to allow users to generate signed URLs with write permissions. I was a bit unsure on what to name the parameter, I was torn between:

Initially, I was implementing an ENUM so users could specify their permissions, would that be preferable? I decided against it after giving it some thought since perhaps accepting a bool would make it easier to work with the generate_url method, but I'm happy with either as long as we have some docs for it.

One thing that is missing from this PR is testing, I'm planning to reuse the test_generate_url test that we have and push the content with the URL then check that it's there.

So far I've tested this with GCP and seems to work fine, but I want to do a bit more manual testing as well

nuwang commented 2 years ago

I was going to suggest writable as an alternative, but this all looks great to me.

FabioRosado commented 2 years ago

I like writable! I’ll change it thank you!

FabioRosado commented 2 years ago

Finally got time to keep working on this and finished off the implementation of #293, I've manually tested this in GCP and AWS and works as expected.

I don't have an OpenStack account so I can't test it fully and need to get new creds for Azure to test it with Azure but from the three Azure might work fine since its just a permissions thing that we need to pass when generating the URL :smile: )

nuwang commented 2 years ago

Thanks for making these changes so quickly @FabioRosado. I'll merge this in and prep for release.