Every engineering team eventually has this conversation: a developer needs production data to debug something real, and the only ways in are handing over credentials, opening a tunnel, or a DBA running queries on other people’s behalf all day. All three are bad — the first is how incidents happen, the last two don’t scale.
QueryProxy is our answer: a self-hosted portal that sits between your team and your databases, replacing shared passwords with a workflow.
How it works
- A developer writes SQL in a guarded editor, against a connection a DBA granted them. Credentials stay in an AES-256-encrypted vault.
- Before the request is even submitted, the SQL is parsed and inspected:
UPDATE/DELETEwithout aWHEREis rejected,SELECTwithout aLIMITgets one injected (default 1000, hard cap 10000), and administrative statements are blocked outright. - A DBA approves or rejects — from the web queue, or straight from Slack with interactive buttons. Every chat callback is HMAC-SHA256-verified with replay protection, and nobody can approve their own request (a system administrator can override this, and the override is flagged in the audit log).
- A queue worker executes the query asynchronously, streaming results row-by-row through your masking rules — matching values are masked before they touch disk — and writing every step to an append-only audit log.
What ships today
- Teams with Admin / DBA / Developer / Auditor roles and hard isolation
- PostgreSQL, MySQL, MariaDB, SQLite and SQL Server targets (SQL Server needs a custom image: the published one ships without the driver)
- SQL guards enforced by parsing, not pattern-matching
- Slack interactive approvals and a replay-protected Teams HMAC action endpoint
- Column-pattern and content-regex data masking (full / partial / hash)
- Optional TOTP two-factor authentication, enforceable per role
- Streaming NDJSON results, CSV export, automatic retention pruning
- An append-only, filterable, exportable audit log (the application never edits or deletes entries)
Try it in two minutes
docker run -d --name queryproxy \
-p 7432:7432 \
-v queryproxy-data:/var/www/html/storage/app \
-e [email protected] \
-e QUERYPROXY_ADMIN_PASSWORD='choose-a-strong-password' \
queryproxy/queryproxy
Open http://localhost:7432 and log in with that address. The admin variables
create the first account on first boot; without them, create it with
docker exec -it queryproxy php artisan queryproxy:create-admin. To explore
with a demo team instead, set QUERYPROXY_SEED_DEMO=true together with
QUERYPROXY_SEED_DEMO_FORCE=true (the image runs with APP_ENV=production,
which refuses the seeder otherwise) — for demo instances only, not for
production. Its one-time password is printed in the container logs. The
documentation covers everything from
quick start to
Slack setup and the exact
guard rules.
QueryProxy is free and open source under AGPL-3.0. Star it, fork it, run it tonight — and if you find something sharp, the issue tracker and security policy are waiting.