Hidden write paths
A role it inherits, a table it owns, a procedure it can run, a default grant: any one of them turns “read-only” into read-write.
Threat model
ROUA is honest about its limits. Read-only stops changes; it does not make data safe to show anyone. Here is where the line is.
--sample-values) catches common formats, but it is a heuristic.The full threat model, including the tool's own supply chain, is in docs/threat-model.md. Found a gap? Report it privately.
A role it inherits, a table it owns, a procedure it can run, a default grant: any one of them turns “read-only” into read-write.
Password hashes, API tokens, card numbers and MFA seeds sit in ordinary columns that a plain SELECT can read.
The demo ends, the contractor leaves, the agent is retired. The account stays, and forgotten accounts are where breaches start.
Pick your database, describe the account, and download the scripts. Your password never leaves this page.
Did the scripts work on your database? Tell us what went wrong or tell us it worked. Both help.
Your scripts appear here.
You get a setup script, an audit script that proves the account is read-only, a revoke script, and a clean-up script.
Is your “readonly” user actually read-only? Get an audit script for any existing account. It only reads, so it is safe to run on production.
Choose a database and an account name, then Get the audit script.
It checks for write privileges, inherited roles, ownership, secret columns, missing expiry and more, with one PASS, WARN or FAIL line per check.
Full: complete toolkit with the roua CLI, masking and live verification.
Tested: every change runs the generated scripts against the real engine in CI, logs in as the account and proves writes fail.
Preview: built from the vendor’s documentation and not yet run against a live service; review before use, and tell us what breaks.
| Database | Support | Versions | Levels | How ROUA works there | Also covers |
|---|---|---|---|---|---|
| PostgreSQL | Full | 13 to 17 | L0–L5 | Full ROUA: levels L0 to L5 with masking, CLI apply, audit and live verify. | Amazon RDS and Aurora, Google Cloud SQL and AlloyDB, Azure Database, Supabase, Neon, Crunchy, Timescale |
| MySQL | Tested in CI | 8.0, 8.4, 9 | L1, L2 | Per-table and per-column SELECT computed at setup, caching_sha2 verifier, locked by a scheduled event at expiry. | Amazon RDS and Aurora MySQL, Google Cloud SQL, Azure Database for MySQL, Percona Server |
| MariaDB | Tested in CI | 10.6, 10.11, 11.4 | L1, L2 | Per-table and per-column SELECT computed at setup, password hash only, locked by a scheduled event at expiry. | Amazon RDS for MariaDB, SkySQL |
| SQL Server | Tested in CI | 2022 (tested), 2017+, Azure SQL | L0, L1, L2 | Login with a hashed password, per-object SELECT, column DENY for secrets, database-wide DENY on every write. | Azure SQL Database and Managed Instance, Amazon RDS for SQL Server |
| Oracle Database | Tested in CI | 23ai (tested), 19c | L1, L2 | READ (not SELECT, so no row locks) per table, a dedicated profile, and a scheduler job that locks the account at expiry. | Oracle Autonomous Database, Amazon RDS for Oracle, Exadata |
| MongoDB | Tested in CI | 6.0, 7.0, 8.0 | L0, L1, L2 | A custom role with find on chosen collections only (no readAnyDatabase), SCRAM-SHA-256 and optional client IP restriction. | MongoDB Atlas (use the Atlas notes), Percona Server for MongoDB |
| Redis | Tested in CI | 7.2, 7.4, Valkey 8 | L1, L2 | An ACL user limited to read commands on your key patterns, no dangerous or admin commands, no pub/sub, hashed password. | Valkey, Amazon ElastiCache and MemoryDB (RBAC), Azure Cache for Redis, Redis Cloud |
| Snowflake | Preview | current | L0, L1, L2 | A dedicated role with point-in-time SELECT (no future grants), key-pair login, no secondary roles, and DAYS_TO_EXPIRY. | |
| Google BigQuery | Preview | current | L0, L1, L2 | A service account with table-level Data Viewer, and query rights that expire through an IAM condition. |
{
"mcpServers": {
"database": {
"command": "your-database-mcp-server",
"env": { "DATABASE_URL": "postgres://roua_agent_docs:@db.internal/appdb" }
}
}
}
Text-to-SQL, coding agents and MCP servers that learn your schema and answer questions.
Store and marketplace reviewers who must try every feature without touching real data.
Sales demos and workshops on synthetic data, with accounts that expire after the event.
Internal and external auditors who need to see, never to change, with masked personal data.
Short-lived access for a support session, revoked the moment it ends.
Dashboards and analysts reading aggregates, with limits that keep costs predictable.
| Profile | Max lifetime |
|---|---|
AI agent agent | 90 days |
Demo demo | 30 days |
App review review | 45 days |
Auditor audit | 30 days |
Support support | 7 days |
Training training | 14 days |
Analytics analytics | 180 days |
Custom custom | 365 days |
| Level | Can read |
|---|---|
| L0 Metadata | Structure only: schemas, tables, columns, types. No rows. |
| L1 Public | Only objects you list as public (catalogs, reference tables). |
| L2 Operational | Business tables minus your deny-list and all secret columns. |
| L3 Analytical | Only aggregate views you list. No base tables. |
| L4 Masked | All in-scope tables through generated masked views. No base tables. |
| L5 Full (break-glass) | All in-scope data unmasked, still never secrets. Max 24 hours, two approvers. |
All levels are available on PostgreSQL. SQL Server, MongoDB, Snowflake and BigQuery also offer L0; the other databases offer L1 (only what you list) and L2 (everything in scope minus exclusions and secrets). See the Levels column above.
Yes. The page is a single file that runs entirely in your browser. Its security policy forbids every network request, so nothing you type can be sent anywhere. You can save the page and use it offline. Where the database accepts it, the scripts contain only a password hash (PostgreSQL, MySQL, MariaDB, SQL Server, Redis), never the password.
Built-in read roles cover every table, including tables created next year, and they include tables full of secrets. They also leave whatever else the account inherited untouched. ROUA starts from nothing, grants read per table as it exists today, hides secret columns, denies writes explicitly where the database supports it, and adds an expiry.
The scripts look at your real database when they run, not when they are generated. Under "Your schema", paste the output of the read-only discovery script to pick tables from a list and preview exactly what the account will read. The preview flags missing schemas, misspelled table names and hidden-column entries that match nothing, and blocks scopes that would read nothing. Setup checks again on the server: it refuses an empty scope and reports names that do not exist. Tables created later stay closed. On PostgreSQL, MySQL, MariaDB and SQL Server, grants are per column, so a column added later (even a secret one) stays hidden until you run setup again. On other databases, the audit catches secret-looking columns that became readable.
PostgreSQL: the password stops working (VALID UNTIL), and roua expire ends open sessions. MySQL and MariaDB: a scheduled event locks the account and ends its sessions. SQL Server: an Agent job disables the login. Oracle: a scheduler job locks the account. Snowflake: DAYS_TO_EXPIRY. BigQuery: query rights end through an IAM condition. MongoDB and Redis have no scheduler, so you schedule the revoke script; the audit flags it if you forget.
Yes, as long as you have an administrator account: Amazon RDS and Aurora, Google Cloud SQL and AlloyDB, Azure SQL and Azure Database, Supabase, Neon, Oracle Autonomous Database and others. Each database in the table above lists the services it covers. Some checks that need superuser (such as reading pg_hba.conf) report a warning instead.
No, and nothing that can read can promise that. Read-only means the account cannot change or destroy anything. Decide what it may see with the scope, the exclusions and, on PostgreSQL, masking.
Yes. On PostgreSQL, the roua CLI plans, applies, verifies and revokes accounts from a roua.yaml file (npx @roua-dev/cli audit --role readonly), also as a Docker image (ghcr.io/promisegithub/roua). The GitHub Action fails a build when an account stops being read-only. AI agents can use the ROUA MCP server. For other databases, the generated scripts are plain files you can keep in version control and run in a pipeline.
The term ROUA (Read-Only User Account) was coined by Promise Okoroji. ROUA is an open standard (draft 0.1) with Apache-2.0 tools. Reviews of the spec, bug reports and attempts to break the audit are very welcome on GitHub.
ROUA is young, and what it becomes depends on the people who use it. Tell us what works, what doesn’t, and what you need. Every idea is read.
What would make ROUA more useful? What should it do next?
Something confusing, missing or could be better, on this site or in the tools.
A script that fails, an audit that looks wrong, a page that misbehaves.
ClickHouse, Elasticsearch, DynamoDB? Or help test Snowflake and BigQuery.
Contributors, reviewers, database vendors and AI-agent platforms are all welcome.
Made an audit pass on an account that can write or read secrets? Report it privately and get credited.
All feedback happens on GitHub, in the open. This page sends nothing anywhere: the links open GitHub in your browser.