All posts

Putting access controls around Claude: production access for AI coding agents (on Snowflake)

Giving Claude unrestricted production access to Snowflake is a recipe for data leakage. Most teams hand the model the same static Snowflake user or service account that powers their CI pipelines to the Claude agent. The credential lives in environment variables, configuration files, or even the agent’s container image. When Claude writes a query, the request bypasses any human review, bypasses any audit trail, and can exfiltrate tables that should stay behind a firewall. Because the agent talks

Free White Paper

Snowflake Access Control + AI Model Access Control: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

Giving Claude unrestricted production access to Snowflake is a recipe for data leakage.

Most teams hand the model the same static Snowflake user or service account that powers their CI pipelines to the Claude agent. The credential lives in environment variables, configuration files, or even the agent’s container image. When Claude writes a query, the request bypasses any human review, bypasses any audit trail, and can exfiltrate tables that should stay behind a firewall. Because the agent talks directly to Snowflake, the organization loses visibility into which statements succeeded, which rows were returned, and whether a query violated internal policy.

One obvious fix is to replace the static user with a non‑human identity that is scoped only to the operations Claude needs. Most cloud providers support OIDC‑backed service accounts, and Snowflake can trust federated tokens. By issuing a token that grants read‑only access to a single database, the team reduces the blast radius of a compromised secret.

However, that change alone does not close the gap. The token still travels straight to Snowflake, so the gateway that could inspect the SQL never sees it. Without a proxy, there is no place to enforce inline masking of sensitive columns, no point to require an analyst’s approval before a destructive DDL statement runs, and no automatic recording of the session for later replay. The request reaches the target, but the organization still lacks a single source of truth for who ran what, when, and with what result.

How hoop.dev enforces production access for Claude

hoop.dev acts as a Layer 7 gateway that sits between Claude and Snowflake. The agent runs inside the same network segment as Snowflake, while users and AI services connect through the gateway using standard Snowflake clients. Because hoop.dev terminates the Snowflake wire protocol, it can apply policy before any statement reaches the database.

  • Just‑in‑time approval: When Claude attempts a statement that matches a high‑risk pattern, such as DROP TABLE or a query that touches a PII column, hoop.dev pauses the request and routes it to a designated approver. The approver can grant or deny the operation in real time, preventing accidental or malicious changes.
  • Inline data masking: hoop.dev can rewrite result sets on the fly, redacting columns that contain personal data. The Claude agent receives a sanitized view, which satisfies the need for code generation while protecting sensitive fields.
  • Session recording: Every request and response passes through hoop.dev, which writes a timestamped record to the audit store. The record includes the identity of the Claude instance, the exact SQL text, and the outcome. Teams can replay a session later to investigate a breach or to satisfy compliance auditors.
  • Command‑level audit: Because hoop.dev sees each statement, it can tag queries with policy tags, store them in a searchable log, and generate alerts when patterns of risky behavior emerge.

All of these enforcement outcomes happen because hoop.dev occupies the data path. The OIDC‑backed service account that Claude uses is still the source of identity, but hoop.dev is the only component that can actually block, mask, or record the traffic.

Common mistakes to avoid

1. Relying on token scopes alone. Scoping the token to read‑only does not prevent a malicious Claude from exfiltrating large volumes of data. Without a gateway, there is no way to limit row‑level extraction or to enforce masking.

Continue reading? Get the full guide.

Snowflake Access Control + AI Model Access Control: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

2. Storing credentials in the agent image. Even if the token is short‑lived, baking it into the container image makes revocation difficult. Deploy hoop.dev with a credential store that rotates secrets automatically.

3. Skipping approval workflows. Some teams think that because Claude is an AI, it can “self‑approve” its own actions. In practice, a human reviewer for destructive statements reduces the risk of accidental data loss.

4. Forgetting to audit. Without session logs, a post‑mortem investigation is blind. hoop.dev’s built‑in recording ensures every query is traceable.

Getting started

To protect Claude’s production access, deploy the hoop.dev gateway in the same network segment as Snowflake, configure a Snowflake connection, and bind Claude’s OIDC service account to the gateway. The official getting‑started guide walks through the Docker Compose deployment, the OIDC configuration, and the creation of a Snowflake connection. For deeper policy examples, the learn section shows how to define masking rules and approval policies.

Start with the getting‑started documentation to spin up the gateway, then explore policy definitions in the learn section. When you’re ready to review the source code or contribute, the repository is available on GitHub.

FAQ

What if Claude needs to run a new query type? Add the query pattern to the approval policy in hoop.dev. The gateway will automatically enforce the new rule without changing Claude’s code.

Can I still use Snowflake’s native role‑based access control? Yes. hoop.dev works alongside Snowflake RBAC; the gateway adds an extra layer of inspection and audit.

How does hoop.dev handle credential rotation? The gateway stores credentials in a secret store and can be reloaded without restarting Claude. Rotate the underlying Snowflake user or service account and update the gateway configuration.

Ready to secure Claude’s production access? Explore the open‑source repository and start building a safer AI‑driven data pipeline today.

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