Skip to content
GigadriveDocs

Scopes

The permission catalogue a Gigadrive token can carry, and how each request is checked against it.

A scope is the unit of permission on a token. Every API route names the one scope it requires, and a token without it is refused before any lookup happens.

OIDC scopes

ScopeGrants
openidAn ID token, and access to the UserInfo endpoint
profilename, family_name, given_name, nickname, picture, updated_at
emailemail and email_verified
offline_accessA refresh token, valid for 30 days

Platform scopes

ScopeGrants
platform:organizations:readRead organizations, their members, and their product access
platform:organizations:writeCreate an organization, on a user token only
platform:api_keys:readList an application's API keys, without secrets
platform:api_keys:writeCreate an API key
platform:api_keys:deleteRevoke an API key
platform:organizations:deleteValid scope string, but no endpoint requires it. Organizations cannot be deleted.

Gigadrive Network scopes

They all follow network:<resource>:<action>.

ResourceActions
applicationsread, write, delete
deploymentsread, write, delete, trigger
env_varsread, write, delete
storage_bucketsread, write, delete
storage_objectsread, write, delete
storage_s3_credentialsread, write, delete
requestsread
sticky_sessionswrite
image_optimizationread, purge
runtime_cacheread, write, revalidate
ai_gatewaychat, models, usage:read, budgets:read, budgets:write, policies:read, policies:write

network:applications:delete is a valid scope string that no endpoint requires today, like platform:organizations:delete.

A scope is not an entitlement

Product access describes what that second check resolves.

Scopes bound to an application

Five AI Gateway scopes behave differently at authorization time: network:ai_gateway:usage:read, budgets:read, budgets:write, policies:read and policies:write. They govern spend and model policy for a whole organization, so the OAuth client must be bound to a Gigadrive Network application and the signed-in user must have access to that application's organization before consent or token issuance can proceed. Requesting one from an unbound client fails the entire authorization request rather than dropping the scope.

The gigadrive CLI leaves those five out of its login scopes for that reason, and asks for network:ai_gateway:chat and network:ai_gateway:models instead.

Legacy names

Scopes used to be un-namespaced: deployments:write, api_keys:read, ai_gateway:chat. Those strings are still accepted and map one to one onto the canonical names, so old tokens and old configuration keep working. Write the canonical form in anything new.

Choosing a set

Ask for the narrowest set the job needs, then check it. An API key inherits nothing by default beyond network:env_vars:read, and it can never be granted more than the token that created it holds. API keys covers those rules, and Authentication shows which scope each endpoint names.