How to Configure JetBrains AI ClickHouse Audit Log
You set up a jetbrains ai clickhouse audit log by giving the IDE its own database user. Then you track that user in ClickHouse system tables and query logs. Many teams start by sharing a single admin account across their code tools. That shortcut mixes AI queries with human queries in the logs. Broad permissions also let the assistant read private tables or run heavy queries by mistake. How to set up a jetbrains ai clickhouse audit log Start by turning on SQL-driven access control in your Cli
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 clickhouse audit log by giving the IDE its own database user. Then you track that user in ClickHouse system tables and query logs. Many teams start by sharing a single admin account across their code tools. That shortcut mixes AI queries with human queries in the logs. Broad permissions also let the assistant read private tables or run heavy queries by mistake.
How to set up a jetbrains ai clickhouse audit log
Start by turning on SQL-driven access control in your ClickHouse server. This setup needs a storage folder on the server and an admin user. Once active, you manage users, roles, row rules, settings profiles, and quotas with SQL. Only a user who already holds a privilege can grant it to others.
Create a dedicated ClickHouse user just for your JetBrains AI database tool. Set the login method, allowed client hosts, default roles, and user settings during creation. Next, build a narrow read role for this new account. Grant read rights only on the specific columns the AI assistant needs for context. When you grant select rights on chosen columns, ClickHouse blocks queries on other columns. It also refuses wildcard select queries unless the table holds only those allowed columns. If your server runs a recent version, you can grant rights by table name prefix.
Every query from the IDE now runs under this dedicated user name. ClickHouse records these runs in its native query log tables. Your security team can filter the log by user name to review AI activity. You can see when the tool ran a query and which tables it touched.
What native permissions solve and what keeps the session active
Dedicated database users and column grants solve the first layer of control. They stop the IDE from reading blocked tables or dropping production data. They also give your team a clean trail of which account logged in.
Still, native database setup only checks who logs in and which columns they pick. It does not inspect what happens inside the data stream during a live session. If an allowed text column holds emails, phone numbers, or card numbers, ClickHouse sends them. The AI tool can pull those raw values into prompts or local chat history. Static roles also stay active all day once you put the key in the IDE. There is no built-in step to ask a human before a risky query runs. Native logs show past queries, but they do not rewrite sensitive fields in results.
AI Audit Trails + Audit Log Integrity: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Why column rules alone miss live data risks
Analytics tables often store mixed data inside a single column. A support log column might mix basic app errors with customer national IDs. Column grants are all or nothing for that specific field. If you grant the column for schema context, you expose every row value inside it by default. If you block the column, the developer loses useful help in the editor.
Teams also struggle with local key storage on developer laptops. Each person needs a valid database key stored inside their local IDE settings. Rotating those keys across a big team takes hours of manual work. When a laptop goes missing, revoking and replacing shared keys slows everyone down. Teams need a way to inspect queries in flight and rewrite sensitive patterns.
Check ClickHouse queries and results before execution
Access control in ClickHouse is essential setup. Setup alone does not check single queries for risk or rewrite sensitive strings in returned rows. By design, hoop.dev sits beside the server as a sidecar for your ClickHouse and parses every statement before execution.
First, hoop.dev guardrails block disallowed deletes, drops, and alter mutations. Then hoop.dev data masking rewrites sensitive string columns in responses and logs each decision per resource. Read the docs and source on GitHub.
Frequently asked questions
Why should JetBrains AI have its own ClickHouse user?
A separate user separates AI-generated queries from manual human queries in system logs. It also lets you set strict read limits without blocking the developer's main work.
What happens if JetBrains AI runs a wildcard select on restricted columns?
ClickHouse blocks the wildcard select query and returns no data at all. The query only works if the user has rights on every column in that table by default.
Can native ClickHouse logs stop sensitive data from reaching the AI prompt?
No, native audit logs only record that a query ran after it happens. To hide emails, phone numbers, or card numbers, you must rewrite results in flight.
Related guides
In this post