- Workspace: master toggle, classifier model, metering, optional proxy pre‑prompt. One per tenant.
- App: thresholds, detectors, custom phrases, custom PII rules, tool policy, forbidden‑provider routing. Many per workspace.
Workspace config
Endpoints
GET /api/runtime-security/config, requiresruntime_security.view.PUT /api/runtime-security/config, requiresruntime_security.firewall.configure. Togglingenabledscales the firewall service up or down.
This used to be documented as
runtime_security.manage. That key
was an umbrella covering Apps, the firewall, and DLP policy at once;
it has been split. The old name still resolves, so existing roles
keep working, but grant the narrow key on new roles. See
DLP permissions.PUT merges: it updates the fields it names and leaves the rest
alone, so you can send one setting without restating the whole
document. agentic merges the same way one level down.
Payload
Which classifier backs a verdict is not part of the configuration
contract and is never returned by the API. Detection is tuned with
thresholds and rules, not by naming a model, so a detection upgrade
is never a breaking change for you.
App config
Endpoints
GET /api/runtime-security/apps/{id}/config-versions, list version history.PUT /api/runtime-security/apps/{id}/config, publish a new version.
config_version_number linked to the event
row that produced it. The change_summary field captures the
operator’s reason.
Payload
Custom PII rules
Two layers, both queried at scan time:- Per‑App rules,
pii_ruleson the App config above. Edited inline; versioned on every write. - Workspace‑shared rules, set via the Custom Rules endpoints
(
/api/custom-rules/...). Apply across the workspace and across batch / data‑integrity workflows.
NER PII detection
The regex / entropy detectors indetectors.pii are precise on
structured PII (email, phone, IBAN with mod‑97 validation, API
keys) because those have a lexical shape a pattern can anchor on. They’re
blind to unstructured PII: person names, street addresses, dates
of birth. detectors.ner adds a zero‑shot named‑entity tier on top
for exactly that gap. Zero‑shot means you name the entity types you
care about, including ones nobody trained for, and no retrain or
redeploy is involved.
On overlapping spans, the regex tier always wins: a checksum‑validated
IBAN is strictly more trustworthy than a token classifier reading the
same characters. NER only ever adds findings the pattern tier couldn’t
see.
AppNerPolicy
Recommended configurations
Benchmarked against ai4privacy (general PII) and NCBI‑disease / synthetic clinical notes (medical):
Latency is CPU‑bound and independent of these choices: p50 ≈ 130–140ms,
p99 ≈ 200ms per scan once the model is warm.
Tier status
runtime_security.view. Also warms the tier: the first
call kicks off the (~40s) background load so it is ready before
traffic needs it. Poll this after enabling detectors.ner for the
first time, or to render a live status badge in your own tooling.
The response deliberately carries no classifier identity or on‑disk
path. Which model backs a finding is an implementation detail, so
detection can be improved without breaking anything you built on
this payload.
The tier fails open at every stage: cold tier, load error, or a slim
image without the runtime all just mean NER findings are absent for
that scan. Every other detector still runs.
Pre‑prompts on the proxy
Admins can configure a system message that the proxy auto‑prepends (or appends, or sandwiches) to every request. The pre‑prompt is admin‑trusted and not scanned. It’s rewritten into the right shape for each provider:messages[]for OpenAI and OpenAI‑compatible.systemblock for Anthropic and Bedrock.systemInstructionfor Gemini and Vertex.
Forbidden providers
Setrouting.forbidden_providers on an App to refuse traffic to
certain upstreams. Useful for data‑residency requirements (an
EU‑only App might forbid openai, groq, and bedrock US regions).
Refused requests return a provider‑shaped error with verdict block
and blocked_reason="provider_forbidden:<name>".
Environment variables
Most tuning lives in the App / workspace config APIs above. A smaller set of knobs (mostly about detector rollout, fail‑posture, and abuse caps) are process‑level env vars, useful for self‑hosted deployments. None of these require a config‑API round trip; they take effect on process restart.The perplexity defaults above were retuned this release (previously
1500 / 5000, which was high enough that the detector effectively
never fired). If you run with
detectors.perplexity enabled and
rely on the old defaults implicitly, expect more redact verdicts
from this tier after upgrading. Re‑tune per your own corpus via the
env overrides if that’s not what you want.Common workflows
Tighten the firewall for one App
Tighten the firewall for one App
PUT .../apps/{id}/configwith lower thresholds and a clearchange_summary.- Watch the drift dashboard for verdict mix shifts over 24h.
- Roll back via the version history if anything looks wrong.
Add a workspace‑wide custom PII pattern
Add a workspace‑wide custom PII pattern
- Use
POST /api/custom-ruleswith the regex. - New scans pick it up within ~30 seconds.
- Test in the dashboard before relying on it.
Roll out a system pre‑prompt safely
Roll out a system pre‑prompt safely
- Set
pre_promptwithpre_prompt_placement="prepend". - Run synthetic traffic through every App to confirm the new system message doesn’t break behaviour.
- Promote to production by enabling on the workspace config.

