Orkena
▸ Browse docs — Reference

▸ SECTION D · Reference

Policy DSL reference

Last updated: 2026-08-16

Policy packs are written in Cedar — the AWS-published authorization language — and evaluated in-process by Cedar’s Rust evaluator via cedarpy bindings against proposed actions. Packs validate against the meridian-v1 schema and pin it with a // schema: header. For the semantics (authorize-before-execute, deny as control, verdict routing), see Policy packs; for a hands-on walkthrough, see Build your first policy pack.

Core constructs

permit / forbid

permit (principal, action, resource) when { <condition> };
forbid (principal, action, resource) when { <condition> };

forbid takes precedence over permit. Verdicts: permit, deny, or hold (hold is an Orkena extension routing to a human gate).

Action sets

action in [Action::"invoke_tool", Action::"call_model"]

Conditions

when { resource.side_effects == "irreversible" && context.tainted }
unless { resource.owner == principal }

Supported operators: ==, !=, &&, ||, !, in, has, string and numeric comparison.

Context fields

FieldMeaning
context.taintedProvenance: content derived from untrusted source
context.secrets_presentModel prompt contains secrets
context.regionData residency label
context.timeUTC timestamp

Resource fields

FieldMeaning
resource.side_effects"irreversible" / "reversible" / "read_only"
resource.typeTool / model / credential / edge
resource.data_labelsPHI, PII, genomic, research-only…

Example pack

// baseline-security v3
forbid (
  action in [Action::"invoke_tool"]
) when {
  resource.side_effects == "irreversible"
  && context.tainted
};

forbid (
  action in [Action::"call_model"]
) when { context.secrets_present == true };

permit (principal, action, resource) when { context.trusted };

Hold extension

hold (principal, action, resource)
  when { resource.side_effects == "irreversible" }
  requiring { quorum: 2, roles: [ops_lead, compliance] };

What-if simulation

Every pack change can be simulated against past runs before activation — the simulator reports the verdicts the pack would have produced, without touching the historical ledger.

Was this helpful?