All posts

MCP gateways: what they mean for your audit trail (on Snowflake)

Many assume that simply deploying an MCP gateway automatically gives you a tamper‑proof audit trail for Snowflake. In reality, the gateway alone does not capture who ran what, when, or what data was returned. Today most teams connect to Snowflake with long‑lived user passwords or service‑account keys. Engineers launch the Snowflake client directly from their laptops, scripts inherit the same credentials, and no central component observes the SQL statements. The result is a black box: if a query

Free White Paper

Audit Trail Requirements + Single Sign-On (SSO): The Complete Guide

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

Free. No spam. Unsubscribe anytime.

Many assume that simply deploying an MCP gateway automatically gives you a tamper‑proof audit trail for Snowflake. In reality, the gateway alone does not capture who ran what, when, or what data was returned.

Today most teams connect to Snowflake with long‑lived user passwords or service‑account keys. Engineers launch the Snowflake client directly from their laptops, scripts inherit the same credentials, and no central component observes the SQL statements. The result is a black box: if a query leaks PII or a rogue user runs a destructive command, there is no reliable log that ties the action to an identity.

What an MCP gateway adds – and what it still leaves open

An MCP gateway sits in front of Snowflake and can proxy connections, making it easier to enforce network policies and to route traffic through a single endpoint. It centralises the entry point, which is a step toward visibility, but the gateway still forwards the raw request straight to Snowflake. Because the gateway does not inspect the SQL payload, it cannot record each statement, mask sensitive columns, or require a human approval before a risky operation runs. The request reaches the database unchanged, and the gateway does not retain a replayable record of the session.

Why the data path matters

Identity providers (OIDC or SAML) decide who may start a connection – that is the setup phase. The decision to allow a user to obtain a token is essential, but it does not guarantee that the subsequent SQL traffic will be governed. Enforcement must happen where the traffic actually flows, between the user and Snowflake, otherwise the connection remains unmonitored.

hoop.dev as the enforcement layer

hoop.dev is a Layer 7 gateway that sits directly in the data path between identities and Snowflake, even when an MCP gateway is already in place. By proxying the protocol, hoop.dev can inspect each SQL statement, apply inline masking to columns that contain personal data, and block commands that match a deny list before they ever hit the database. It also triggers just‑in‑time approval workflows for operations that exceed a defined risk threshold.

Because hoop.dev records every session, teams gain a complete audit trail that ties each query to the originating identity, the time of execution, and the exact result set (with masked fields where required). The recorded sessions are replayable for forensic analysis, and the masking ensures that downstream auditors never see raw PII.

How hoop.dev builds the audit trail

When a user authenticates via OIDC, hoop.dev validates the token and extracts group membership. The session then passes through hoop.dev, which logs the inbound SQL command, the user identifier, and a timestamp. After the database returns a result set, hoop.dev applies any configured masking rules, logs the filtered response, and stores the combined request‑response pair for later retrieval.

Continue reading? Get the full guide.

Audit Trail Requirements + Single Sign-On (SSO): Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

How it fits with existing MCP deployments

Deploying hoop.dev does not replace the MCP gateway; instead, it augments it. The MCP gateway continues to provide network‑level routing, while hoop.dev adds protocol‑aware controls. The two work together: the MCP gateway forwards traffic to hoop.dev, hoop.dev applies its guardrails, and then forwards the sanitized request to Snowflake. This layered approach preserves the benefits of the existing MCP setup while delivering a trustworthy audit trail.

Practical benefits

  • Full session replay for incident response.
  • Inline masking of sensitive columns to satisfy privacy regulations.
  • Just‑in‑time approvals that prevent accidental data exfiltration.
  • Command‑level blocking of destructive statements such as DROP DATABASE.
  • Centralised evidence that can be fed to compliance frameworks without modifying Snowflake itself.

Pitfalls of relying only on MCP gateways

Because an MCP gateway does not examine payloads, it cannot differentiate a harmless SELECT from a query that extracts credit‑card numbers. Without a data‑path guard, any compromised credential can be used to run arbitrary SQL without detection. Additionally, MCP gateways do not provide replayable sessions, so investigators cannot reconstruct exactly what was displayed to a user. Finally, the lack of inline masking means that logs captured downstream may contain raw PII, creating a compliance risk.

These gaps are why a dedicated Layer 7 proxy such as hoop.dev is essential. It turns the opaque tunnel created by the MCP gateway into a visible, controllable channel where every statement is accounted for.

For a quick start, see the getting‑started guide. The learn section provides deeper coverage of masking policies and approval workflows.

FAQ

Does hoop.dev replace Snowflake’s native query logs?

No. Snowflake continues to emit its own logs. hoop.dev adds an independent record that captures the exact request and response after masking, giving you a second source of truth for audit purposes.

Can hoop.dev work with an existing MCP gateway?

Yes. hoop.dev is designed to sit behind any Layer 7 proxy, including MCP gateways. It simply receives the proxied traffic, applies its controls, and forwards the request onward.

Will the additional proxy affect query latency?

hoop.dev introduces a small amount of processing for inspection, masking, and logging. In most workloads the impact is negligible, and the security benefits outweigh the modest latency increase.

Explore the source code and contribute on GitHub.

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