Approvals

How a snapshot that a rule holds for approvals gets them, how many are needed, who may approve, and how to decide in the web app, the API and Slack.

An approval request is Wardn's record that one snapshot is waiting at one deployment because a rule asks for people to approve it. People who hold the approval duty there decide on it. When the approvals are enough, the snapshot is released once, and it goes to the cluster. Nobody approves their own work: the person who raised the request never counts, and nobody can approve for them.

Approvals are the people part of a guardrail or a pipeline stage. The rule says how many and from whom; this page is about what happens after it holds a snapshot. If the rule is wrong for a place, an exception leaves the place out. If the rule is right and you need to pass it once, ask for a bypass.

When a request opens

Wardn judges a snapshot every time it is about to arrive at a deployment: a push to the tracked branch, a promotion, a step of a release, and a restore. If the decision holds the snapshot and at least one requirement that holds it asks people to approve, Wardn opens a request and keeps it open next to the snapshot. If nothing asks for an approval, no request is opened.

  • One request per snapshot, per deployment and per action. Asking again changes nothing. A restore has a request of its own, so an approval of a release never counts for a restore of the same snapshot, and a restore's request is spent when the restore it released has run: the next restore asks again.
  • A newer snapshot supersedes it. When the deployment gets a newer snapshot, the older requests close as Superseded, whoever asked is told, and they can no longer be approved (409 approval.snapshot_changed). Approve what is current.
  • A rule that cannot be judged yet opens nothing. If a fact is unknown, such as a ticket system that is down, the decision is wait, not needs; Wardn asks again and opens the request when the rules can say what they need (Guardrails).
  • Every decision is stored. The request links to the stored decision that held the snapshot, with the rule versions and facts it read, and Activity records approval.requested.

Who raised a request is decided by what arrived. A person's promotion, release or restore is raised by that person. A push is raised by whoever pushed, and GitHub names them by login: link the login to a member (PUT /github/logins/{login}, needs integration:manage) and that member cannot approve what they pushed. A push by a login nobody is linked to is held until it is linked, because Wardn cannot know the approver is not the pusher. Linking and unlinking are recorded in Activity (github.login_linked, github.login_unlinked).

How many approvals, and from whom

Approval requests open for guardrail requirements. A stage's own approval rule holds an arrival but does not open a request today, so put the approval in a guardrail. The rules decide, and the strictest wins: with a guardrail asking for two approvals and a stage asking for one, two are needed. These are the requirements that ask people to approve, in the words the screens use:

RequirementWhat it needs
At least N approvals (approval, 1 to 10; stage rule 1 to 20)N approvals from people. Agents never approve, so every approval is a person's whether or not humanOnly is set.
Security approval or Compliance approval (group_approval)At least one approval from a member of the team named Security or Compliance (the name is matched without regard to case). The approval counts toward the group of the person whose duty it was.
Approver can't be the requester (different_approver)Already how approvals work. The rule makes it visible in the request, and in the Evaluator.
At least 1 approval unless an open Sev 1 or 2 incident is linked (approval_unless_incident)For a restore: an approval, or an incident linked at the restore dialog stands in for it.

Only approvals count; declines do not. A person decides once, and covering for someone does not give a second vote: if Dana approves for Chris while Chris is away, neither Dana nor Chris can add another approval to that request.

The guardrail editor writes these: Requires › Add requirement › Approval, then Edit to set Approvals. A scope that names the production environment class makes every production deployment ask.

Conditions are recorded, not enforced

An approval can carry a condition (up to 500 characters), such as "Pause after the canary wave for my confirmation". Wardn stores it, shows it on the request and on the release, and writes it to Activity. Nothing in the release workflow reads it yet, so the condition is a note to the next person, not a rule. To make a release stop after a wave, give the wave a manual gate.

Who may approve

A person may decide on a request when all of these hold:

  1. They hold release:approve at the deployment: a Team lead or Team owner of the team that owns the app, an Owner, or someone granted a role that has the duty on that place. An Admin does not hold it by default. See Roles and grants for how to designate approvers, including with an end date for cover.
  2. They are a person: signed in, or using an API token that is allowed the duty there. An agent can propose, but never approves. The refusal is 403 approval.person_only.
  3. They did not raise the request, and the person they would approve for did not either (403 approval.requester_excluded).
  4. They have not already decided on it (409 approval.already_decided).
  5. The request is still open.

Or they may decide because someone who holds the duty has delegated it to them for a period. The approval then names both people.

Every request tells the caller whether they may decide and, when not, why: "You raised this request, so you cannot approve it", or "You do not hold the approval duty here. An owner can designate you, or someone who holds it can delegate it to you". Someone who cannot read a deployment gets 404 for its requests, as everywhere else in Wardn; someone who covers for a person who can read it can read them too.

Decide in the web app

Open Approvals in the sidebar. It has three tabs: Releases (approval requests, including restores), Sign-offs (qualification sign-offs, a different duty) and Bypass requests (bypass). The count on each tab is what is waiting.

