Skip to content

Simulate a policy decision

Policy simulation answers “would this exact request be allowed?” against a specific policy version, without affecting live traffic. Use it to validate a change before publishing, or to understand why a real call was denied.

Provide the principal, action, resource, and context — the same four inputs Cedar evaluates — and get back the decision, the matched rule, and the policy version.

Simulate whether a request is allowed
gatewayctl simulate-policy \
--user user_ada --agent sales-contract-agent \
--client-surface external-chat --environment prod \
--server legal-contract-review --tool contract_read \
--policy-version cedar-policy-v3 --format json

Every gatewayctl verb accepts --format text|json.

When a real call is denied, turn its stable machine reason into a human‑readable diagnosis — the matched (or missing) rule, the policy version, and safe context, with no payloads or secrets.

Diagnose why a request was denied
gatewayctl diagnose-deny invalid_auth_context

Every gatewayctl verb accepts --format text|json.

Type set in Geist, Source Serif 4, and Departure Mono.