Skip to main content

Overview

Simulation takes candidate Rules and replays them against recorded authorization decisions from your audit log. For each historical event, it compares the original decision with the decision the candidate Rules would produce. The output is a set of DecisionDiffs: entries where the allow/deny outcome differs between the current Rules and the candidate Rules. Use simulation to answer questions like:
  • Would this new forbid have blocked any requests that were previously allowed?
  • Does this permit open access to anything that was previously denied?
You can also probe a single synthetic request against the active effective Rules without performing the action. That path returns the decision and the Rule that determined it. Use it when you want a fast check for one agent, action, and resource before you look at historical diffs. Simulation sits between writing Rules and deploying them. Refer to Authorize Access for deploy and rollback. The typical workflow is:
  1. Run a simulation for one agent, action, and resource against the Rules in effect.
  2. Optionally simulate with Agent Act-As or simulate with arguments.
  3. Read results for historical DecisionDiffs when you replay candidate Rules against audit history.

Requirements

Before you begin:
  • Authenticate to Dome and select a workspace
  • Have an active Rule bundle
  • For historical replay, have authorization events available in the audit log

Permissions

Simulation and DecisionDiff reads require rules.view. All workspace roles hold it.

Run a simulation

Simulate an authorization decision for one agent, action, and resource against the Rules currently in effect.
Requires rules.view.
Write or refine the Cedar Rules you want to test before you deploy them:
candidate-rules.cedar
Then run the simulation with the caller, action, and resource you care about:

Simulate with Agent Act-As

Include Act-As claims when your Cedar Rules reference end-user identity and you want to verify behavior for specific profiles.
Requires rules.view.
The Act-As flags populate the act_as record on the principal that Cedar Rules can reference. For example, a Rule that checks principal.act_as.roles.contains("admin") evaluates against the roles you provide. Simulation accepts these claims as test input. Live requests must pass Delegated agents verification before the same values become available to Rules.

Simulate with arguments

Pass per-call arguments when your Rules reference resource.arguments.<key> and you want to verify behavior for a specific payload. Top-level keys of the JSON object become Cedar keys on the resource. Refer to conditions on attributes or arguments for the full shape.
Requires rules.view.
A Rule like resource.arguments.query like "*Atlas*" matches the example below. Keys whose JSON values are unrepresentable in Cedar (fractional floats, null, mixed-type lists) are dropped silently. Rules that reference them will not match.

Read results

DecisionDiffs show where allow/deny outcomes would change between the current effective Rules and the candidate Rules. Each diff entry includes:
  • The original decision (allow or deny) under the current Rules
  • The new decision under the candidate Rules
  • The specific event that produced the diff (agent, action, resource)
  • The Rule that matched in each case
Review diffs carefully before deploying. A simulation that shows no diffs means the candidate Rules produce identical outcomes for all historical events. It does not guarantee behavior for requests absent from that history. Add synthetic simulations for important unobserved cases. Use historical replay to answer:
  • Which previously allowed requests would a new forbid block?
  • Which previously denied requests would a new permit allow?
  • Do the candidate Rules preserve all observed outcomes?
dome_rules_simulate evaluates one request synchronously. dome_rules_simulate_result retrieves the result of a historical replay by simulation ID. Both tools support AI-assisted Rule authoring: an agent writes Rules, simulates them, and iterates on results.

Next steps