How to Configure Continue ClickHouse Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up continue clickhouse approval by creating limited database roles and reviewing AI queries. This process stops coding assistants from running risky statements on analytical data without a human check. Teams often give local coding tools a shared database account with broad read and write permissions. When an AI assistant uses a broad role, one bad prompt can change tables or read private fields. Good controls separate normal read requests from risky actions that need a human review firs

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 approval by creating limited database roles and reviewing AI queries. This process stops coding assistants from running risky statements on analytical data without a human check. Teams often give local coding tools a shared database account with broad read and write permissions. When an AI assistant uses a broad role, one bad prompt can change tables or read private fields. Good controls separate normal read requests from risky actions that need a human review first.

How native permissions work for continue clickhouse approval

ClickHouse manages users, roles, row policies, settings profiles, and quotas as access entities using SQL. To turn on SQL access control, an admin sets a storage directory on the server. At least one user account must also have access management rights turned on. An admin needs the create user right to make an account for the coding tool. A user can only grant the database privileges that they already hold themselves.

During user setup, the admin picks the login method and limits which hosts can log in. The admin also assigns default roles and per-user settings to that new account. To limit what the assistant reads, teams can grant select rights on specific columns only. The user can then query those allowed columns, while queries for other columns fail. A wildcard select query also fails unless the table contains only the allowed columns. Since version 24.10, a trailing asterisk in a grant matches table names by prefix.

Where static database roles fall short for AI assistants

Native roles and column grants work well to set baseline rules at login time. They decide which user logs in and which tables or columns that account can touch. Still, static database grants cannot pause a single query in flight for human approval. Once an account has a permission, every query using that permission runs right away.

Coding assistants run inside developer editors and send database queries based on plain text prompts. A developer might ask the assistant to check user metrics or fix a broken table. If the local tool holds write rights, it can drop partitions or alter rows without waiting. If the tool only holds column grants, the developer must switch tools for every schema change.

Static roles also do not rewrite sensitive fields in query results on the fly. If a permitted column holds emails, phone numbers, card numbers, or national IDs, queries return them. Teams need a way to inspect each statement and require approval when a query carries risk. They also need masking that rewrites matched fields in results before the assistant processes the output.

Approval Chains & Escalation + ClickHouse Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What to review before approving assistant queries

Before a reviewer approves a database query from an assistant, they should check three main details. First, check the target tables and columns to verify the query matches the current ticket. A prompt asking for daily sales counts should not read user account tables. Second, check if the statement mutates data, changes table settings, or grants rights to others.

Third, look for broad reads without row limits that could scan billions of stored rows. Analytical tables hold huge data volumes, and an unindexed full scan can slow down shared servers. By checking the exact statement before execution, a team catches mistakes made by the model. The developer stays inside their code editor while a reviewer approves or denies the action.

Check ClickHouse queries and result columns on the wire

ClickHouse users and row policies decide who connects. They do not check each statement on the wire or redact sensitive string columns in query results. With hoop.dev, you run an open-source proxy, a sidecar for your ClickHouse. It reads ClickHouse's native TCP protocol before queries run while ClickHouse stays in charge of login and grants.

Multi-statement queries and table mutations are split and checked by hoop.dev guardrails. Banned actions are refused with a native ClickHouse error. On returned rows, hoop.dev data masking rewrites String and FixedString columns that match your rules. The audit trail logs each query, table, and verdict. See the MIT-licensed source on GitHub.

Frequently asked questions

Can ClickHouse pause a single SQL statement for human approval on its own?

No, native ClickHouse permissions evaluate grants at query start and either run or reject the statement. Pausing a specific query for a human check requires an approval workflow before the database runs it.

What happens when an assistant runs a wildcard select on a table with column grants?

ClickHouse refuses a wildcard select query and returns no data if some columns are restricted. The wildcard query only works if the table contains only the exact columns granted to that user.

How can teams limit which tables a coding assistant can read by name?

Admins can grant select rights on specific tables or specific columns inside a database. Since version 24.10, admins can also use a trailing asterisk to grant rights by table name prefix.

The query runs. The emails stay hidden.