RiskboundDocs

Architecture

ADR 0002: Four outcomes from three Cedar actions

Date: 2026-12-01. Status: accepted.

Context#

Riskbound has four outcomes: allow, ask a human, dry run, block. Cedar returns allow or deny for one request.

Options considered:

  1. Read an outcome from a policy annotation such as @outcome("ask_human").
  2. Keep outcomes outside Cedar, in a rules table.
  3. Model each outcome as its own Cedar action and ask in order.

Decision#

Option 3. Three actions: act, act_with_approval, dry_run. The engine asks about them in that order and returns the first that is permitted. If none is, the outcome is block.

Why#

  • It uses Cedar as designed. forbid still overrides permit, so a hard limit is one policy that applies to every action.
  • Default deny gives block for free. Nothing has to be remembered.
  • Policies stay readable: the action name says what the policy grants.
  • Annotations are metadata. Putting behaviour in them would bypass Cedar's validation.

Consequences#

  • Up to three evaluations per decision. Measured at about 0.3 ms each in Node, so the cost is small next to the network hop.
  • Policy authors must learn three action names. The first use case documents them.