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:
- Read an outcome from a policy annotation such as
@outcome("ask_human"). - Keep outcomes outside Cedar, in a rules table.
- 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.
forbidstill overridespermit, so a hard limit is one policy that applies to every action. - Default deny gives
blockfor 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.