ROUA: read-only database accounts

v0.5.0
io.github.PromiseGithub/roua Checked 5 hours ago Published 5 days ago

Create and audit read-only database accounts for AI agents: PostgreSQL, MySQL, SQL Server and more.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_engines List ROUA databases

List the databases ROUA supports, how well each is tested, and how read-only access works on each.

audit_script Audit script for an existing account

Write a read-only audit script that checks whether an existing database account is really read-only (write privileges, roles, ownership, secret columns, expiry). Returns the script text and how to run it. Connects to nothing.

ParameterTypeDescription
engine *string
name *stringAccount, role, login or user name to audit.
databasestringSQL Server database, MongoDB auth database or BigQuery project id.
hoststringMySQL/MariaDB host part of 'user'@'host' (default %).
locationstringBigQuery location (default US).
rolestringSnowflake role to inspect (default NAME_READ).

generate_account_scripts Generate ROUA account scripts

Generate the scripts that create a read-only ROUA account (setup, audit, revoke, drop) and write them to a new folder. The password or private key is written to a file in that folder with owner-only permissions and is never returned. Nothing is run against any database: a human runs setup as an administrator.

ParameterTypeDescription
engine *string
expires_at *stringISO 8601 UTC, within the profile's maximum lifetime.
name *stringAccount name: lowercase, 3-63 chars, e.g. roua_agent_docs.
output_dir *stringAbsolute path of a new or empty folder to write the scripts to.
owner *stringAccountable person (email).
profile *string
purpose *string
allowed_sourcesarray
columns_denyarrayschema.table.column to hide besides detected secrets.
databasestringDatabase, project id (BigQuery) as the engine needs.
excludearrayschema.table patterns to leave out.
levelstringPostgreSQL only (default from the profile).
locationstringBigQuery location.
max_connectionsinteger
modestringOther engines: everything in scope minus exclusions (L2), only listed objects (L1), or structure only (L0, where the engine supports it).
objectsarrayListed mode / PostgreSQL L1: schema.table (collections for MongoDB, key patterns for Redis).
password_envstringName of an environment variable of this server holding the password. Default: generate one.
schemasarraySchemas, databases (MySQL), owners (Oracle) or datasets (BigQuery).
statement_timeout_sinteger
warehousestringSnowflake warehouse.

audit_postgres_role Audit a PostgreSQL role (live)

Connect with ADMIN_DATABASE_URL (from this server's environment) and audit a PostgreSQL role: every path to write, secret columns it can read, expiry and limits. Only reads catalog views; changes nothing.

ParameterTypeDescription
role *stringRole name to audit.

preview_scope Preview an account's scope against a schema

Before generating anything, show exactly what an account would read in a real schema: which tables, which columns stay hidden and why, and which schemas, listed names, exclusions or hidden-column entries match nothing (typos). Pass the output of the discovery script (JSON, CSV or psql table). Connects to nothing.

ParameterTypeDescription
engine *string
schema *stringOutput of the discovery script (discover.sql / discover.js) or roua discover: JSON, CSV/TSV with schema,table,column headers, or psql table output.
columns_allowarray
columns_denyarray
databasestringMongoDB database.
excludearray
includearray
levelstringPostgreSQL: L0 to L5.
modestringOther engines.
objectsarrayListed objects (L1, or analytics views for PostgreSQL L3).
schemasarray

discover_postgres_schema Read a PostgreSQL schema (live, names only)

Connect with ADMIN_DATABASE_URL and list schemas, tables, views and columns with their types: names only, never rows. Use it to learn how a database is structured, or feed it to preview_scope.