Prerequisites
- Have properly installed hoop.dev through one of the options available in the deployment overview
- Be on an enterprise plan
- Enough access to your infrastructure so you can load environment variables to your hoop.dev instance
- Have admin access to your hoop.dev instance
This page is dedicated to the setup of Live Data Masking in self-hosted instances. If you are looking for the Learn Guides of Live Data Masking, click here.
Setup
This service supports two providers for data classification and PII detection: Alcatraz, which runs inside the agent and needs no extra services, and Microsoft Presidio, which you deploy and point the gateway at. Google Cloud Data Loss Prevention (DLP) is still available for existing customers but is deprecated for new installations.You must be on an Enterprise plan to have full access to the Live Data Masking feature.
Alcatraz
Alcatraz detects sensitive data in-process, inside the agent. There is no analyzer to deploy, no anonymizer, no credentials and no network hop: detection is a function call on the data already passing through the agent.1
Set up
Set the environment variables in hoop.dev’s Gateway:
No analyzer URL, no anonymizer URL and no service account: unlike the other
two providers, Alcatraz has nothing external to reach.
2
Run hoop.dev's Gateway with the new configs
Masking rules apply to every resource role you activate, and the entity
types you pick per rule are evaluated by the agent serving the session.
3
Deploy an agent that can serve the statistical entity types
Only needed if your masking rules select
PERSON, LOCATION or NRP —
see below. Every other entity type works on any agent image.PERSON, LOCATION and NRP need a model on the agent
Most entity types are pattern-based: credit cards, IBANs, national IDs, API keys and the rest are matched, checksum-verified where a checksum exists, and masked without anything extra on disk. Names, places and nationalities cannot be matched that way — they come from a statistical NER model that runs in-process on the agent. The agent never downloads that model at runtime. Either its image carries it, or you mount it:
For the mounted case,
ALCATRAZ_NER_MODEL_PATH is the models directory — the
parent that holds one subdirectory per model id, which is what
alcatraz models download --dest <dir> writes into.
The model loads lazily, on the first session that needs one of those three
types, and then holds about 260MB of resident memory until the agent restarts.
Give the agent pod headroom before you enable those entity types.
Alcatraz deployment
Provisioning the model, sizing, verification and troubleshooting.
Container images
The tag list and what each flavour contains.
Microsoft Presidio
1
Install
Check the Microsoft Presidio documentation to install it.
Microsoft Presidio Docker Installation
Visit the Microsoft Presidio documentation to install it using Docker.
Microsoft Presidio Kubernetes Installation
Visit the Microsoft Presidio documentation to install it using Kubernetes.
2
Set up
Set the new environment variables in hoop.dev’s Gateway with the following values:
3
Run hoop.dev's Gateway with the new configs
After setting up the environment variables, hoop.dev will use Microsoft Presidio to mask sensitive data in real-time in the data stream of any resource role you configure.
Google Cloud Data Loss Prevention (DLP)
Create an account at Google Cloud Data Loss Prevention and a service account with the permissionroles/dlp.user.
When installing hoop.dev, you need to set the environment variable GOOGLE_APPLICATION_CREDENTIALS_JSON with your GCP DLP credentials in hoop’s Gateway. Hoop.dev uses Google Cloud’s DLP at our protocol layer to mask sensitive data in real-time in the data stream of any resource role you configure.
Google Cloud Data Loss Prevention (DLP) is still available for existing customers but is deprecated for new installations.
Redact Modes
The gateway now supports two operational modes that control how redaction failures are handled. Configure your preferred mode by setting the environment variable DLP_MODE to eitherstrict or best-effort.
best-effort
This is the default mode, it will redact the content, however if it find any error it will continue to operate without any disruption.DLP_MODE=best-effort
strict
This mode will return an error in case it find any redaction issueDLP_MODE=strict
Activate on your resource roles
In the Web App, open the Discover section in the main sidebar and select AI Data Masking. From there, activate masking on each resource role you want to protect, and use the Configure button to choose which fields are masked. A set of default, most-used fields is enabled automatically, so masking works as soon as you activate a resource role. You can add or remove fields at any time.Detected data types
Once activated, Live Data Masking detects a wide range of sensitive data out of the box, grouped into the categories below.Personal Information
Government IDs
Financial Data
Credentials
Health Information
For the complete, provider-specific list, see Supported Fields.
Troubleshooting
Data Not Being Masked
Check:- Live Data Masking is enabled on the resource role
- DLP provider is running and accessible
- Gateway environment variables are set correctly
- The data type is in the supported fields list
Too Much Data Being Masked
If legitimate data is being masked incorrectly:- Check which field type is triggering
- Disable that specific field type in configuration
- Or use Guardrails for more precise control
Performance Impact
Live Data Masking adds latency to query results:
To reduce latency:
- Use
LIMITclauses in queries - Select only needed columns (avoid
SELECT *) - Consider disabling masking for high-volume analytics