How to Configure JetBrains AI ClickHouse Prevent Delete
You set up a jetbrains ai clickhouse prevent delete rule by limiting database user rights. Give the editor account read grants and leave out delete rights. Many teams link their code editor to analytics data using a shared admin login. That broad role lets an assistant run bad queries that wipe out production tables. Scoping down the database account stops accidental data loss before a query runs. How to set up jetbrains ai clickhouse prevent delete rules ClickHouse manages users, roles, row
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 prevent delete rule by limiting database user rights. Give the editor account read grants and leave out delete rights. Many teams link their code editor to analytics data using a shared admin login. That broad role lets an assistant run bad queries that wipe out production tables. Scoping down the database account stops accidental data loss before a query runs.
How to set up jetbrains ai clickhouse prevent delete rules
ClickHouse manages users, roles, row policies, settings profiles, and quotas as SQL access entities. To turn on SQL access control, you set a storage directory on the server. You also need at least one user with access management turned on. Once active, an admin can create a new user account just for the editor. Creating a user requires the create user privilege on the admin account. Remember that a user can only grant the privileges that they have themselves.
When you create the account, you set the login method and allowed client hosts. You also assign default roles and user settings for that specific editor login. To block data removal, you grant only read rights to the new role. You can even grant read rights on specific columns instead of whole tables. If a user only has column grants, a full wildcard read will fail. That wildcard query returns no data unless the table has only those granted columns. You can also grant read rights across tables that share a name prefix.
What native database roles solve and what they miss
Native roles are great for blocking destructive commands at the database level. When the assistant suggests a delete statement, the database refuses to run it. The user account simply lacks the permission to drop rows or alter tables. Column grants also help reduce how much table data the assistant can read. You can keep the tool focused on specific analytics columns for writing queries.
Still, static roles only decide who can log in and which tables they touch. They do not inspect what individual queries do in flight during an active session. A developer often needs write rights to load test data or fix a table. If they log in with that broader role, the assistant inherits those same powers. Native grants also return raw values for any column the user is allowed to read. If an allowed column holds emails, phone numbers, or card numbers, those values appear. Static permissions cannot rewrite sensitive fields on the fly or ask for human approval.
AI Data Exfiltration Prevention + ClickHouse Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Why editor assistants need query-level controls
Code editors mix human work and automated query runs inside the same database session. One moment the developer reads a schema to build a new dashboard chart. The next moment the assistant drafts a cleanup query to remove old test rows. If both actions share one database login, static roles force a hard tradeoff.
You either block all writes for the developer or risk an unwanted delete command. Splitting accounts helps, but switching logins inside a busy code editor slows people down. Teams end up sharing the high-privilege login just to get their daily work done. True safety requires checking each statement right before it hits the database engine. It also requires masking emails and national IDs in query results by rewriting matched fields.
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
Can a ClickHouse user grant read rights to another assistant account?
A ClickHouse user can only grant the privileges that they already hold themselves. They also need access management rights turned on to manage other users and roles.
What happens when the assistant runs a wildcard read on restricted columns?
ClickHouse refuses a wildcard select if the user only has grants on specific columns. The query returns no data unless the table contains only those exact granted columns.
Why do static roles struggle with code editor assistants?
Static roles apply to the whole login session rather than checking each individual statement. If a developer logs in with write rights, the assistant shares those same permissions.
Related guides
In this post