How to Configure OpenHands Oracle Read Only Permissions
To set up openhands oracle read only permissions, create a dedicated database user. Grant that user select rights on specific views or tables only. Teams often reuse broad admin accounts when they test new AI coding agents. Broad accounts let an autonomous agent change rows or drop tables by mistake. A strict read role stops the agent from writing to your database. How openhands oracle read only permissions work in practice OpenHands runs as an autonomous software agent inside its own workspa
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 openhands oracle read only permissions, create a dedicated database user. Grant that user select rights on specific views or tables only. Teams often reuse broad admin accounts when they test new AI coding agents. Broad accounts let an autonomous agent change rows or drop tables by mistake. A strict read role stops the agent from writing to your database.
How openhands oracle read only permissions work in practice
OpenHands runs as an autonomous software agent inside its own workspace container. It writes scripts, runs shell commands, and queries databases to fix bugs. To query an Oracle database, the agent needs a valid user session. Database admins build a custom role that holds only read privileges. They attach this role to a fresh user profile for the agent.
Next, the team puts the database credentials into the agent workspace. The agent reads these values and opens a session with the Oracle server. When the agent sends a query, Oracle checks the role rules first. If the agent tries to update or delete a row, Oracle blocks it. The database only returns rows from tables that the role can read.
Admins can also build custom views to limit what the agent reads. A view can leave out secret columns while keeping standard rows intact. You then grant the agent role select rights on that view alone. This native workflow keeps your setup simple and uses built-in database controls.
What native database roles solve and what they miss
Native Oracle read roles do one job very well for your team. They stop an agent from running write commands or changing table structures. If OpenHands hallucinates a drop command, the database rejects the statement right away. This protects your data integrity during automated debugging and code writing tasks.
Still, static database roles only check who logs in to the session. They do not inspect the contents of individual queries or returned rows. Once the agent has select rights on a table, it reads everything inside. Production tables often hold emails, phone numbers, card numbers, and national IDs. A read role sends all those raw values straight into the agent context.
Read-Only Root Filesystem + AI Agent Permissions: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
From there, the agent sends that raw data to an external model provider. You also have to store static database passwords inside the agent container. Since OpenHands can run arbitrary shell scripts, it can read its own secrets. Native views take too much time to maintain across hundreds of tables. Each schema change breaks views and forces admins to rewrite role permissions.
How to protect sensitive data during agent queries
Teams need controls that work at the query and result level in flight. Instead of building endless custom views, you can apply dynamic data masking. Masking rewrites matched fields like emails or card numbers in the query results. The agent gets valid row shapes for debugging, while sensitive strings stay masked.
You should also add statement rules and row limits to agent sessions. An agent might run a massive join that slows down the whole database. Statement rules can block heavy queries before they hit the database engine. Detailed query logs also help teams see every command the agent ran. This gives security teams clear proof of what data the agent touched.
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 drop tables with a read role?
No, a proper Oracle read role only includes select rights on permissions objects. The database engine blocks any drop, alter, update, or delete commands from running.
Do read permissions hide sensitive columns from the AI agent?
No, standard select permissions return every column and row in the allowed table by default. Unless you build custom views or use data masking, raw values pass through.
Why is storing database credentials in the agent workspace risky?
OpenHands executes shell commands and scripts inside its runtime container to solve tasks. A faulty prompt or script could print those stored credentials into external logs.
Related guides
In this post