Question

How to restrict token use withint applications of specific IP address?

I am using digital ocean’s python api. I generated a token and successfully created a couple of droplets using snapshots. In order to make the use of the token safer, is there a way to restrict the use of the token from specific ip addresses? In other words,is it possible to add the ip addresses of the machines allowed to use the token? Thanks in advance

Subscribe
Share

Submit an 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.

Hello,

I don’t think that this is currently possible. You could share your idea here:

https://ideas.digitalocean.com/ideas/

What I could suggest in the meantime, is keeping your API key in a separate file, for example, use config.py and then add that config.py file to your gitignore so that the file only gets uploaded to your server.

Regards, Bobby