Are there any ways to limit the operations performed by a Spaces API key?

July 30, 2019 120 views
DigitalOcean

Particularly, I would like to limit the ability of the API key to delete files on spaces.

Since the API key has administrative access on Spaces, it is difficult to convince developers to bundle it into native clients like mobile apps.

Other storage frameworks (like GCP and AWS) can limit the actions allowed to be performed by an API key, or better yet limit the domain or the app package that the requests are coming from.

My current solution is to proxy requests from clients and perform the actual API calls with the key on the proxy server. However, since my project allows users to upload large files onto Spaces, the proxy configuration will incur double the amount of bandwidth charges.

Are there any ways to limit the operations performed by a Spaces API key?

1 Answer

Hi there @hsaremac,

At this time there are limitations to our Spaces Access Keys. There is a community suggested idea that you can show your support on asking for more robust access keys. This is something our product team is evaluating so additional feedback there won’t hurt!

https://ideas.digitalocean.com/ideas/DO-I-320

With regards to a workaround in the meantime, using Team Accounts with separate Access Keys + Spaces will help divide up your Spaces/Access Keys into usable groups.

Hope that helps!
- Matt.

Have another answer? Share your knowledge.