Permissions: who can do what
Everything you do in an account is checked against your role in it. A role holds a set of named permissions; an operation needs one permission, and is refused when your role does not hold it. The refusal says which role you have and which permission was missing.
What each role may do
| Permission | What it allows | owner | maintainer | developer | reporter | operator |
|---|---|---|---|---|---|---|
agents.read | read agents, drafts, versions and releases | yes | yes | yes | yes | yes |
deployments.read | read environments, rollouts and their history | yes | yes | yes | yes | yes |
promotions.read | read promotions | yes | yes | yes | yes | yes |
agents.create | create an agent | yes | yes | yes | ||
agents.update | edit a draft; build a preview version of it | yes | yes | yes | ||
versions.publish | publish a version | yes | yes | yes | ||
agents.deploy | apply a rollout to dev or staging; ask for production | yes | yes | yes | ||
evaluations.record | record the evidence a promotion relies on | yes | yes | yes | ||
promotions.request | ask for a promotion, and withdraw your own | yes | yes | yes | ||
promotions.review | approve or reject a promotion | yes | yes | |||
deployments.manage | stop an environment serving an agent | yes | yes | |||
environments.manage | turn staging on or off; change who approves promotions into an environment | yes | yes | |||
audit.read | read the audit trail | yes | yes |
Three rules sit on top of the table:
- Nobody may approve a promotion they requested themselves.
- Production is only ever changed through an approved promotion.
- An environment can be stricter than the role. Holding
promotions.reviewis necessary, but the environment also names the roles whose members may decide, and how many approvals it needs (see below).
Who approves promotions into an environment
Each environment, stg and prod, carries a promotion policy. Production is gated by default; the others are not.
| Setting | Meaning | Default for prod |
|---|---|---|
requireEvaluation | a passing evaluation of the release in the previous environment is needed | yes |
requireApproval | a promotion waits for people to approve it | yes |
approvers | the roles whose members may approve or reject | owner, maintainer |
minApprovals | how many different people must approve (1 to 5) | 1 |
progressDeadline | how long a deployment may stay Degraded before it fails, for example 5m (0s fails at once, at most 24h). Within it a Degraded report is a condition, not an outcome, so one failed probe does not fail a production promotion for good | 5m |
A person with environments.manage changes it with an Environment file:
apiVersion: robotelos.io/v1
kind: Environment
metadata:
name: prod
spec:
promotion:
requireEvaluation: true
requireApproval: true
approvers: [owner, maintainer]
minApprovals: 2
With two approvals, the first one is recorded and the promotion keeps waiting (awaiting_approval (1 of 2 approvals)); production changes only when a second, different person approves. One rejection ends a waiting promotion. If you change the policy while a promotion waits, it is decided under the new policy. Every change of policy is in the audit trail.
Ask before you try
robotelos can-i promotions.review # yes, or: no: your role (developer) does not hold promotions.review
robotelos can-i # your role and everything it may do
robotelos can-i agents.deploy -o json
can-i exits with an error for “no”, so a pipeline can stop early:
robotelos can-i agents.deploy && robotelos apply -f rollout-dev.yaml
The same answer is available to the console and to your own tools as GET /api/v1/accounts/{account_id}/permissions.
Changing what a role may do
What a role may do is data, not code: it is the role_permissions table of the control plane’s database, and a change takes effect at once for everyone with that role. Today that table is changed by whoever operates the database. Letting an account owner grant permissions to roles in their own account, and naming the approvers of an environment, are designed but not built yet.
Next steps
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.