← Binderdex dev log

A credential that can only read

#ai-agents#infra#automation

An amber magnifying lens shines a beam through a pane of glass onto rows of data, while an arrow reaching for the rows stops at the glass

I finally counted the friction between my coding agents and the production database behind Binderdex, my Pokémon card collection and price app: 132 permission blocks, meaning times an agent's command was refused or paused for my approval, across 68 working sessions. Every read of real data was either refused or needed a hand-typed yes, because the one login that could see production could also change it. A credential that dangerous has to be guarded constantly, and the guarding ate whole sessions.

A second identity, shaped like the trust

The fix was a new role, a database login with its own permissions, that can only read. It runs queries and nothing else. Its transactions default to read-only, every query has a hard time limit, and it picks up tables added later without another grant. The most sensitive tables stay outside its view entirely. A small command I named doctor prints which identity I'm on before any work starts, so I never have to guess whether I hold the read-only login or the powerful one.

The verify run that refused to pass

The first verification failed, and the failure was the design working. A couple of views that the database itself owns can't be granted by my setup at all, so the grant loop skipped them and the script read the gap as a broken state. The script now skips those views on purpose instead of stumbling into them.

The guardrail that said no

The last step was telling my automation settings that these reads may proceed without a prompt. The agent refused to make that edit itself. Its safety layer won't touch its own permission rules, so the change waits on my explicit yes. That's the behaviour I want from a guardrail, even when it's my turn to click.

Give an agent a credential shaped like the trust you have in it, and the prompts become rare and meaningful.

This is the build log for Binderdex (www.binderdex.com) · All entries · Weekly essays