All posts

Keeping Chain-of-Thought SOC 2-Compliant

A SOC 2 audit that hands over clear, immutable evidence of every chain‑of‑thought session leaves no doubt that your AI‑driven reasoning meets the trust service criteria. Auditors can see who initiated each prompt, what data was returned, and whether any sensitive content was redacted, all without digging through ad‑hoc log files. In practice, many teams treat a chain‑of‑thought workflow as a black box. A shared API key lives in a repository, developers invoke the model from notebooks, and the r

Free White Paper

Chain of Custody + 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.

A SOC 2 audit that hands over clear, immutable evidence of every chain‑of‑thought session leaves no doubt that your AI‑driven reasoning meets the trust service criteria. Auditors can see who initiated each prompt, what data was returned, and whether any sensitive content was redacted, all without digging through ad‑hoc log files.

In practice, many teams treat a chain‑of‑thought workflow as a black box. A shared API key lives in a repository, developers invoke the model from notebooks, and the raw request‑response traffic is written to the application’s stdout. Those logs are noisy, incomplete, and often rotated before an audit window opens. When a regulator asks for proof that only authorized personnel accessed the model, the organization can only point to a handful of cloud‑provider metrics that do not capture the content of the interaction.

SOC 2 expects concrete evidence for the five trust service criteria: security, availability, processing integrity, confidentiality, and privacy. For an LLM‑based chain‑of‑thought service this translates into three concrete needs: (1) a record that ties each prompt and response to a verified identity, (2) the ability to hide or mask confidential inputs and outputs, and (3) a mechanism to require human approval before a prompt that could exfiltrate data is executed.

Most organizations start by tightening the identity layer. They switch from static keys to short‑lived OIDC tokens, assign roles in the cloud directory, and enforce least‑privilege policies on the service account that talks to the model. Those steps stop an unauthorized user from obtaining a token, but the request still travels directly from the client to the LLM endpoint. No single component in that path can see the request body, enforce masking, or log the exact command for later review.

SOC 2 evidence for chain‑of‑thought workflows

hoop.dev inserts a Layer 7 gateway between the identity provider and the LLM endpoint. Because every request passes through the gateway, hoop.dev can apply just‑in‑time access checks, route risky prompts to an approval workflow, mask confidential fields in real time, and record the full session for replay. In other words, hoop.dev becomes the only place where enforcement can happen.

Continue reading? Get the full guide.

Chain of Custody + SOC 2 Type I & Type II: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

When a developer initiates a chain‑of‑thought query, hoop.dev extracts the OIDC token, validates the identity, and then logs the user’s name, the timestamp, and the exact prompt that was sent. If the prompt matches a policy that flags potential data leakage, hoop.dev pauses the request and forwards it to an approver. Once approved, the request continues; if denied, the gateway blocks the operation and records the denial reason. All responses are inspected; any field marked as confidential is replaced with a masked placeholder before the data leaves the gateway.

These enforcement outcomes map directly onto SOC 2 criteria. The immutable session log satisfies the processing‑integrity and security principles by proving that every action was performed by an authorized identity and that no unauthorized changes occurred. Real‑time masking fulfills the confidentiality and privacy requirements by ensuring that protected data never appears in downstream logs or storage. The approval workflow demonstrates a controlled environment for high‑risk operations, supporting the availability principle by documenting why a request was blocked rather than silently failing.

Deploying this architecture is straightforward. First, run the hoop.dev gateway using the Docker‑Compose quick‑start described in the getting‑started guide. The learn section provides step‑by‑step guidance on defining masking policies, approval workflows, and audit‑log retention. Register the LLM endpoint as a connection, provide the service credential that the gateway will use, and configure OIDC authentication against your identity provider. Once the gateway is running, developers point their client libraries (for example, the OpenAI or Anthropic SDK) at the local proxy address; the SDK does not need any code changes because the proxy speaks the same wire protocol. From that point forward, every chain‑of‑thought interaction is captured, masked, and, when necessary, approved.

Because hoop.dev is open source and MIT‑licensed, you retain full control over the audit data. The recorded sessions can be exported to your SIEM, fed into a compliance dashboard, or retained for the statutory audit period required by SOC 2. The same gateway also supports other workloads, databases, SSH, Kubernetes, so you can extend the same evidence‑generation model across your entire infrastructure.

FAQ

  • Do I need to modify my application code to use hoop.dev? No. hoop.dev speaks the native protocol of the target service, so existing clients continue to work when pointed at the proxy address.
  • How does hoop.dev ensure that the recorded sessions cannot be tampered with? hoop.dev stores each session in a log that only the gateway can write to, creating an immutable audit trail that auditors can rely on for evidence.
  • Can I mask only specific fields in the LLM response? Yes. You define masking rules in the gateway configuration; hoop.dev applies them in real time before the data leaves the gateway.

For the full open‑source repository, visit the GitHub project.

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