Access
Roles and projects
Control who can do what: admin, member and viewer roles, projects that limit members or viewers to some apps, databases and stores, and API tokens that read only, deploy only, or reach only some projects.
Roles
- Admins do anything: users, invites, the control plane (updates, mail, high availability), git accounts and builds, alert channels, the audit log, and everything members do.
- Members do everything else: apps, databases, servers, the firewall.
- Viewers see what members see, and change nothing but their own account (name, email, password, two-factor, API tokens, signing out). Nor do they read what holds secrets or more: an app's variables (and its previews'), a database's credentials, a terminal in a container.
Roles are given by invite (Settings → Users) and changed there.
Projects
Admins make projects (Settings → Users → Projects) and put apps, databases, stores and volumes in them, or anyone who reaches the thing does (its Settings: Project). An app's previews are in its project (Previews). Deleting a project leaves what was in it in none.
A member or viewer given projects (when invited, or later, from their row in Settings → Users) is limited to them:
- The lists (
GET /api/apps,/api/databases,/api/projects) show only what's in their projects. - An app or database, and its deployments, deploys, builds, domains, backups and replicas' logs, are theirs when it's in one of their projects.
- What they make goes in one of their projects (
project_id, required from them), and they can only move things between theirs. - Their own account is theirs, and they read the version, the servers' names (to place replicas) and the templates' list.
- Everything else is refused (403): servers' pages, traffic, the firewall, alerts, templates' apps, settings.
Someone with no projects reaches everything their role allows. A project can't be deleted while anyone is limited to it: without it, one limited to it alone would reach everything. Admins can't be limited.
Refused requests are in the audit log (Audit log), with what they tried.
API tokens
Each user makes their own (Settings → API tokens, POST /api/api-tokens).
A token does what its owner may, or less:
- Access:
full(the default) acts as its owner.readacts as a viewer: it reads, but not secrets, and changes nothing.deployreads like a viewer and may also start builds and deploys, cancel builds, restart or retry deployments and roll back (POST /api/apps/{id}/deploy,/api/apps/{id}/builds,/api/builds/{id}/cancel,/api/deployments/{id}/restartand/retry,/api/deploys/{batch_id}/rollback): what CI needs, and nothing else.POST /api/apps/{id}/deploytakes an optional{"image": "repo:tag"}that becomes the app's image first, so a pipeline that pushes its own images deploys them with a deploy token. - Projects: a token given projects reaches only those, like a member limited to them (above), whoever made it: an admin's token given projects acts as a member. Only projects its owner reaches can be given; if its owner later loses all of them the token stops working rather than reaching everything.
A token follows its owner's current role and projects, so it never does more than its owner can now. A token that does less than its owner can't make tokens, nor change its owner's account (password, email, two-factor): otherwise it could make itself a full one.