Skip to main content

Presidio (presidio)

Detection (analyzer) and masking (anonymizer) of personal data in prompts, answers and documents, with English and French spaCy models.

Generated from catalog/services/presidio.yaml: do not edit by hand.

Summary​

Version2.2.366
Useinstall and configure, configure and connect
Layerfunctional (AI catalog)
CategorySecurity and policies
Installation methodspython, podman
External connectionno
Sandbox onlyno

Licence​

SPDX identifierMIT
Licence policycore licence (MIT or Apache-2.0)
Licence exception-
Platform componentpresidio

Packages and artifacts​

A package the project of the service publishes (its image, its binary archive, its Python or OS package) carries the licence of the service; a third-party package carries the licence written on its row, read from the official upstream metadata.

KindPackageVersionLicenceDetails
container imagemcr.microsoft.com/presidio-analyzer2.2.362MITimage key analyzer, used by analyzer, digest sha256:286e3fa7f3a7426e775e8564fe1870f1ba8f999d3ab8bbb8cc46a44355d9d6e9
container imagemcr.microsoft.com/presidio-anonymizer2.2.362MITimage key anonymizer, used by anonymizer, digest sha256:a10a12a2a613d13cf29d3ad3641e3258444dd8c90403dd644a0a114c472c2483
Python packagepresidio-analyzer2.2.366MITinterpreters, in order of preference python3.11, python3.12
Python packagepresidio-anonymizer2.2.366MITinterpreters, in order of preference python3.11, python3.12
Python packagespacy>=3.7,<4 (range)MITinterpreters, in order of preference python3.11, python3.12
Python packageen_core_web_lg3.8.0MITinterpreters, in order of preference python3.11, python3.12
Python packagefr_core_news_lg3.8.0LGPLLRinterpreters, in order of preference python3.11, python3.12
Python packageflask>=3.0 (range)BSD-3-Clauseinterpreters, in order of preference python3.11, python3.12
Python packagegunicorn>=22.0 (range)MITinterpreters, in order of preference python3.11, python3.12

Images are pinned by tag in the descriptor, and by digest when the descriptor declares one (the offline bundle then refuses a pulled image that does not carry it); the digest is recorded in the mirror of the Manager when the offline bundle is imported, and every pull or load is checked against it.

Supported systems and architectures​

MethodOperating systemsArchitectures
pythonRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64, aarch64 (not restricted by the descriptor)
podmanRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64, aarch64 (not restricted by the descriptor)

Certified host systems: RHEL 8/9/10, Rocky Linux 8/9/10, AlmaLinux 8/9/10, Oracle Linux 8/9, CentOS Stream 9/10, Ubuntu 22.04/24.04, Debian 12, Arch Linux (rolling). The host preflight accepts these systems (other releases of a known family give a warning, end of life releases are refused) and the x86_64 and aarch64 architectures.

Prerequisites​

Host​

  • at least 4096 MB of memory (warning, memory).

Network and ports​

ComponentPort namePortOpened in the host firewall
analyzerapi5002/tcpyes
anonymizerapi5003/tcpyes

Services and connections needed​

This service has no dependency.

Installation methods and modes​

MethodDefaultWhat the method uses
pythonyesa Python virtual environment holding the Python packages of the descriptor
podman-the container images of the descriptor, run by Podman under systemd

Components​

ComponentKindInstallation methodsPorts
Analyzer (analyzer)masterpython, podman5002/tcp
Anonymizer (anonymizer)masterpython, podman5003/tcp

Single server (standalone) (default)​

One analyzer and one anonymizer.

What the mode deploys:

ComponentPlacement
analyzermin 1, max 1
anonymizermin 1, max 1

Replicated (replicated)​

Several stateless instances of each API behind the load balancer.

What the mode deploys:

ComponentPlacement
analyzermin 2, recommended 2
anonymizermin 2, recommended 2

Install this service​

