How to Configure Continue ClickHouse Permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up continue clickhouse permissions by making a dedicated database role with strict read rights. Then you give that role to the database user in your coding assistant setup. Many teams skip this step and use an admin account for speed. Broad database rights let an AI coding assistant read sensitive columns or drop live tables. How to set up continue clickhouse permissions ClickHouse manages users, roles, row rules, settings profiles, and quotas as access objects. You can build and mana

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 continue clickhouse permissions by making a dedicated database role with strict read rights. Then you give that role to the database user in your coding assistant setup. Many teams skip this step and use an admin account for speed. Broad database rights let an AI coding assistant read sensitive columns or drop live tables.

How to set up continue clickhouse permissions

ClickHouse manages users, roles, row rules, settings profiles, and quotas as access objects. You can build and manage all of these objects with SQL statements. First, you must turn on SQL-driven access control in the server setup. This requires a storage folder path on the server. It also needs at least one user with access management rights turned on. An admin can only grant the rights that they hold themselves.

Next, the admin creates a new database user for the Continue assistant. Creating this user requires the specific create user right in the database. The creation statement sets the login method and the allowed client hosts. It also sets default roles and user settings for that new account. Teams usually bind the assistant to a read-only role at this stage.

You can make these read rights very specific. ClickHouse lets you grant select rights on single columns inside a table. The assistant can then query only those exact columns. If the assistant tries to query other columns, the database blocks the query. A full wildcard select query also fails and returns no data at all. It only works if the table holds just the allowed columns. Since version 24.10, you can also grant rights by table name prefix. A trailing star in the grant statement matches all tables with that prefix.

What native database roles solve and what they miss

Native database roles and column grants solve the first layer of risk. They decide which account can log in and which tables it can read. If the coding assistant guesses a restricted table name, the database says no. Host checks also stop logins from unknown network locations. Quotas and settings profiles help keep heavy queries from slowing down the server.

ClickHouse Access Management + AI Agent Permissions: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, static roles do not inspect what individual queries do in flight. A role grants the same read rights for every prompt and every session. If an allowed column holds emails, phone numbers, or card numbers, queries return them. The coding assistant pulls those raw rows into the local prompt context. Native grants also mean storing a database password on each developer machine. When many developers use the assistant, rotating those local keys takes lots of time.

Why query checks and field masking matter for AI tools

Coding assistants build and run queries based on natural language prompts. Even with column grants, an assistant might pull large batches of user records. If a table mixes safe metrics with national IDs, column grants get tricky. Teams have to update grants every time a table schema changes. And if a developer needs temporary write rights, static roles keeps the session active too long. Real-time query checks and data masking fix this gap by rewriting matched fields in results.

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 do wildcard queries from Continue fail on ClickHouse?

When you grant select rights on specific columns, ClickHouse blocks wildcard select queries. The query returns no data unless the table contains only the granted columns.

Who can grant database rights to a new Continue user?

A database user needs access management turned on to manage roles. Even then, a user can only grant the rights that they hold themselves.

Can I grant Continue read access to groups of tables by prefix?

Yes, since version 24.10, a trailing star in a grant matches table name prefixes. This lets you grant read rights across matching tables with one statement.

The query runs. The emails stay hidden.