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
A SQL IDE fails on a masked date, UUID or number (PostgreSQL)
A masked value is text, such as######5-22. An IDE that reads each column by its type (DBeaver, DataGrip and other JDBC clients) cannot read that text in a date, uuid or number column and shows an error such as Bad value for type timestamp. psql and the web terminal show the text, so only typed clients fail.
To fix it, send a value of the column type in place of the text:
- Update the gateway and the agent to version 1.333.0 or later.
- Go to Organization > Settings > Experimental.
- Toggle
experimental.postgres_masked_typed_placeholderto On. - Reconnect the IDE: the agent reads the flag when a connection opens.
The flag is off by default because it also changes what
psql and the web terminal show in these columns.Available from version 1.333.0. If
experimental.postgres_masked_typed_placeholder is not listed in Settings > Experimental, the gateway is older: update it first. An agent older than 1.333.0 ignores the flag.Values that mean “masked” in a typed PostgreSQL column
With the flag on, a masked cell shows one of these fixed values. When you see one in a column that a masking rule covers, the real value is hidden.booleanshowsNULL, becausefalsereads as real data.- A cell that is not masked keeps its value.
- When the IDE reads a result in more than one fetch (DBeaver in manual commit mode), the first run of a query can show
NULLin every masked cell after the first batch, text columns included. Run the query again to see the values above. - The values are in ISO format (
1970-01-01), also when the session uses anotherDateStyle.
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