Many think that AI agents can operate without any audit trail, but SOC 2 requires complete visibility into every data access.
In practice, a machine‑learning model that queries Snowflake may be invoked by a scheduler, a webhook, or an autonomous workflow. The model’s code often contains hard‑coded credentials or relies on a service account that has broad read/write rights. When that agent runs, the organization loses three things: who ran the query, what data was returned, and whether the operation complied with internal policies. Without those signals, a SOC 2 audit will flag missing evidence for the Security and Confidentiality criteria.
What a responsible team needs is a control surface that sits between the AI agent and Snowflake, enforcing policies at the moment of each request. The surface must be able to:
- Validate the agent’s identity against an OIDC or SAML provider.
- Grant just‑in‑time credentials that expire as soon as the query finishes.
- Require human approval for high‑risk statements before they reach the database.
- Mask sensitive columns in query results so that downstream processes never see raw personally identifiable information.
- Record the full session, command, parameters, and response, for replay during an audit.
All of those enforcement points belong in the data path, not in the agent’s code or in the Snowflake account itself. If the gateway is removed, the agent still reaches Snowflake directly, and the system no longer captures any of the above evidence.
Why a Layer 7 gateway is the only way to meet SOC 2 evidence requirements
SOC 2’s Trust Services Criteria demand that an organization can demonstrate:
- Logical access is restricted to authorized identities.
- Access events are logged in a way that makes unauthorized changes detectable.
- Sensitive data is protected both at rest and in transit.
- Changes to privileged access are approved and documented.
When an AI agent talks directly to Snowflake, the cloud provider’s native logs record the connection, but they do not capture the agent’s intent, the exact query text, or any masking that might be applied downstream. Moreover, Snowflake’s logs are not tied to the organization’s identity provider, making it hard to prove that a particular user or service account initiated the request. The missing link is a gateway that can translate the external identity into a scoped Snowflake credential, enforce policy, and produce a unified audit trail.
Introducing hoop.dev as the enforcement point
hoop.dev implements exactly the Layer 7 gateway described above. It sits between the AI agent and Snowflake, acting as a relying party for OIDC/SAML tokens, issuing short‑lived Snowflake credentials, and applying policy checks before any traffic reaches the database. Because the gateway inspects traffic at the protocol level, it can mask columns in real time, pause a query for manual approval, and record every byte that flows through the connection.
All enforcement outcomes, just‑in‑time access, inline masking, approval workflows, and session recording, are produced by hoop.dev because it alone intercepts the data path. The AI agent never sees the Snowflake password, and the organization never relies on the agent’s internal logging to satisfy SOC 2.
Artifacts that satisfy an auditor
When hoop.dev mediates a Snowflake session, it creates a set of artifacts that map directly to SOC 2 requirements:
- Identity‑bound access logs: Each log entry includes the OIDC subject, the time of the request, and the exact SQL statement.
- Approval records: For queries flagged as high‑risk, the auditor can see who approved the operation, when, and why.
- Masked result snapshots: The logs store the post‑masking result set, proving that PII never left the controlled environment.
- Replayable session files: The system can replay a complete capture of the client‑server exchange to verify that the observed behavior matches the documented policy.
- Credential rotation evidence: hoop.dev mints short‑lived Snowflake credentials per request, and stores the expiration timestamps alongside the session.
Collectively, these files give auditors a clear, verifiable trail that demonstrates compliance with the Security, Availability, Processing Integrity, and Confidentiality criteria of SOC 2.
High‑level deployment steps
Implementing hoop.dev for Snowflake does not require rewriting the AI agent. The typical flow is:
- Deploy the hoop.dev gateway using the getting started guide. The gateway runs as a container or as a Kubernetes pod inside the same network as Snowflake.
- Register Snowflake as a connection in hoop.dev, providing the account identifier and a service‑account credential that the gateway will use to create short‑lived users.
- Configure policy rules that define which identities can run which queries, which result columns must be masked, and the approval thresholds for privileged operations.
- Update the AI agent’s connection string to point at the hoop.dev endpoint instead of the raw Snowflake host. The agent continues to use its standard Snowflake client library; hoop.dev handles the rest.
- Monitor the generated audit logs via the learn page to ensure they are being retained for the audit period required by SOC 2.
Because hoop.dev is open source and MIT‑licensed, the organization can host the gateway on its own infrastructure, keeping the audit data under its own control.
FAQ
What evidence does hoop.dev generate for a SOC 2 audit?
hoop.dev produces identity‑bound access logs, approval records, masked result snapshots, replayable session captures, and credential rotation timestamps. All of these are stored in a secure location that protects log integrity, and they can be exported in CSV or JSON for audit review.
Does hoop.dev store Snowflake credentials?
The gateway holds the privileged Snowflake credential only long enough to mint short‑lived users for each request. Those temporary credentials are never exposed to the AI agent, and they expire immediately after the session ends.
Can existing Snowflake role‑based access control be used together with hoop.dev?
Yes. hoop.dev can map OIDC groups to Snowflake roles when it creates the temporary user. This lets you keep your existing role hierarchy while still gaining the granular, per‑request audit that SOC 2 demands.
Ready to see the code? Explore the hoop.dev repository on GitHub and start building an audit‑ready AI pipeline today.