All policy management happens in the console (or the
/api/workspace/firewall/* management routes, which authenticate with your
session / access token — not a relay sk-orca-… key). Only your
agent’s /v1/* calls use the relay key. Creating, editing, and defaulting
a policy are Developer+ actions; reading the policy list and its
version is open to every Member.1. Branch your posture into a second policy
There is no “fork” verdict or copy button — a policy name is unique per workspace, so the pattern is to stand up a second, independently-versioned policy and diverge it freely without touching the original. Two ways to seed it:Create the new policy, then author its rules
Open Security → Firewall → Policies → New policy. A new policy is
created with no rules and your chosen
default_verdict — author
its rules in the editor (or copy a few over from the source policy by
hand). Give it a workspace-unique name (e.g. prod-firewall next
to staging-firewall).Or apply a use-case template
The Templates gallery (
POST /api/workspace/firewall/templates/apply) creates one new policy plus
all its rules in a single transaction — Coding, Support, RAG, Data,
DevOps, Browser, or Baseline. Faster than hand-authoring when a
template matches.2. The version that bumps on every update
Every firewall policy has aversion integer. It starts at 1 when
the policy is created and increments by one on every update — a rule
edit, a default-verdict change, an enable/disable toggle, a shadow-mode
flip. It is monotonic and never resets.
version doesn’t drive the cache; it’s a monotonic change counter you
read back. When you save a policy and want to confirm the change is live,
re-read the policy and check that version advanced.
The policy
version is a change counter, not a restore point. It tells
you that the policy changed and lets the gateway propagate the edit — it
is not a per-version diff or rollback. For full
versioned history with diff and one-click revert, that capability lives
on Guardrails: GET /api/guardrail/:id/history,
…/history/diff, and POST /api/guardrail/:id/revert (revert is
Developer+). For firewall policies, your audit trail and keeping a demoted
known-good policy in the list are how you preserve a restore point — see
§5.3. Set and move the workspace default
A workspace can mark one policy as the default. Every key without its ownfirewall_policy_id resolves to it
(resolution order).
- Edit a policy and set it as the workspace default. Promoting a new default demotes the old one in the same transaction — there is never a window with two defaults, and never a window with none mid-swap.
- Standing up a second policy is a clean way to roll the default forward: build the new policy, adjust, validate under shadow mode, then promote it. The old default stays in the list, demoted, as your fallback.
4. Enable, disable, and delete
Disable a policy
Disable a policy
Toggling Enabled off stops a policy from resolving. But remember
the firewall fall-through: a key whose attached policy is disabled
falls back to the workspace default — disabling does not take the
key out of firewall scope. To remove a key from enforcement, detach it
(set
firewall_policy_id to 0), don’t just disable its policy. (This
differs from guardrails, where a disabled attachment resolves to
none.)Delete a policy
Delete a policy
DELETE /api/workspace/firewall/policies/:id (Developer+) removes a
policy — but returns 409 if any key still references it. Detach or
re-point those keys first, then delete. This guard is why standing up a
second policy, not in-place rewriting, is the safer way to evolve a
policy that live keys depend on.Names are unique per workspace
Names are unique per workspace
A policy name is unique within a workspace, so a second policy needs a
new name. Use a convention that survives the lifecycle —
staging-firewall / prod-firewall, or a date suffix — rather than
policy-copy-2.5. Audit trail
Every policy create, update (which includes a default-promotion or a shadow-mode flip), and delete writes an audit row — both a workspace row and a central admin row — after the change commits. A failed save (duplicate name, invalid verdict) writes nothing. Rule blobs and secrets are never written to the audit log. So even though firewall policies don’t carry a diff-and-revert history of their own, the audit trail tells you who changed which policy, when, and the monotonicversion tells you how many times it has changed. Pair
that with keeping a demoted, known-good policy in the list, and you have a
practical restore path.
6. Lifecycle at a glance
| Action | Route | Role |
|---|---|---|
| List policies (+ version, counts) | GET /api/workspace/firewall/policies | Member |
| Read one policy | GET /api/workspace/firewall/policies/:id | Member |
| Create policy (no rules) | POST /api/workspace/firewall/policies | Developer+ |
| Apply a template (policy + rules) | POST /api/workspace/firewall/templates/apply | Developer+ |
Update (bumps version) | PUT /api/workspace/firewall/policies | Developer+ |
| Delete (409 if keys attached) | DELETE /api/workspace/firewall/policies/:id | Developer+ |
Where to go next
Create & attach
The first-time setup path — create a policy and point a key at it.
Shadow mode
Roll a new or re-defaulted policy out without changing live traffic.
Firewall + Guardrails
How action policies compose with text guardrails — and where versioned
revert lives.
Scope: keys, policies, workspaces
How attachment and the workspace default resolve.
