How to Configure Make ClickHouse Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a make clickhouse approval flow by pairing a review step with SQL roles. The automation waits for a manager to sign off before running a database task. Many teams start by giving their Make scenario a shared database admin login. That shortcut creates a large risk if a scenario misfires or runs bad queries. A broad role lets an automated workflow read private tables or drop critical records. Scoping permissions down and adding a clear review gate prevents those costly mistakes. How

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 make clickhouse approval flow by pairing a review step with SQL roles. The automation waits for a manager to sign off before running a database task. Many teams start by giving their Make scenario a shared database admin login. That shortcut creates a large risk if a scenario misfires or runs bad queries. A broad role lets an automated workflow read private tables or drop critical records. Scoping permissions down and adding a clear review gate prevents those costly mistakes.

How a make clickhouse approval workflow uses native permissions

ClickHouse manages users, roles, row policies, settings profiles, and quotas as SQL access entities. To use SQL-driven access control, you first set a storage directory on the server. You also need at least one user with access management and named collection control enabled. That admin can then create a dedicated user account just for your Make scenarios. Creating a new user requires the create user privilege in the database. Note that a database user can only grant privileges that they already hold themselves.

When you create the account, you set its login method and allowed client hosts. You also assign default roles and specific per-user settings for that automation account. In Make, you build a scenario that pauses and asks a reviewer for permission. The reviewer checks the request details in a chat message or an email form. Once the reviewer clicks approve, the Make scenario continues to the database module. It logs in with the restricted ClickHouse user and runs the planned statement.

You can lock down what that account reads by using column-level select grants. Instead of opening a whole table, you grant select rights on specific columns only. The Make user can then query those exact columns, while other columns stay off limits. If the scenario tries to select all columns with a wildcard, the database refuses it. A wildcard query returns no data unless the table only has the granted columns. Since version 24.10, a trailing asterisk in a grant matches table names by prefix.

What native setup solves and where gaps remain

Native roles and column grants control which account logs in and which columns it touches. Pairing that with a Make sign-off step stops unreviewed workflows from starting on their own. This setup works well for fixed, routine tasks that never change their query structure.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, static database roles and basic workflow gates leave an operational gap in flight. A Make approval step checks the workflow trigger, not the live SQL statement itself. Once the scenario has valid credentials, the database trusts every allowed query from that user. Native grants cannot require a fresh human check for a single high-risk statement. They also do not rewrite sensitive fields like emails or phone numbers in query results. If a granted column holds card numbers or national IDs, the query returns raw text.

Managing statement-level checks and data masking

Teams often need tighter control over what happens inside an active database session. Instead of trusting a static credential for every run, they review individual queries when needed. They also want to mask sensitive fields like emails and card numbers in returned rows. Masking rewrites matched fields in results so workflows process safe data without breaking schema types. This shifts security from a broad login check to fine-grained control over every statement.

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

How do you enable SQL-driven access control in ClickHouse?

You configure the server storage directory for access entities first. Then you enable access management and named collection control on at least one user account.

What happens if a restricted user runs a wildcard select query?

ClickHouse refuses a select-all query when a user only has specific column grants. It returns no data unless the table contains only those exact granted columns.

Can a ClickHouse user grant permissions they do not have?

No, ClickHouse blocks users from giving away extra rights. A user can only grant the privileges that they hold on their own account.

The query runs. The emails stay hidden.