Common misconception: embeddings are harmless, static vectors that cannot leak sensitive information. In reality, the very process of turning raw text into high‑dimensional vectors creates a surface that can be probed, copied, or replayed to extract proprietary data.
When a developer sends raw customer data to an embedding service, the service returns a numeric representation. Those numbers encode patterns, relationships, and sometimes verbatim fragments of the original text. If an attacker can query the same model or capture the vector stream, they can reconstruct or infer the source data, leading to data exfiltration.
Why embeddings attract data exfiltration
Embedding pipelines usually follow three steps: ingest raw data, compute a vector, and store or forward the vector to downstream systems such as search indexes, recommendation engines, or LLM prompts. Each step introduces a potential leakage point:
- Ingress: Unauthenticated callers may push raw documents directly to the embedding endpoint.
- Vector generation: The model runs inside a process that can be instrumented or intercepted, allowing an adversary to capture the output.
- Persistence: Vectors are often written to databases or caches without redaction, creating a long‑term repository of sensitive signals.
Because the vectors are deterministic for a given model, repeated queries can be used to triangulate the original text. This makes embeddings a high‑value target for data exfiltration attacks.
Where enforcement must happen
Identity and token verification (the setup) can tell you who is asking for an embedding, but it cannot stop a privileged user from sending raw data or from storing the result unfiltered. The only place you can reliably apply masking, approval workflows, and audit logging is in the data path itself – the gateway that sits between the caller and the embedding service.
By placing a Layer 7 proxy in front of the embedding endpoint, you gain a single control surface that can:
- Inspect the request payload and reject any raw content that violates policy.
- Mask or redact sensitive fields in the response before they reach the client.
- Require a just‑in‑time approval for high‑risk queries.
- Record the entire session for replay and forensic analysis.
These enforcement outcomes exist only because the gateway sits in the data path; they cannot be achieved by identity checks alone.
hoop.dev as the data‑path gateway
hoop.dev provides exactly the gateway described above. It proxies connections to any target that speaks a supported protocol, including HTTP‑based embedding services. When a request arrives, hoop.dev validates the OIDC token, extracts group membership, and then applies policy before the request reaches the model.
hoop.dev masks sensitive fields in the embedding response, ensuring that downstream stores never receive raw vectors that could be reverse‑engineered. It blocks dangerous queries that exceed size or frequency thresholds, and it can route suspicious requests to a human approver for just‑in‑time consent.
