How to Configure JetBrains AI ClickHouse Read Only Access
You set up jetbrains ai clickhouse read only access by creating a restricted database user. Then you connect your IDE to that account with select permissions. Many engineering teams connect coding assistants straight to their main analytics database. They often reuse an admin account to save time during setup. This habit gives the assistant full power to drop tables or alter data. A bad prompt or a simple mistake can wipe out key records. Limiting the assistant to read permissions stops acciden
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 jetbrains ai clickhouse read only access by creating a restricted database user. Then you connect your IDE to that account with select permissions.
Many engineering teams connect coding assistants straight to their main analytics database. They often reuse an admin account to save time during setup. This habit gives the assistant full power to drop tables or alter data. A bad prompt or a simple mistake can wipe out key records. Limiting the assistant to read permissions stops accidental writes before they happen.
How to set up jetbrains ai clickhouse read only access
ClickHouse manages users, roles, row policies, settings profiles, and quotas as access entities. You create and update these entities with standard SQL commands. First, an admin must turn on SQL-driven access control on the server. This step takes a defined storage folder on the database host. It also needs at least one initial account with access management turned on.
Once you turn that on, an admin can create a new user account. Running the user creation command requires the matching user creation privilege. Remember that a database user can only grant privileges that they hold themselves. During creation, you set the login method and allowed client hosts. You also assign default roles and specific user settings for the assistant.
Next, you grant select rights to the new role or user. You can grant select permissions on a whole table or specific columns. When you limit a user to two columns, they can query only those fields. Querying any other column in that table will fail right away. A wildcard query across all columns also fails and returns no data. That wildcard query works only if the table holds just the allowed columns. Recent database versions also let you grant select rights by table name prefixes. Finally, you put these new user credentials into your local IDE database tool. The coding assistant then uses this connection to read schemas and run queries.
What native read roles solve and what they miss
Native database roles do a great job of blocking direct data changes. The coding assistant cannot delete rows, drop tables, or alter schemas. Column grants also help you block access to known secret columns. This setup works well when your data structure stays the same every day.
Auditor Read-Only Access + ClickHouse Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Still, native database permissions only check who logs in at the start. They do not inspect what individual queries do while in flight. Developers hate writing out long column lists when they ask an assistant for help. They want to run broad queries to explore tables fast. If you block wildcard queries with column grants, you break their daily workflow. If you allow whole table reads, sensitive data flows straight into the assistant. Emails, phone numbers, card numbers, and national IDs can sit inside text columns. Static grants cannot rewrite matched fields in results before they reach the IDE.
Managing credentials and query safety for coding assistants
Sharing static database passwords across a team creates another big headache. Every developer has to store the read account password on their laptop. When someone leaves the team, you must rotate that password everywhere. You also lose track of which person ran which query through the assistant. All database logs just show the same shared read account name.
Teams need a way to link every query to a real person. They also need a way to mask sensitive fields on the fly. When masking rewrites matched fields in results, wildcard queries stay safe to run. Developers get fast answers from their tools, and private data stays protected.
Add runtime guardrails and masking beside ClickHouse
Database grants and network rules control who can reach ClickHouse. Even so, an allowed client or agent can send an alter mutation that deletes rows or read raw personal data. In practice, hoop.dev runs beside the server as a sidecar for your ClickHouse and checks native TCP queries with no change to your drivers.
With hoop.dev ClickHouse support, guardrails refuse banned queries before they run, and data masking rewrites matched string columns in results. The audit trail logs which entity types were masked and how many without storing raw values. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Can a ClickHouse user grant read rights to another account?
Yes, if that user has access management turned on. A user can only grant the privileges that they already hold themselves.
What happens when JetBrains AI runs a wildcard select on restricted columns?
ClickHouse refuses the wildcard query and returns no data at all. It only works if the table contains just the granted columns.
Does a read role hide sensitive text inside allowed columns?
No, a basic select grant returns the full content of allowed columns. You need dynamic data masking to rewrite emails or card numbers in results.
Related guides
In this post