Firewall docsPolicy & detection

Build a policy

Open any policy to edit it in the guided builder. The builder groups every control into four collapsible areas so you can reason about a policy the way it is enforced — grants first, then guardrails, then detection, then the advanced conditions most policies never need.

The guided policy builder showing access grants for models, tools, and data scopes.
The guided builder. A plain-language summary at the top, then Access grants, Guardrails, Detection rules, and Advanced.

Access grants

What the policy lets its users reach. Each is an allow-list; anything omitted is denied.

GrantControls
ModelsThe AI models the policy may call, e.g. claude-sonnet-4-5, claude-haiku-4-5. A frontier tier adds larger models; a restricted tier lists only a small fast model.
ToolsThe tools and app functions the policy may invoke, e.g. kb.search, report.generate, data.query.
Data scopesThe data the policy may touch, expressed as scope patterns, e.g. kb:*, reports:*. Wildcards grant a family; specific scopes narrow it.

Guardrails

What the policy refuses, independent of what it grants.

GuardrailControls
Blocked topicsSubjects the policy will not discuss, e.g. compensation, mnpi. A denied topic stops the request regardless of model or tool.
PII policyHow personal data in a prompt or response is handled: log record it, redact strip it before it leaves, or block stop the request.
Runtime modeblock enforces — a denied request is stopped. monitor observes — the same request is recorded but allowed through, so you can roll a policy out in dry-run before enforcing.

Roll out in Monitor first. Publish a new policy in monitor mode, watch Activity for a few days to confirm it only stops what you intend, then switch it to block. No user is ever surprised by a policy you haven't observed.

Detection rules & Advanced

Detection rules attach managed and custom rule packs to the policy — the secret, PII, and injection detectors covered in the next section. Advanced holds the controls most policies leave at their defaults:

  • Explicit denies — tools or scopes to refuse even if a broader grant would otherwise allow them.
  • ABAC conditions — the when expression that binds the policy to its groups, plus any attribute predicates the request must satisfy.
  • Budgets — spend caps such as tokens_per_day and requests_per_minute, enforced per policy.

Authoring with AI

Edit with AI turns a plain-language instruction ("let contractors read the knowledge base but never call data tools") into a structured proposal. The proposal is always a draft — a human reviews and activates it. AI can propose, but it cannot silently publish an enforcing change.

Try it — how the pieces combine

Configure a policy on the left, send a test request on the right, and watch the verdict update live. Every grant, deny, and guardrail feeds one decision — this simplified example illustrates the model, tool and topic gates. It does not run OPA or change a live policy.

Policy
when: identity.attributes.group == "SG-AI-AllUsers"
Models — allowed to call
Tools — allow · off · deny
kb.search
data.query
report.generate
wire.process
Blocked topics
Runtime mode
Test request
Model
Tool
Topic
Allowallowed
Compiled OPA data (data.roles)

              

Type to search the documentation.