← Changelog
NewApps

API keys and environment tokens that carry a role

A key linked to an app can now be held to a role in permissions.ib.ts, a store and session values, so it can go to Zapier, n8n, a contractor or another vendor: it reaches the app's records, actions and queued jobs as that role, and nothing else. Settings → API keys also makes role-bound environment tokens.

The role comes first: x-ib-role, x-ib-shop and x-ib-session can narrow a bound key or token to fewer of its roles or its own store, and a header that would widen it is refused with 403 policy_denied. Keys linked without a role, and the environment's own token, keep full access, so nothing changes for them.

A bound key or token doesn't reach files, deploys, events, settings or the queue's list, and the environment's MCP server gives it only the data tools, each through the role's grants. A key with Apps Permissions reaches every app in full, so it can't be linked with a role. A role-bound token can't be revoked on its own: for anyone outside the team, link a key, which you can unlink.

More in Keys and tokens with a role.