AI Gateway PII Analyzer (Presidio)
The AI Gateway’s built-in detectors find structured identifiers — card numbers, national IDs, emails, keys — with pattern and checksum tiers. Names, street addresses and free-text medical identifiers need a named-entity recognizer, and KnoxCall runs that tier on a Microsoft Presidio analyzer you operate, so prompt text never leaves your boundary for analysis. Scope: This tenant. Each workspace points at its own analyzer; there is no platform default. Before you start- Somewhere to run a container that the KnoxCall gateway can reach over HTTPS.
- Read PII redaction for what the tier adds and how it combines with policies.
1. Deploy the analyzer
Run the official analyzer image (mcr.microsoft.com/presidio-analyzer) or the sidecar packaging in the KnoxCall repository (docker/presidio-sidecar/). KnoxCall calls POST /analyze on the base URL you configure, with the text, the language and the entity list.
Where it must live depends on how you run KnoxCall:
Put the analyzer behind TLS and restrict who can reach it: the requests carry the prompt text being inspected.
2. Enter it in KnoxCall
Settings → Integrations → This tenant → AI Gateway PII analyzer (Presidio) → Configure:
Save. The URL is validated when you save: a refused destination returns
presidio_url_blocked with the reason, rather than being stored and discovered later.
3. Verify
Send a prompt containing a name and an address through a gateway with a PII policy that includes Presidio entities; the PII events ledger shows the match with the Presidio recognizer as its source.How failure is reported
The analyzer is called on the buffered request path with a circuit breaker; five consecutive failures open it and the stack falls back to the built-in tiers.- With a PII policy attached, that fallback is refused rather than served: the request gets
503 pii_policy_degraded, because a policy that promised name detection cannot be silently enforced without it. - With no policy attached, the request is served with
X-Knox-AI-Pii-Degraded: presidio_url_refusedorpresidio_circuit_open, and adetector_unavailablerow is written to the PII events ledger.
Things that bite
- The URL is re-resolved and pinned on every call. A hostname that later starts resolving to a private address on Cloud stops being used; check the gateway’s PII events if detection quietly drops off.
- Timeout is per call, on the request path. A generous timeout makes every gateway request that long when the analyzer is unhealthy.
- Changing the URL or threshold takes effect on the next request — no restart.
Related
- PII redaction — tiers, policies and the events ledger
- AI Gateway firewall