How to Configure OpenHands Oracle Permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up openhands oracle permissions by creating a narrow database user role. You then give that specific role to your coding agent workspace. Many engineering teams start by sharing a standard admin account during testing. That shortcut gives the agent power to drop tables or read private rows. A bad prompt or agent loop can then wipe out key business data. Setting strict boundaries early stops the agent from changing schemas or reading secrets. How openhands oracle permissions work in pra

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 oracle permissions by creating a narrow database user role. You then give that specific role to your coding agent workspace. Many engineering teams start by sharing a standard admin account during testing. That shortcut gives the agent power to drop tables or read private rows. A bad prompt or agent loop can then wipe out key business data. Setting strict boundaries early stops the agent from changing schemas or reading secrets.

How openhands oracle permissions work in practice

OpenHands runs tasks inside a workspace that holds your database login credentials. When the agent writes a query, it logs in as that database user. Oracle checks the user role to see which tables the agent can read. You must build a dedicated role inside the database for the agent alone. Grant this new role permission to read only the schemas needed for work. Never attach default admin rights or broad write rules to this agent account.

Good setups separate read tasks from write tasks at the database role level. If the agent only checks data bugs, give it a strict read role. You can also build custom views that leave out sensitive columns by default. Grant the agent permission to read those clean views instead of raw tables. This native setup limits what the agent can touch during a normal session. You should also set resource limits so one bad query cannot freeze servers.

Where native database roles fall short

Native roles decide who can log in and which tables they can read. They do not check what a single query does while it runs. An agent with table read rights can still pull thousands of customer records. If a table holds emails, phone numbers, or card numbers, the agent reads them. Those raw values then enter the agent context window and go to external models. Native views can hide whole columns, but maintaining hundreds of custom views takes time.

Write permissions create an even bigger risk during automated coding runs. An agent might need permission to update rows in a staging database. A role that allows row updates also allows an update without a filter. One flawed statement from the agent can overwrite every row in that table. Static database roles cannot pause a dangerous command to ask a human first. Teams also struggle to link shared role logs back to a specific prompt.

AI Agent Permissions + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing live queries and sensitive data

Safe agent workflows need checks that work on each statement in real time. Instead of giving the agent raw credentials, teams should control the session directly. Every query from the workspace should pass through a check before it runs. If an agent sends a command to drop or alter data, it stops. A human reviewer can then check the statement and approve or deny it.

Data masking also protects private fields without breaking the database schema. When a query runs, masking rewrites matched fields like national IDs in results. The agent gets valid table structures so it can still write good code. Meanwhile, real emails and card numbers stay safe inside the database. Detailed query logs also show every command the agent ran during its task. This helps security teams audit agent actions without digging through raw database files.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What database role should an AI coding agent use?

Create a custom role with read-only permissions on non-sensitive tables or safe views. Never give the agent a shared admin account or full schema ownership rights.

How do we stop an agent from reading customer data?

You can restrict the database role to read only synthetic test schemas. For real schemas, use dynamic data masking to rewrite emails and card numbers in results.

Can we allow write queries without risking whole tables?

Native roles alone cannot stop a broad update statement once write rights exist. You need statement-level checks or human approval workflows before write commands can run.

The query runs. The emails stay hidden.