All posts

Just-in-time access vs standing access: which actually controls AI agent risk (on Snowflake)

Many assume that giving an AI agent a permanent Snowflake credential is enough to keep the system safe. In reality, a static credential lets the agent run any query at any time, bypassing the very controls you hoped to enforce. When you rely on just-in-time access, each request is vetted and limited in time, dramatically reducing exposure. Teams that rely on standing access typically store a shared Snowflake user or role in CI pipelines, notebooks, or AI‑agent wrappers. The same secret is reuse

Free White Paper

Just-in-Time Access + AI Agent Security: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

Many assume that giving an AI agent a permanent Snowflake credential is enough to keep the system safe. In reality, a static credential lets the agent run any query at any time, bypassing the very controls you hoped to enforce. When you rely on just-in-time access, each request is vetted and limited in time, dramatically reducing exposure.

Teams that rely on standing access typically store a shared Snowflake user or role in CI pipelines, notebooks, or AI‑agent wrappers. The same secret is reused across dozens of jobs, often without rotation. Engineers grant the agent broad read‑write privileges so it can explore data freely. There is no per‑request approval, no audit of which columns were accessed, and no way to mask sensitive fields before they leave Snowflake.

Why standing access falls short for AI agents

Standing credentials give the agent unrestricted reach. If the agent is compromised, an attacker inherits the same privileges and can exfiltrate data, alter tables, or launch costly queries. Because the connection goes directly from the agent to Snowflake, the platform sees only a single authenticated session; it cannot see individual statements, cannot block dangerous commands, and cannot capture a replayable audit trail.

Furthermore, AI agents often generate ad‑hoc queries based on user prompts. Those queries may unintentionally include personally identifiable information (PII) or proprietary business logic. Without a gate that can inspect responses, sensitive columns are streamed back to the agent unfiltered.

What just-in-time access promises

Just-in-time access limits the window of privilege. An agent must request a token for each operation, and a policy can require a human or automated approval before the token is issued. The token expires after a short period, reducing blast radius if it is leaked. In theory, JIT also lets you scope the request to specific tables or columns.

However, JIT alone does not solve the core problem: the request still travels straight to Snowflake. The platform cannot enforce inline masking, cannot block a destructive command before it runs, and cannot guarantee that every session is recorded for later review. Those enforcement capabilities must sit on the data path, not in the identity system that issues the JIT token.

The missing control layer

hoop.dev provides that control layer. It sits between the identity provider and Snowflake, acting as a Layer 7 gateway that proxies every query. The gateway holds the Snowflake credential, so the agent never sees it. It validates the user’s JIT token, applies policies, and then forwards the request.

Continue reading? Get the full guide.

Just-in-Time Access + AI Agent Security: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Because hoop.dev is the only point where traffic passes, it can enforce the outcomes you need:

  • hoop.dev records each session, creating a replayable audit log that includes every statement and response.
  • hoop.dev masks sensitive fields in real time, ensuring PII never leaves Snowflake in clear text.
  • hoop.dev blocks dangerous commands such as DROP DATABASE or massive SELECTs before they reach the target.
  • hoop.dev routes risky queries for approval, integrating with your existing workflow for just-in-time grants.
  • hoop.dev enforces just-in-time lifetimes by revoking the connection as soon as the approved window expires.

In this architecture, the setup phase, OIDC or SAML authentication, role mapping, and least‑privilege token issuance, decides who may ask for access. The data path, embodied by hoop.dev, is the only place the policy is actually enforced. All enforcement outcomes exist because hoop.dev sits on that path.

Choosing the right model

If an AI agent runs only batch jobs that access a single, low‑risk schema, a tightly scoped standing credential might be acceptable, provided you have external monitoring. But for agents that respond to user prompts, explore arbitrary tables, or generate dynamic queries, just-in-time access combined with a gateway is essential.

When you need both per‑request approval and real‑time data protection, the combination of JIT tokens and hoop.dev’s gateway gives you:

  • Fine‑grained control over which objects can be touched per request.
  • Immediate visibility into every statement, enabling rapid forensic analysis.
  • Automatic redaction of sensitive columns, reducing compliance risk.

Getting started with hoop.dev for Snowflake

Begin by deploying the hoop.dev gateway in your network. The official getting‑started guide walks you through Docker Compose, OIDC configuration, and registering a Snowflake connection. Once the gateway is running, define a just-in-time policy that requires approval for any query that accesses PII columns. The learn section contains deeper examples of inline masking and command blocking.

Because hoop.dev is open source, you can inspect the code, contribute improvements, or run it entirely behind your firewall.

FAQ

Does just-in-time access eliminate the need for audit logs?

No. just-in-time access limits the time a credential is valid, but hoop.dev records every session so you have a complete audit trail.

Can hoop.dev mask data without changing Snowflake queries?

Yes. hoop.dev inspects the response stream and replaces configured sensitive fields before they reach the agent, leaving the original query untouched.

Is the gateway a single point of failure?

hoop.dev can be deployed in a high‑availability mode. The architecture assumes the gateway is the enforcement point, so you should run multiple instances behind a load balancer to avoid downtime.

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