Report this

What is the reason for this report?

Will more fine grained API token scopes available?

Posted on November 9, 2016

Currently there are only two scopes for the API tokens, read-only and read-write, but this tokens are extremely dangerous as they affect all the resources in the account without restrictions. For example, create a million droplets or delete all of them.

It would be more desirable to have more control over the scope by choosing the resources it will operate on, i.e. droplets, volumes, floating IPs, etc. And a quota to limit their blast radius in the case of a security incident.

Are we getting something like this anytime?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I agree it is absolutely a good idea and something that has been discussed internally. I am not aware if it is currently on the roadmap and would definitely encourage adding/voting for it on our uservoice site. Uservoice votes play a big role in what features are prioritized.

To be honest, this sounds is great idea. For now we are only limited with Read/Write privileges, maximum Droplet limit and 5000 request per hour which is pretty high.

Maybe @ryanpq can give us more insight on this, if he’s able to get more info. :D

In meanwhile, you can submit your idea on DigitalOcean’s UserVoice. :)

Hi there,

A quick update here, custom scopes for DigitalOcean API Tokens is now in beta!

This API token enhancement provides additional flexibility in protecting your cloud resources by letting you select only the necessary scopes.

Please fill out this form if you are interested in participating in the beta..

Custom scopes introduce more specific permissions, like creating Droplets or updating cloud firewalls. Using custom scopes lets you secure your workflows by granting only the permissions the token needs and restricting access to other resources and actions.

Generally, the CRUD scopes map to equivalent actions on the associated kind of resource:

  • Create scope lets you create the resource type and perform additive actions within that resource type. For example, database:create lets you create database clusters and create new users or databases within that cluster.

  • Read scope lets you view information about a resource by type and also view information that the resource returns. For example, app:read lets you view App Platform apps and their logs.

  • Update scope allows you modify a resource type and perform actions that would otherwise modify a resource. For example, droplet:update lets you power a Droplet on or off.

  • Delete scope lets you delete a resource by type and perform actions that delete information about the resource type. For example, database:delete lets you delete databases from a database cluster and remove existing users from a database.

Each custom scope correlates to one public API endpoint.

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.