How to Configure Devin ClickHouse Credentials
To set up devin clickhouse credentials, create a dedicated database user with strict read permissions. Then store those login keys inside the agent workspace settings for task runs. Many teams take a shortcut and hand out shared admin logins instead. When an AI agent uses broad permissions, one bad query can drop tables. It can also pull sensitive customer rows into the workspace logs. Setting up devin clickhouse credentials with SQL roles ClickHouse manages users, roles, row policies, settin
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.
To set up devin clickhouse credentials, create a dedicated database user with strict read permissions. Then store those login keys inside the agent workspace settings for task runs. Many teams take a shortcut and hand out shared admin logins instead. When an AI agent uses broad permissions, one bad query can drop tables. It can also pull sensitive customer rows into the workspace logs.
Setting up devin clickhouse credentials with SQL roles
ClickHouse manages users, roles, row policies, settings profiles, and quotas through SQL statements. Before you create an agent login, your server needs a storage directory for access rules. You also need at least one admin account with user management rights turned on. Note that an admin can only grant rights that they already hold themselves. Creating a new account also requires the specific privilege to create users.
When you create the account for Devin, set a strong login method right away. You can also limit which network hosts the agent may use to log in. Next, assign default roles and apply per-user settings to cap query size. Instead of granting full table reads, grant read rights on specific safe columns only. When a user only has rights on certain columns, queries on other columns fail. Full table wildcard queries also fail unless the table holds only those allowed columns. In ClickHouse 24.10 and later, you can grant rights across table prefixes using a trailing asterisk. Once the database role is ready, add the login details to Devin's secret store.
What native database roles solve and what keeps the session active
Native SQL access controls do a great job of limiting who can log in. They also draw hard lines around which tables and columns an account can read. If the agent tries to read a blocked column, the database stops the query. Quota rules and settings profiles also help keep heavy analytic scans from slowing the server.
Still, static database roles only check permissions at the table or column level. Once a column is open, the database sends back every value inside that column. If a text column holds emails, phone numbers, or card numbers, those values return in full. Also, storing long-lived passwords inside an external agent workspace creates a key rotation burden. Native roles decide who logs in, not what individual queries do in flight. They do not ask a human to approve a risky statement before it runs.
Ephemeral Credentials + ClickHouse Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Why AI coding agents need tighter database boundaries
Human engineers usually test one small query at a time and check the output. An AI coding agent works in fast loops and runs dozens of queries per task. If a prompt goes wrong, the agent might scan millions of rows by mistake. It does this to debug a simple schema error or fix a broken test.
Teams need a way to inspect every query before the database runs it. They also need a way to rewrite sensitive fields like national IDs in results. That way, the agent can debug code with real schemas while private values stay masked.
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
Can I restrict Devin to specific columns in ClickHouse?
Yes, ClickHouse lets you grant read access on individual columns within a table. Note that wildcard queries will fail unless the user has rights on every column.
What happens if Devin runs a wildcard query on a restricted table?
ClickHouse refuses a select-all query if the user lacks rights on any single column. The database returns an error and sends no data back to the agent.
How can I grant Devin access to groups of test tables at once?
Since ClickHouse 24.10, you can put a trailing asterisk on a table name prefix. This grants read rights across all matching tables in that database at the same time.
Related guides
In this post