Skip to main content

One post tagged with "tokens"

View All Tags

Scoped API Tokens: Least Privilege for Every Integration

· 8 min read
FoundryDB Team
Engineering @ FoundryDB

Most teams end up with the same API token wired into half a dozen places: the CI pipeline, a monitoring dashboard, a backup script, a Terraform run, and a one-off cron job someone wrote last year. Every one of those tokens can do everything the platform allows, including deleting your production database. That is a lot of blast radius for a token whose only job is to read a metrics endpoint.

Scoped API tokens fix this. A token can now carry a set of scopes that restrict exactly which resource families it can touch and at what level. A monitoring dashboard gets a token that can only read services. A backup script gets a token that can only manage backups. The token that can delete a database stays in a human's password manager, where it belongs.

Scoped token enforcement
VERDICT token: services:write + backups:read
Scoped Tokenservices:write · backups:readauthorize →
services:read200services:write200services:admin403backups:read200backups:write403
Organization (mints)Scoped tokenGranted scopeAPI authorizer200 allowed403 insufficient_scope