How to Configure JetBrains AI Snowflake Audit Log
You set up a jetbrains ai snowflake audit log by turning on native database history views. Then you map your code editor sessions to specific database roles. Most data teams start by sharing one broad test role across their whole group. That wide role lets the editor assistant read way too many tables at once. When a shared role runs a bad query, your log cannot show who wrote it. How the jetbrains ai snowflake audit log works in practice The code editor uses a local driver to start a session
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up a jetbrains ai snowflake audit log by turning on native database history views. Then you map your code editor sessions to specific database roles. Most data teams start by sharing one broad test role across their whole group. That wide role lets the editor assistant read way too many tables at once. When a shared role runs a bad query, your log cannot show who wrote it.
How the jetbrains ai snowflake audit log works in practice
The code editor uses a local driver to start a session with your cloud warehouse. You give each developer a unique user name and a strict role in the warehouse. When the editor assistant suggests or runs SQL, the warehouse tags that query with the role. The native Snowflake audit log then writes each query text and timestamp to a system view.
Your security team reads these system views to check what the editor assistant did. They can filter the log by the client driver name or by the user role. This setup pairs the editor session with the warehouse history table. You must also set a query tag in the editor driver settings. That tag helps your team spot AI queries among normal human queries in the log.
Next, you grant read permissions on the history views to your review team. The review team runs regular checks to spot odd table scans or failed queries. They look at the user name, the role, and the full SQL text. This flow gives you a basic record of every query that the editor sends.
What native logging solves and where it falls short
Native warehouse logging gives you a solid past record of every SQL statement that ran. It proves which user role authenticated and which tables the query read during that session. If a developer runs a slow query through the editor, you can find it later. You can also see how much compute time the editor queries used over a week.
Still, native warehouse roles only decide who can log in and start a session. They do not inspect or stop individual SQL statements while the query is in flight. Once a role has table permissions, the editor assistant can pull every row in that table by default. The native log only records the event after the data has already left the warehouse.
AI Audit Trails + Audit Log Integrity: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
This leaves a big gap when your tables hold emails, phone numbers, or card numbers. A developer might ask the editor assistant to write a sample query on a user table. The assistant reads raw emails and national IDs, and sends them to the model context. Data masking that rewrites matched fields in results is much safer than simple role checks. Without statement checks and live masking, your log just records data leaks after they happen.
How to tighten session rules for editor assistants
Start by removing shared database roles from every developer machine right away. Give each person a distinct identity so the warehouse log shows real names. Create a tiny role just for the editor assistant with read rules on safe schemas. Never give this role permissions to drop tables or change warehouse size settings.
You should also set short timeouts on every session started by the code editor. If a developer leaves their desk, the warehouse will close the idle session fast. Review your query history views every week to find roles with too many permissions. Trim those permissions down so the editor only sees what it needs for daily work.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Does the warehouse log show prompts typed into the code editor?
No, the warehouse only sees the final SQL statement that the editor driver sends. It does not record the chat prompt or the code context inside the editor.
How can we tell editor queries apart from normal SQL queries?
You can add a custom session tag in the database driver settings inside your editor. The warehouse log will record this tag next to every query from that session.
Can native database roles hide card numbers from the editor assistant?
Native roles alone only allow or block table reads for the whole session. You need field masking to rewrite card numbers, emails, or phone numbers in query results.
Related guides
In this post