Skip to content

Service accounts and API tokens

A sync job that signs in as an admin breaks when that admin leaves, and nobody can tell its changes from theirs. Vidai gives your systems their own identity: a service account with its own roles and its own API tokens. People's scripts get personal access tokens that can do no more than the person. Every change either makes is recorded under its own name, and any token can be revoked in one click.

Two kinds of token

Personal access token Service account token Enterprise
For A person's own scripts and tools One of your systems: CI, a nightly report, a sync job
Acts as The person; never more than they may do The service account, with the roles it was given
Made on Your account › Personal access tokens The service account's Tokens tab
Lasts 7, 30 or 90 days, or a year at most Up to a year

Both can be limited to What it may do: Read, Change people and teams, Change roles, Change keys, Change rules, Change organisation settings. Choose nothing and the token may do everything its holder may. A token's secret is shown once; after that only its first characters.

Keys and tokens are different

Key API token
Talks to The gateway The Control room's management API
Does Calls models Manages Vidai: people, teams, keys, rules, settings
Held by A person or an agent A person or a service account

A service account never holds a gateway key, so it never calls models. A key never manages anything.

flowchart LR
    CI["Your CI pipeline"] -- "API token" --> CR["Vidai<br/>(management API)"]
    CR -- "issues a key for" --> AG["Agent"]
    AG -- "Vidai key" --> GW["Gateway"] --> PR["Provider"]

Service accounts Enterprise

A service account belongs to the whole organisation or to a team, says what it's for and who to ask, and has Owners who look after it. Without a role, its tokens read what any signed-in person can and change nothing. Giving it a role (group admin of a team, organisation viewer or organisation admin) always waits for a second admin. Disable revokes all its tokens at once. What Enterprise includes depends on the features your licence includes; if a licence stops including service accounts, their tokens stop but the accounts and their roles stay.

On Community, people use personal access tokens for their scripts.

Service accounts: Looker sync, Terraform (platform repo) and the Ardelle social scheduler, each with its team and when it was last used

Every API token lists each token in the organisation, people's and service accounts', with what it may do, when it was last used and when it expires, so unused and expiring tokens are easy to clean up.