How to Configure Flowise ClickHouse Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up flowise clickhouse read only access by creating a restricted database user. Then you give that user key to your Flowise workflow nodes. Many teams start by sharing a default admin key to test their AI flows. This broad role lets an AI agent drop tables or change production rows. A single bad prompt can wipe out vital data or leak private rows. How flowise clickhouse read only access works natively ClickHouse manages users, roles, row rules, settings profiles, and quotas as SQL acce

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 flowise clickhouse read only access by creating a restricted database user. Then you give that user key to your Flowise workflow nodes. Many teams start by sharing a default admin key to test their AI flows. This broad role lets an AI agent drop tables or change production rows. A single bad prompt can wipe out vital data or leak private rows.

How flowise clickhouse read only access works natively

ClickHouse manages users, roles, row rules, settings profiles, and quotas as SQL access items. To turn on SQL access control, you must set a storage folder on the server. You also need at least one user with access management turned on. An admin user can only grant rights that they already hold themselves. Creating a new user also requires the user creation right in the database.

When you create the user for Flowise, you set its login method and allowed hosts. You can also assign default roles and per-user settings at the same time. To lock down reads, you grant select rights on specific tables or columns. If you grant select on two columns, the user can query only those two columns. A query for any other column will fail right away.

A wildcard select query also fails unless the table holds only those granted columns. In version 24.10 and newer, a trailing asterisk grants rights by table name prefix. Once this read role is ready, you put the user details into Flowise. Every query from the Flowise node now runs under those strict read rules.

What native read roles solve and what they miss

Native ClickHouse roles stop write queries and block schema changes from Flowise agents. They also help you limit which tables and columns the AI app can read. This setup solves the basic problem of accidental deletes or data edits. It decides who can log in and which objects they can touch.

Still, static database roles cannot check what individual queries do in flight. Once Flowise logs in, the database trusts every read query from that user. If a table holds emails, phone numbers, or card numbers, select grants return them raw. Column grants are all-or-nothing and break wildcard queries that AI agents often write.

Auditor Read-Only Access + ClickHouse Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You also have to store static database keys inside the Flowise app state. If someone steals that key, they get full read rights from any allowed host. Also, native logs show the shared Flowise user, not the human behind the chat. Teams still need a way to inspect queries and mask sensitive fields in results.

Reducing blast radius for AI database queries

A safer setup combines native ClickHouse select grants with controls on every live query. Start by granting your Flowise role select rights on only the tables it needs. Avoid granting select across the whole database or system tables. Use row policies and quotas in ClickHouse to cap how much data one query scans.

Next, think about how sensitive fields travel back to the language model. Even when an agent needs a customer table, it rarely needs raw national IDs. Masking rules that rewrite emails and card numbers in results keep private data out of prompts. This lets the AI agent run aggregate queries while protecting real user records.

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

Why do wildcard queries from Flowise fail with column grants?

ClickHouse blocks wildcard select queries when a user only has rights on specific columns. The wildcard query works only if the user has rights on every column in that table by default. You must either grant full table select rights or force Flowise to name allowed columns.

Can I restrict Flowise to a group of tables by prefix?

Yes, starting in ClickHouse version 24.10, you can use a trailing asterisk in grant statements. This lets you grant select rights across all tables that share a specific name prefix. It helps when your analytics pipeline builds new daily tables with the same starting name.

Does a ClickHouse read-only role hide sensitive fields like emails?

A table select grant returns all data inside the allowed columns in raw text. You can drop sensitive columns from the grant, or use data masking to rewrite matched fields.

The query runs. The emails stay hidden.