The install wizard of the Navin Manager plans, validates and runs the installation; you need the services:install permission on the cluster.

  1. Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.

  2. Choose the service. On the Service step, select Presidio. The card shows the licence MIT. Pick the Method among python, podman (default python).

  3. Choose the hosts and the mode. On the Hosts step, tick the hosts, then choose the Mode: standalone (default), replicated. Each mode deploys the components listed in Installation methods and modes. With several components, place each one on its hosts in Component placement (Suggest placement proposes a placement that respects the cardinalities).

  4. Bindings. This service has no dependency: the Bindings step has nothing to bind.

  5. Configure. On the Configure step, review the parameters (see Configuration parameters). Passwords left empty with a generated default are generated and sealed by the Manager.

  6. Review and install. On the Install step the Manager validates the plan and shows the installation order; when it says "The plan is valid. Ready to install.", choose Install. A highly available mode is installed only when its HA checks pass.

  7. Verify. The operation ends when the health checks of every instance pass (see Health checks); the service then shows as running in Services.

Connect an existing service​

Schemeshttps, http
Default port5002
Authenticationnone
Health check/health
Authentication methodFieldsDescription
none-The REST APIs of the Presidio analyzer and anonymizer have no authentication: expose them on the internal network only.

Official documentation: https://microsoft.github.io/presidio/

FieldTypeDefaultDescriptionNotes
Anonymizer URL (anonymizer_url)url-Anonymizer URL of the existing service.required

High availability​

Clusterreplicas (replication)
High availabilityexternal (external)
Failoverload balancer (load-balancer)
Replicationnone (none)
Quorumnone (none)
Discoverynone (none)
Entry pointload balancer (load-balancer)
Official documentationhttps://microsoft.github.io/presidio/installation/

Topology per mode​

ModesHighest catalog levelDistributionQuorum componentFault domainsDescription
standalonestandalone (standalone)single (single)-1One analyzer and one anonymizer.
replicatedha (ha)active-active (active-active)-2Several stateless analyzers and anonymizers behind the load balancer.

Notes​

  • Each instance loads its spaCy models in memory: plan the memory of every host.

Configuration parameters​

Network​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Analyzer port (analyzer_port)port5002-nonoyesPort of the analyzer API (/analyze).
Anonymizer port (anonymizer_port)port5003-nonoyesPort of the anonymizer API (/anonymize).
TLS (tls_enabled)boolfalse-nonoyesServe both APIs in HTTPS with a certificate of the Manager CA: the gunicorn server of each API loads it (certfile and keyfile settings passed in GUNICORN_CMD_ARGS, for the python method and for the official images alike); the health checks and the client addresses then use https.

Language models​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Languages (languages)list["en", "fr"]-nonoyesLanguages of the spaCy models loaded by the analyzer.
Workers (workers)int2min 1, max 16nonoyesWorker processes of each API (each one loads the models). (recommended clamp(floor(host.cpu_count / 4), 1, 8))

Endpoints​

EndpointSchemeComponentPortPathTLS parameterBinding parametersBinding secretsProvisioning command
analyzerhttpanalyzer5002 (analyzer_port)-tls_enabled---
anonymizerhttpanonymizer5003 (anonymizer_port)-tls_enabled---

Client configuration files​

Files rendered for the client configuration download:

  • presidio.env (client.env.j2)

Commands​

CommandComponentTargetDescription
Analyzer logs (logs)analyzerchosen hostLast lines of the analyzer journal.

Health checks​

Liveness (per instance)​

ComponentCheckDetails
analyzerHTTP {{ 'https' if config.tls_enabled else 'http' }}://{{ host.ip or '127.0.0.1' }}:{{ config.analyzer_port }}/healthExpected 200; 60 retries; interval 2 s; timeout 5 s
anonymizerHTTP {{ 'https' if config.tls_enabled else 'http' }}://{{ host.ip or '127.0.0.1' }}:{{ config.anonymizer_port }}/healthExpected 200; 30 retries; interval 2 s; timeout 5 s

Preflight checks​

CheckTypeMeaningSeverityComponents
memorymemory_mb {"min": 4096}at least 4096 MB of memorywarninganalyzer
analyzer_port_freeport_free {"param": "analyzer_port"}port 5002 free on the hostblockinganalyzer
anonymizer_port_freeport_free {"param": "anonymizer_port"}port 5003 free on the hostblockinganonymizer

Uninstall​

Paths removed when the data is purged: {{ paths.log }}.

Upstream documentation​