P
Integration · Database
Govern your Postgres agent.
Give agents read access to your database while blocking writes, drops, and full-table exfiltration.
The risk
What can go wrong when an agent holds Postgres.
A raw Postgres token lets an agent do anything the token can — no boundary, no record. These are the actions you don't want it taking on its own.
- DROP / TRUNCATE / DELETE on tables
- Reading PII columns wholesale
- Schema changes via migrations
- Unbounded SELECT * exfiltration
The HiveKey policy
Scope it. Guard it. Log it.
Give the agent a role with exactly the Postgres actions it needs, then guard the rest in the path.
Scope — granted
- db.select:analytics.*
- db.select:public.orders
Guard — enforced
- Deny INSERT/UPDATE/DELETE/DDL
- Mask PII columns (email, ssn)
- Row-limit reads to 1,000
The proof
Every Postgres action — allowed or denied — on one trail.
postgres-agent · action log live
select orders where day=today scope: read analytics allow
DROP TABLE users guard: no DDL deny
Put your Postgres agent under one policy.
See HiveKey scope, guard, and log your Postgres agent and the rest of your fleet.