All posts

LGPD for Embeddings

An offboarded data‑science contractor still has a personal access token that can call the company’s embedding service. The company never revoked the token, and the contractor can continue to submit raw user text and receive vector representations. When a data‑subject later asks for the removal of their personal information under the Brazilian General Data Protection Law (lgpd), the organization struggles to prove whether the contractor’s calls ever touched that data. lgpd expects controllers to

Free White Paper

LGPD (Brazil): The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

An offboarded data‑science contractor still has a personal access token that can call the company’s embedding service. The company never revoked the token, and the contractor can continue to submit raw user text and receive vector representations. When a data‑subject later asks for the removal of their personal information under the Brazilian General Data Protection Law (lgpd), the organization struggles to prove whether the contractor’s calls ever touched that data.

lgpd expects controllers to keep a clear record of every processing activity that involves personal data. The law requires demonstrable consent, purpose limitation, data minimization, and the ability to audit who accessed what and when. For machine‑learning pipelines that generate embeddings, the challenge is twofold: the raw text often contains identifiers, and analysts can trace the resulting vectors back to the source if proper controls are missing. Without a reliable audit trail, an organization cannot answer regulator questions about data lineage or prove that it honored deletion requests.

In practice, teams rely on ad‑hoc logging, manual ticketing, or custom scripts that write to separate stores. Those approaches leave gaps. The system rotates logs before a regulator asks for them, applies masking inconsistently, and handles approvals outside the data path, meaning a privileged user could still bypass controls. The result is a compliance posture that looks good on paper but collapses under scrutiny.

Why the data path must enforce lgpd controls

lgpd compliance is not achieved by identity checks alone. The law demands that the system that actually moves data, the gateway that proxies the request, enforce masking, capture approvals, and record each session. When the enforcement point sits inside the application or the client, a malicious insider could alter or delete logs before they persist. hoop.dev is the dedicated layer that sits between the caller and the embedding service, and it guarantees that every request and response is observed, that sensitive fields are redacted in real time, and that hoop.dev stores a tamper‑evident record.

How hoop.dev provides the required evidence

hoop.dev acts as a layer‑7 gateway for the embedding endpoint. It authenticates callers via OIDC, then inspects each request before it reaches the model. The gateway can:

  • Record the full request and response payload, preserving the raw text and the generated vector for later replay.
  • Apply inline masking to any personal identifiers found in the input before the model sees them, satisfying data‑minimization.
  • Require a just‑in‑time approval workflow for queries that match high‑risk patterns, ensuring purpose limitation.
  • Store an immutable audit log that you can export to meet lgpd’s evidence‑generation requirement.

Because hoop.dev sits in the data path, teams cannot bypass any of these controls by changing client code or by altering the model container. The gateway remains the single source of truth for who accessed which embedding and when.

Continue reading? Get the full guide.

LGPD (Brazil): Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Implementing lgpd‑aligned embedding pipelines

Start by deploying the gateway near the embedding service, following the getting‑started guide. Register the embedding endpoint as a connection and configure the credential that the gateway will use to talk to the model. Enable the masking policy that redacts fields such as names, emails, or CPF numbers. Define an approval rule that flags queries containing personal identifiers and routes them to a data‑privacy officer.

Once the gateway is in place, every call to the embedding service automatically generates the audit record required by lgpd. The logs include the caller’s identity, the original payload (pre‑masking), the masked payload sent to the model, and the resulting vector. You can export these records to a SIEM or a compliance reporting tool, providing the concrete evidence auditors expect.

Benefits beyond compliance

Because hoop.dev records each session, teams gain visibility into how embeddings are used in production, helping to detect misuse or model‑drift. Inline masking reduces the risk of leaking personal data to downstream services, and just‑in‑time approvals create a clear chain of responsibility. All of these outcomes stem from placing enforcement in the data path, not from scattered policies.

FAQ

Does hoop.dev store the raw personal data?

hoop.dev records the request payload for audit purposes, but you can configure the data to be encrypted at rest and retained only for the period required by lgpd. Masking removes identifiers before the model processes the text.

Can I use hoop.dev with existing embedding services?

Yes. The gateway works with any HTTP‑based model endpoint. You register the service as a connection and the gateway proxies traffic without requiring changes to the model code.

How does hoop.dev help with data‑subject deletion requests?

The audit log makes it easy to locate every vector that originated from a specific piece of personal data. Once identified, you can trigger a downstream deletion workflow, and the log provides proof that the request was fulfilled.

Explore the open‑source repository on GitHub to see how the gateway is built and to contribute enhancements that further strengthen lgpd compliance. For deeper learning, visit the hoop.dev learning center.

Open source

Save the open-source gateway for agent data access

Hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.

Star and save the repo →More posts