How to Configure OpenHands Cassandra Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up openhands cassandra approval by turning on agent confirmation mode and limiting database roles. This forces a human to check every command before the agent runs it on the database. Many teams start by giving their coding agent a wide admin role in a sandbox. When that agent moves toward real systems, wide permissions become a major risk. One bad prompt can cause the agent to drop a keyspace or overwrite table rows. How openhands cassandra approval works in practice OpenHands runs t

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 openhands cassandra approval by turning on agent confirmation mode and limiting database roles. This forces a human to check every command before the agent runs it on the database. Many teams start by giving their coding agent a wide admin role in a sandbox. When that agent moves toward real systems, wide permissions become a major risk. One bad prompt can cause the agent to drop a keyspace or overwrite table rows.

How openhands cassandra approval works in practice

OpenHands runs tasks inside a sandbox container where it writes code and runs shell commands. When the agent needs to query Cassandra, it prepares a command in that container. If you turn on the confirmation setting in OpenHands, the agent pauses before running the shell step. It shows the planned command to the user and waits for a manual click.

On the database side, admins set up dedicated roles for the agent session. Cassandra includes a built-in role system that assigns permissions to specific keyspaces and tables. You can give the agent role read permissions on one keyspace while blocking schema changes. When the user approves the step in OpenHands, the agent logs in with that role. The database then checks if the assigned role has permission to run the query.

What native controls solve and where gaps remain

Combining agent confirmation prompts with database roles stops many basic accidents. Database roles prevent the agent from touching keyspaces outside its assigned scope. Meanwhile, the OpenHands confirmation step lets a developer catch obvious mistakes in the shell command. Together, these controls establish who can log in and which tables they can read or write.

Still, native setup options leave an operational gap during live execution. Static database roles decide who logs in, not what individual statements do in flight. If an agent needs write permissions to fix a bug, the database allows any write statement. Also, the OpenHands confirmation prompt only happens on the developer machine running the agent. It does not route the query to a central security team for review.

Wait times also create alert fatigue when a human must click approve on every shell step. Developers often turn off confirmation mode so the agent can finish long tasks faster. Once confirmation is off, the agent runs queries without a second look. Also, native database roles do not rewrite sensitive fields like emails or phone numbers in query results.

Approval Chains & Escalation + Cassandra Role Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Designing safer workflows for autonomous database tasks

To keep production data safe, teams must separate read tasks from write tasks. Give the agent a read-only role for daily debugging and log checks. When the agent needs to change data or alter a table, require a separate review step. Have a peer on the team inspect the exact query text before it runs.

You should also mask personal data in query results whenever an agent reads production tables. Masking rewrites matched fields like card numbers or national IDs before the output returns. This keeps private customer details out of the agent context window and external model logs. Clear audit logs of every query also help teams track what the agent did during a session.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can OpenHands pause before running a database query?

Yes, you can turn on confirmation mode in the OpenHands settings. This makes the agent wait for a user click before running any shell command.

How should we scope Cassandra permissions for an AI agent?

Create a dedicated role in Cassandra that only has read permissions on specific tables. Never give the agent superuser rights or broad schema change permissions by default.

Why are static database roles not enough for coding agents?

A static role grants the same permissions for the whole session once the agent logs in. It cannot pause a single risky delete statement or rewrite emails and phone numbers in results.

The query runs. The emails stay hidden.