How to Configure OpenHands Cassandra Read Only Permissions
You set up openhands cassandra read only permissions by creating a dedicated database role. You then grant that role select privileges on specific keyspaces or tables. Engineering teams use OpenHands to write code, check bugs, and run database queries. Many teams hand the agent a shared admin account during early testing. Broad roles let an autonomous agent change rows, drop tables, or wipe keyspaces. A single bad prompt or loop can break production data in seconds. How openhands cassandra rea
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 read only permissions by creating a dedicated database role. You then grant that role select privileges on specific keyspaces or tables. Engineering teams use OpenHands to write code, check bugs, and run database queries. Many teams hand the agent a shared admin account during early testing. Broad roles let an autonomous agent change rows, drop tables, or wipe keyspaces. A single bad prompt or loop can break production data in seconds.
How openhands cassandra read only permissions work in practice
Apache Cassandra manages user rights through its built-in role system. An admin first turns on password checks in the main cluster settings. Without this step, any client can read or write any table. Next, the admin creates a new login role just for the OpenHands agent. This role should not have superuser status or admin rights. The admin then grants select privileges to this new role. You can apply these rights to one table or a whole keyspace. When OpenHands runs inside its container, it reads the role name and password. The agent uses these keys to start a session with the cluster. If the agent tries to run an insert or delete query, the node blocks it. The cluster checks the role rights before it runs any query. Teams also limit this role to specific data centers within the ring. This stops the agent from putting heavy load on customer-facing nodes.
What native database roles solve and what they miss
Native roles stop an agent from changing or deleting your stored data. They give you a clean baseline for safe database checks and schema views. Still, static role permissions only decide who can log in and read tables. They do not inspect what individual queries do while a session runs. A read-only role can still run a full table scan without partition keys. In a large cluster, unbounded scans use up memory and slow down nodes. Native roles also cannot filter out sensitive columns from a permitted table. If a table holds emails, phone numbers, or card numbers, select rights return them all. The agent pulls those raw values straight into its prompt window and logs. You also have to store static passwords inside the agent runtime container. If a prompt flaw leaks the runtime state, anyone can take those keys. Finally, cluster audit logs only show the shared role name for every query. You cannot tie a specific read query back to the user who asked the agent.
How to scope agent queries and protect sensitive columns
To reduce risk, teams pair read-only roles with strict schema boundaries. You should never grant select rights across every keyspace in the cluster. Instead, grant permissions only on the exact tables needed for the task. If a table contains national IDs or card numbers, keep it off the list. You can also point the agent at a separate analytics data center. This keeps heavy agent read workloads away from your main production traffic. Always rotate the database password after a long debugging run finishes. Short credential lifetimes lower the risk of leaked environment variables in agent logs. Teams should also review agent container logs to see which queries ran.
Read-Only Root Filesystem + Cassandra Role Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
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 still slow down a cluster with read-only permissions?
Yes, a read-only role can still run heavy queries across many nodes. Queries that scan entire tables without partition keys can spike cluster CPU and memory.
How do I stop the agent from reading sensitive user fields?
Native Cassandra permissions apply to whole tables, not single columns. You must either restrict table permissions or use data masking to rewrite emails and phone numbers in results.
Where should I store the database password for the agent?
Do not hardcode database passwords inside your code repo or task prompts. Pass the credentials as runtime secrets and rotate them right after the task ends.
Related guides
In this post