How service accounts differ from user accounts
Service accounts can’t sign in interactively, so the user list hides them by default. They still appear as members of their groups, and you can add them to groups from Add Members. They exist only to hold API keys.
Create a service account
1
Open the Service Accounts page
In Datafold, go to Settings → Service Accounts and click Create Service Account.
2
Fill in the form
3
Create the account
Click Create. The account appears in the list immediately. It has no API keys yet.
A service account with no groups would have no permissions, so the form requires at least one. If you need a different permission set, create a group under Settings → Groups first.
Issue API keys
In the Service Accounts list, click API Keys on the account’s row. A service account can have up to 50 active API keys. This is higher than the per-user limit, so you can issue one key per CI environment, region or deployment. Each key has:- A name to identify it.
- An optional description for your own reference.
- An optional expiration of 1 to 365 days. Leave it unset for a key that doesn’t expire.
Use a service account API key
Use a service account key the same way as a personal API key. Include it in theAuthorization header:
<DATAFOLD_HOST> with your Datafold URL. See Datafold REST API for the full authentication reference.
Lifecycle
You can revoke a single API key from the API Keys dialog without affecting the account. Use this to rotate one leaked key.
Permissions
A service account has the combined permissions of all its groups. To change what a service account can access, do one of the following:- Change the account’s groups under Settings → Service Accounts. Only admins can do this.
- Change what a group can access under Settings → Groups. Every account in that group, human or service, picks up the change.
admin group.
Best practices
- Use one service account per automation. Create separate accounts for CI, for your ETL scheduler and for each third-party integration. Audit logs then show which one did what, and you can rotate or disable one without affecting the others.
- Scope with groups. Give a service account only the groups it needs. A CI-only account doesn’t need access to production monitors.
- Name keys after where they run. For example, a
ci-botaccount with keys namedgithub-actions-prodandgithub-actions-staging. This makes rotation easier. - Revoke single keys when something changes. When a CI runner is decommissioned, a deployment region is retired or a secret may have been exposed, revoke that key instead of the whole account.
- Disable instead of delete for temporary pauses. Deleting is permanent. Disabling is reversible.
