How to Configure Flowise ClickHouse Permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up flowise clickhouse permissions by creating a dedicated database user with strict read rights. Then you give that user key to your visual workflow builder. Teams often rush this step during early testing. They hand the visual tool a main admin login just to make queries work fast. That broad login lets an automated workflow read private tables or drop data by mistake. A safer setup uses native database rules to limit what the app can touch. How to set up flowise clickhouse permission

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 permissions by creating a dedicated database user with strict read rights. Then you give that user key to your visual workflow builder. Teams often rush this step during early testing. They hand the visual tool a main admin login just to make queries work fast. That broad login lets an automated workflow read private tables or drop data by mistake. A safer setup uses native database rules to limit what the app can touch.

How to set up flowise clickhouse permissions in SQL

ClickHouse treats users, roles, row rules, settings profiles, and quotas as access items. You can manage all of these items with SQL statements. First, you must turn on SQL access control in the server settings. This setup needs a storage folder path on the server. It also needs at least one initial user with access management turned on. Once you enable this feature, that admin user can make new accounts and roles. Still, a user can only grant the rights that they hold themselves.

To set up the login for your workflow app, you run a user creation statement. Making a new user requires the user creation privilege. During this step, you pick the login method and assign default roles. You can also set the exact network hosts the user may connect from. Locking the host list to your app server blocks outside logins. Next, you attach a role or grant read rights to that new user.

Using column grants to limit data exposure

Database admins often grant read rights on whole tables. For an AI workflow, table-wide rights are often too broad. ClickHouse lets you grant read rights on specific columns instead. If you grant read rights on just two columns, the user can query only those two. Any query that asks for a third column will fail right away.

Wildcard queries that ask for all columns will also fail and return no data. Those wildcard queries only work if the table holds just the allowed columns. This rule forces the workflow tool to ask for permitted columns by name. In newer database versions, you can also grant rights across tables that share a name prefix. Prefix grants help when your app reads from many daily log tables.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native database rules solve and what they miss

Native database roles and column grants solve the login boundary problem. They decide which server can log in and which columns that account can read. If a bad prompt tries to read a forbidden table, the database stops the query. Setting quotas and settings profiles also stops a bad workflow from using all your server memory.

Still, static database roles leave an operational gap during live runs. A role decides who logs in, not what each query does in flight. The workflow app uses one shared database account for every end user and every prompt. The database cannot tell which human user triggered a given query inside the app. Also, an allowed column might hold mixed text with emails, phone numbers, or card numbers. Column grants either allow the whole column or block it completely. They cannot mask an email or phone number inside a text field while returning the rest. Static grants also cannot pause a risky query to ask a human for approval.

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

Why do wildcard queries fail after setting column permissions?

ClickHouse blocks wildcard queries when a user only has rights on certain columns. The query returns no data unless the table contains only those exact granted columns. Your workflow must list the allowed column names in every query.

How do I turn on SQL role management in ClickHouse?

You must set a storage folder path in the server settings file. You also need to give at least one user account the access management flag. After that, you can create users and roles with standard SQL statements.

Can a Flowise database user grant rights to other accounts?

No, not if you configure the account with read rights only. In ClickHouse, a user can only grant privileges that they hold themselves. Keep user creation and access management rights off your app account.

The query runs. The emails stay hidden.