Why least privilege is not automatic with MCP gateways
Many assume that simply routing Snowflake traffic through an MCP gateway automatically enforces least privilege. In reality the gateway merely forwards the request; the Snowflake account still receives the original service‑account credentials and can execute any query that those credentials allow. Teams often create a single Snowflake user for an entire application team, embed its password in CI pipelines, and rely on the gateway to keep the secret safe. The result is a broad, standing permission set that no longer reflects the principle of least privilege.
Because the gateway does not inspect or limit the SQL statements, a developer who only needs read‑only access can still run DDL or export large data sets. Auditors cannot tell who ran which command, and any breach of the CI secret instantly grants full Snowflake access to every downstream job. The current state is uncomfortable but common: static credentials, shared accounts, and no visibility into individual queries.
The missing enforcement layer
Least privilege requires that the decision to allow a specific operation be made at the moment the request is made, based on the requester’s identity and the exact command. This means the enforcement point must sit between the client and Snowflake, where it can see the full protocol, evaluate policies, and either allow, mask, or block the request. Without such a data‑path control, the only thing you have is the initial identity check performed by the IdP, which tells you *who* can start a session but not *what* they do once the connection is open.
In the ideal model, the setup phase (OIDC or SAML federation, role assignment, and service‑account provisioning) decides who may request access. The gateway, positioned in the data path, is the sole place where policy enforcement can happen. Only when the gateway actively inspects each query can you guarantee that the principle of least privilege is upheld for every Snowflake operation.
hoop.dev as the data‑path gateway for MCP
hoop.dev sits in the data path between the client and Snowflake. It authenticates users via OIDC or SAML, reads group membership, and then proxies the Snowflake connection. Because the gateway is the only point that sees the full SQL payload, it can enforce least privilege in real time.
When a request arrives, hoop.dev checks the user’s identity (the setup stage) and then applies policy rules to the exact statement. If the policy permits a SELECT on a specific schema, hoop.dev allows it; if the statement tries to DROP a table, the gateway blocks it before it reaches Snowflake. The enforcement outcomes, command‑level audit, inline masking of sensitive columns, just‑in‑time approval for risky queries, and session recording for replay, exist only because hoop.dev is positioned in the data path.
Because the gateway holds the Snowflake credential, the client never sees it. This satisfies the “the agent never sees the credential” guarantee and eliminates the risk of credential leakage from CI pipelines. All activity is logged with the user’s identity, providing a complete audit trail that satisfies internal compliance checks.
