Security best practices for dev and prod API tokens for editing DNS for a single zone
Hello! I have example.com and dev.example.com, which are respectively my dev & prod environments.
Is it in any way possible to restrict the Cloudflare's DNS API token to a specific subzone/subdomain (
I am wondering how others deal with this in their dev/production environments. I guess most of users are orange-clouded and hence Cloudflare provisions your certificates, but what if you need to edit DNS from within your dev/prod infra? How do you manage it?
- dev.example.com, app.dev.example.com and a bunch of other domains with
dev.example.comas a root point to a development cluster, which all developers have access to (including secrets etc). - example.com, app.example.com point to an isolated production cluster.
Zone:DNS:Edit) BUT this token gives access to entire zone (including production DNS), while I ideally need to restrict it to only allow to edit *dev.example.com DNS records.Is it in any way possible to restrict the Cloudflare's DNS API token to a specific subzone/subdomain (
dev.example.com)? As otherwise, in my case, anyone who has access to a dev cluster can edit production DNS records.I am wondering how others deal with this in their dev/production environments. I guess most of users are orange-clouded and hence Cloudflare provisions your certificates, but what if you need to edit DNS from within your dev/prod infra? How do you manage it?

