Service accounts and tokens¶
Automation that borrows a person's sign-in breaks when they leave and blurs the audit log. Vidai gives scripts two ways to manage it through its API, each with its own tokens, and one rule that never bends: a token can never do more than the account it belongs to.
| Personal access token | Service account token Enterprise | |
|---|---|---|
| Acts as | You | The service account, a system of its own |
| Made from | Your account › Personal access tokens | Who › Service accounts, the account's Tokens tab |
| What it may do | What you choose, within what you may do; choose nothing for everything you may do | What you choose, within the account's roles; choose nothing for everything the account may do |
| How long it lasts | 7 days, 30 days, 90 days (the default) or 1 year | Up to a year |
| In the audit log | As you | As the service account |
| Edition | Community and Enterprise | Enterprise, when your licence includes service accounts |
Both secrets are shown once, when the token is made; after that only their first characters show. Revoke stops a token at once.
Why a token never does more than its account¶
A token carries a choice of what it may do, but Vidai checks every call against the account behind it as well. If you lose a role, every token you made loses it at the same moment. A service account's token reaches only what its roles reach, and giving a service account a role waits for a second admin on Approvals, so automation is never given power quietly.
Service accounts' roles¶
A service account holds roles like a person: on the organisation, on a team, or as owner of something. It belongs to a team or to the whole organisation, and has owners who look after it. Organisation admins see every service account and every API token in the organisation, people's included, on Every API token. Group admins look after the service accounts of the teams they run.
Disable revokes every token at once; enabling it again doesn't bring them back. Delete ends its tokens and roles; what it did stays in the audit log.
On Community, or when the licence changes¶
On Community there are no service accounts: use a personal access token. If a licence stops including service accounts, their tokens stop working, but the accounts and their roles stay; licensing again brings them back.