On Approvals › Releases, find the request. The quick filters are Waiting on me (you may decide it for yourself), My groups (you may decide it by covering for someone), Over 4h and Decided. Filters narrows by environment and by who requested it, and the search box finds a deployment, snapshot or person. Each row shows the deployment, who raised it, the commit, the route, You'd satisfy (the first thing the rules ask for and how many approvals are given), and how long it has waited.

Choose Review. The page shows What moves (the apps that change against what the deployment runs now), Request (the change type, change ticket, deployment, environment, action, who and when), and All approvals on this snapshot: every requirement the rules ask for, who set it, and who has given it, with each person's note, condition and, for a covered approval, whom they approved for.

Under Your decision, choose Approve or Decline. A decline needs a comment, which the person who raised the request sees; the snapshot stays held. Choose the button at the foot of the page.

If you cannot decide, the page says why in place of the buttons: "You can view this, but not decide it." When your approval is the last one needed, the snapshot is released at once; the page returns to the inbox and the request shows Approved.

Sample data on the page

The Agent's read column and the Waiting elsewhere table on the inbox are sample data. Agent reads arrive with the agents work, and approvals that live in an external system are not synced yet. Neither changes what you can decide.

Decide with the API

api() { curl -fsS -H "Authorization: Bearer $WARDN_TOKEN" -H 'Content-Type: application/json' "$@"; }

# What waits for me to decide
api "$WARDN_API_URL/api/v1/approvals?state=open&decidable=true" \
  | jq '.items[] | {id, deploymentId, snapshotId, requestedBy: .requestedBy.name, needs: [.needs[].label], given: .counts.approvals}'

# The request of one snapshot at one deployment: the approvals so far, what the rules say now, and whether I may decide
api "$WARDN_API_URL/api/v1/deployments/$DEPLOYMENT_ID/snapshots/$SNAPSHOT_ID/approval" \
  | jq '{id, state, outcome, decide}'

# Approve, with an optional condition
api -X POST "$WARDN_API_URL/api/v1/approvals/$APPROVAL_ID/decisions" -d '{
  "decision": "approve",
  "note": "Checked the migration plan"
}'

# Or decline: a note is required
api -X POST "$WARDN_API_URL/api/v1/approvals/$APPROVAL_ID/decisions" -d '{
  "decision": "decline",
  "note": "The change ticket does not mention the schema change"
}'

GET /approvals lists the newest 200 requests at deployments the caller reads or covers, with state (open, superseded, used), deploymentId and decidable filters. Each request carries:

FieldMeaning
needsWhat the rules ask for, in their own words, and the guardrail that asks.
approvalsEach decision: who (by), whose duty it was (forPerson), the condition, the note, the groups it counted toward and the delegation it rests on.
countsThe approvals given, and how many came from the security and compliance groups.
outcomeWhat the rules say now: allowed, needs, wait or blocked. Empty in a list.
decideWhether the caller may decide (can), why not (reason), and whom they would approve for (forPerson).
releasedAtWhen the snapshot was released after enough approvals.

Reading needs release:read at the deployment. Deciding needs release:approve, or an active delegation. A decision is idempotent with an Idempotency-Key header. A decision is refused with 409 approval.snapshot_changed when the deployment has a newer snapshot.

What happens when the approvals are enough

Wardn judges the snapshot again, as the person who raised it, and delivers it only when nothing holds it any more. The approval is not a master key: a freeze, a branch rule or another guardrail that holds the snapshot still holds it, and you can see that in the request's outcome. Whoever finds the rules met first releases it, so two people approving at the same moment hand it over once. If the hand-over fails, you get 503 approval.release_failed: your approval is recorded, and the next decision, or a bypass, tries again.

For a release, the wave that waited for approvals continues, and the release's detail page shows Approved by the people who gave them. For a restore, the restore goes ahead.

Approve from Slack

With Slack connected, an approval request is posted to a channel with an Approve button. A click is you approving, never a bot: Wardn finds you by your Slack email, applies the same checks as the web app and records it under your name with the note "From Slack". The people who may approve are also told in the app by notifications, and the person who raised a request is told when it is decided.

What is recorded

Activity entryWhen
approval.requestedA request opened for a held snapshot.
approval.approved, approval.declinedA person decided. When someone covered for another, the entry names both and the delegation.
approval.satisfiedThe approvals were enough and the snapshot was released.
approval.supersededA newer snapshot closed the request.

These are also events (approval.requested, approval.decided, approval.superseded) that Slack routes and your own tools can follow.

Permissions

ActionPermission
See approval requests, a snapshot's request and the people who decidedrelease:read on the deployment
Approve or declinerelease:approve on the deployment, or an active delegation of it
Link a GitHub login to a memberintegration:manage

Next

Related: Guardrails, Stage rules, Roles and grants, Held snapshots.

On this page