Skip to main content

Overview

Bifrost Enterprise supports Microsoft Presidio as a guardrail provider for PII detection. Bifrost sends selected request or response text to a Presidio Analyzer service, then applies the configured action: detect, block, or redact. Use Presidio when you want a self-hosted or privately deployed PII analyzer with configurable entity filters and score thresholds.

How It Works

  1. You deploy or provide a Presidio Analyzer endpoint.
  2. You create a guardrail provider with provider_name: "presidio".
  3. You optionally choose Presidio entity types and a score threshold.
  4. You attach the provider to one or more guardrail rules.
  5. Bifrost sends text blocks to Presidio’s /analyze endpoint.
  6. Bifrost applies the configured action.
Presidio currently evaluates text content. It does not inspect image pixels or arbitrary binary file contents.

Capabilities

  • PII detection through Presidio Analyzer
  • Optional entity filtering with entities
  • Optional score threshold with score_threshold
  • detect_only, block, and redact actions
  • Bifrost-managed redaction strategies and modes
  • Supported-entities lookup through the configured Analyzer service

Configuration Fields

FieldTypeRequiredDefaultDescription
analyzer_urlstringYes-Base URL for the Presidio Analyzer service. Bifrost appends /analyze.
api_keystringNo-Optional API key. Supports env.PRESIDIO_API_KEY.
languagestringNoenLanguage sent to Presidio Analyzer.
score_thresholdnumberNo0.5Minimum Presidio score to keep, from 0 to 1.
entitiesarrayNoall supported entitiesPresidio entity types to detect.
actionenumNodetect_onlydetect_only, block, or redact.
redaction_strategyenumNoreplacereplace, mask, or hash. Used when action is redact.
redaction_modeenumNoruntimeruntime, logs_only, or runtime_reversible. Used when action is redact.
timeoutintegerNoprovider defaultProvider execution timeout in seconds.
For the full redaction behavior matrix, see Guardrail Redaction.

Configuration

  1. Go to Guardrails > Providers.
  2. Select Microsoft Presidio.
  3. Click Add Configuration.
  4. Enter your Analyzer URL.
  5. Optionally set an API key, language, score threshold, and entity filters.
  6. Choose an action. Select Redact to enable Bifrost-managed redaction.
  7. If redacting, choose the redaction strategy and mode.
  8. Save the configuration and attach it to a guardrail rule.

Entity Filters

Leave entities empty to let Presidio return all entities supported by your Analyzer configuration. Set entities when you want a narrower policy, for example only EMAIL_ADDRESS and PHONE_NUMBER. Bifrost can fetch supported entities from:
GET {analyzer_url}/supportedentities?language={language}
That entity catalog powers the multi-select experience in the UI when the configured Analyzer is reachable.

Operational Notes

  • Presidio offsets are converted into Go byte ranges before redaction.
  • score_threshold: 0 is valid and is sent explicitly to Presidio.
  • The default action is detect_only, so set action: "redact" or action: "block" when you want enforcement.
  • Redaction modes affect Bifrost runtime payloads, Bifrost logs, and trace-export connectors as described in Guardrail Redaction.