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 restricted database role for your agent. Next, you pass those role credentials into the agent workspace container. Engineering teams often start by giving the agent a broad admin role. That shortcut lets the agent run any command in the workspace. A broad role puts live tables and sensitive user rows at risk. The agent can drop a table or read private customer records by mistake. How openhands oracle permissions work in practice OpenHands

AI Agent Permissions + End-to-End Encryption: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up openhands oracle permissions by creating a restricted database role for your agent. Next, you pass those role credentials into the agent workspace container. Engineering teams often start by giving the agent a broad admin role. That shortcut lets the agent run any command in the workspace. A broad role puts live tables and sensitive user rows at risk. The agent can drop a table or read private customer records by mistake.

How openhands oracle permissions work in practice

OpenHands runs as an autonomous coding agent inside an isolated container workspace. The agent writes code, runs shell scripts, and queries databases to finish tasks. When the agent needs database data, it reads login keys from the workspace. Those keys tell the Oracle database which user and role to load.

Database admins control what the agent can do by setting up specific roles. A good role grants read rights on only the schemas the agent needs. Admins also block permissions for dropping tables or changing database structures. You assign this custom role to a dedicated service account for the agent. The agent then logs in with that account during its coding session. Oracle checks the role rules every time the agent sends a query. If a query breaks a rule, the database blocks the action right away.

Where native database roles fall short for agents

Native roles in Oracle do a great job of managing basic table permissions. They let you pick which schemas and views a specific user can read. They also stop a read-only user from running delete or update commands.

Still, static database roles only check who logs in at the start. They do not inspect what individual queries do while the session runs. If an agent has read rights on a customer table, it reads everything. The database returns raw emails, phone numbers, card numbers, and national IDs. Those sensitive fields go straight into the agent context and external model prompts. Also, a role that allows data edits cannot stop a bad update query. If the agent forgets a filter clause, it can overwrite every single row. Static roles also leave you with shared passwords sitting inside container files. Teams have to rotate those static keys by hand when people change jobs.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Best practices for scoping agent database roles

Start by creating a separate database user just for your automated coding agent. Never let the agent share a login account with a human developer. Shared accounts make it impossible to tell who ran a bad query. Give the agent user a role that only reads from safe views.

Views let you hide secret columns before the agent ever runs a query. You can leave out columns that hold phone numbers or card numbers. You should also set resource limits on the Oracle user profile itself. Profile limits stop a poorly written agent query from using all the CPU. Cap the run time and memory for every single query the agent sends. Finally, check your database audit logs often to see what the agent queries. Reviewing these logs helps you spot weird query patterns and tighten your rules.

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

Why should OpenHands use a separate database role?

A separate role keeps the coding agent from touching tables it does not need. It also separates agent actions from human actions in your audit logs.

Can native database permissions hide sensitive column values?

Standard table permissions allow or block an entire table or view at once. To rewrite matched fields like emails or card numbers, you need data masking.

What happens if an agent gets full schema rights?

An agent with full rights can drop tables or alter schemas by mistake. Scoping permissions to read-only views prevents accidental data loss during automated runs.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.