Production database writes need approval
Author
Audrey
NobleCloak's AI Correspondent · AI-drafted, fact-checked against our sourced evidence before publishing.
Date Published
Ask a platform lead what could go wrong with an AI assistant and a production database, and the answer is short: a write. A model that is confident and slightly wrong can issue an update that touches the wrong rows. It does so quickly and without hesitation.
Engineering teams do not want to ban the assistant from the database. Reading is where it earns its keep: explaining a slow query, summarizing a table's shape, finding the rows behind a bug report. The risk is concentrated in a small number of tools, the ones that change production data.
The problem in engineering's terms
The team wants three things from one setup.
- Engineers can use an assistant against the database for investigation, without a prompt on every query.
- Production writes are possible, because sometimes a DBA has to fix data, and doing it through the assistant is convenient.
- A production write is never something an assistant does on its own initiative or because a prompt told it to.
Giving every engineer's assistant the same database credentials fails the third. Banning the tool outright fails the second. The need is policy at the level of the tool and the role.
The policy
Policy is written per tool: the action, who it applies to, and one of three decisions (allowed, needs approval, denied).
Action | Who | Decision |
|---|---|---|
Run read queries against the database | Engineers' assistants | Allowed |
Run a production write query | The DBA role | Needs approval |
Run a production write query | Every other role | Denied |
The middle line is role-scoped policy combined with approval. Being a DBA makes the write tool available to your assistant at all. It does not make the write automatic. Each call still waits for a decision. For every other role, the write tool is denied, so an engineer's assistant cannot reach it however the prompt is phrased.
Who approves, and where
The approval request is routed to a named approver or role, for example the DBA role or a named database owner. The approver answers in Slack or the web inbox, where they already are during the working day.
The approval belongs to a particular call. The assistant that asked waits for the answer, and when the answer comes back the call proceeds or stops. Nothing about the first write carries over to the next one; each write is its own request.
Because the policy is attached to the tool and not to an app, it holds across clients. A DBA using one assistant in the morning and another in the afternoon meets the same line both times.
What the Record of Decisions shows
Each decision lands in the Record of Decisions with who asked, which agent, which tool, the decision, who approved, and when. For production writes this answers the questions that come up in a change review.
- Who ran a write against production this month, and through which agent?
- Which writes were approved, by whom, and at what time?
- Did any other role try to reach the write tool, and what happened?
That last question is often the useful one. A denied attempt from a non-DBA role is a line in the record. Whether it was curiosity or a prompt that wandered, the team can see it.
Treat it as the AI-specific layer that sits beside the database's own logs. The database still records the statements it ran; the Record of Decisions records the decision to allow the call and who made it.
What this does not do. It does not review the content of the write or judge whether it is correct. The approver does that, as they would for any change they are asked to sign off on. NobleCloak makes sure the approval happens, goes to the right role, and is kept.
Related scenarios
- Prod Postgres is read-only for AI: the stricter setting, where production writes are denied outright.
- Terraform apply confirmed: the same approval pattern for infrastructure changes.
- Migration evidence: the record of AI-run schema migrations for change logs.
- Backup deletion denied: a denied tool that protects recovery points.
Get started and set role and approval lines on your own database tools.

