All posts

What SOC 2 Means for RAG

Are you struggling to prove that your Retrieval‑Augmented Generation (RAG) pipelines meet SOC 2’s stringent audit requirements? Most teams build RAG systems by stitching together a large language model, a vector store, and sometimes a relational database. The glue is often a set of static API keys or service‑account credentials that live in configuration files or CI pipelines. Engineers invoke the LLM directly from notebooks, and downstream queries flow straight to the data store without any ce

Free White Paper

SOC 2 Type I & Type II: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

Are you struggling to prove that your Retrieval‑Augmented Generation (RAG) pipelines meet SOC 2’s stringent audit requirements?

Most teams build RAG systems by stitching together a large language model, a vector store, and sometimes a relational database. The glue is often a set of static API keys or service‑account credentials that live in configuration files or CI pipelines. Engineers invoke the LLM directly from notebooks, and downstream queries flow straight to the data store without any central checkpoint. The result is a fast prototype, but it also means there is no immutable record of who asked what, no way to hide personally identifiable information that surfaces in model responses, and no gate that can pause a risky query for human review. In a SOC 2 audit, the lack of such evidence becomes a red flag.

SOC 2 audit artifacts needed for RAG

SOC 2 focuses on five trust service criteria, with Security, Availability, and Confidentiality being the most relevant to RAG. Auditors expect to see:

  • Authenticated identity for every request, tied to a user or service account.
  • Just‑in‑time (JIT) approval logs for queries that touch sensitive data.
  • Session recordings that capture the exact prompt sent to the LLM and the response returned.
  • Inline masking of any regulated fields (PII, PHI) before they leave the data store.
  • Audit logs that are retained according to your retention policy, giving auditors the evidence they need.

Without a control point that can enforce these items, teams end up piecing together logs from the LLM provider, the vector database, and custom application code – a fragile collection that rarely satisfies a SOC 2 examiner.

Why the existing setup falls short

The current approach fixes the first bullet by using OIDC or static service tokens to identify callers, but it leaves the remaining four unchecked. The request still travels directly to the LLM endpoint or the vector store, bypassing any gate that could request approval, mask data, or record the full interaction. In other words, the identity layer is in place, yet the enforcement layer is missing. That gap means there is no guarantee that a privileged query was reviewed, no proof that sensitive fields were redacted, and no reliable replay of a session for forensic analysis.

hoop.dev as the enforcement layer for RAG

hoop.dev provides a Layer 7 gateway that sits between the RAG client and every downstream service – the LLM API, the vector database, and any supporting SQL store. By routing traffic through hoop.dev, the gateway becomes the only place where policy can be applied. It records each session, masks configured fields in real time, and can pause a request until a designated approver signs off. Because hoop.dev operates at the protocol level, the client never sees the underlying credentials, and the enforcement outcomes exist solely because hoop.dev occupies the data path.

Continue reading? Get the full guide.

SOC 2 Type I & Type II: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

In practice, an engineer authenticates with an OIDC identity provider. The identity token is presented to hoop.dev, which verifies the user’s groups and maps them to a RAG role. The request then passes through the gateway, where hoop.dev inspects the payload, applies any masking rules, logs the full prompt‑response pair, and, if the query matches a “high‑risk” pattern, routes it to an approval workflow before forwarding it to the LLM. The same gateway can sit in front of the vector store, ensuring that any vector‑lookup that would expose raw document fragments is either masked or requires explicit approval.

All of these artifacts – identity verification, JIT approval records, session logs, and masked responses – are stored in audit logs that are retained according to your retention policy, giving auditors the evidence they need.

Getting started with hoop.dev for RAG

Deploy the gateway using the quick‑start Docker Compose file, then register your LLM endpoint, vector store, and any supporting databases as connections. Configure masking rules for the fields you need to protect and define approval policies for high‑risk queries. The official getting‑started guide walks you through the deployment steps, while the learn section provides deeper explanations of masking, approval workflows, and audit‑log retrieval.

FAQ

What evidence does hoop.dev produce for a SOC 2 audit?

hoop.dev generates session logs that include the authenticated user, the full request payload, any masking applied, and the final response. It also records approval timestamps and approver identities for any gated operation.

Can hoop.dev mask data without modifying the underlying application?

Yes. Because hoop.dev operates at the protocol layer, it can rewrite responses on the fly, removing or redacting configured fields before they reach the client.

Is hoop.dev itself SOC 2 certified?

hoop.dev does not claim any certification. It is an open‑source tool that helps you generate the evidence required for your own SOC 2 compliance program.

Ready to add audit‑ready enforcement to your RAG pipelines? Explore the open‑source repository on GitHub: https://github.com/hoophq/hoop.

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