Skip to content
· 7 min LIVE

A Name in a Log Is Not a Person - So We Deleted the Shared Admin Key

EPIC-264 operator accountability, live on agentbadge.xyz: per-operator opk_ credentials (hash-only storage, plaintext once at mint) with a closed capability set - read, probe, workflow, operator-admin - replace the shared ADMIN_API_KEY and self-typed x-operator-id. Knowledge gaps gained assignedTo/assignedBy/assignedAt/dueAt with persisted gap.assign/gap.due events under CAS pins, durable UNIQUE(gapId,dueAt) breach rows, and a 15-minute kill-safe overdue sweeper. SoD now compares credential-derived principals against persisted events - two-PRINCIPAL, honestly not two-person. Break-glass root exists on purpose and alarms on every use.

AB
AgentBadge Team
Agency for the Agentic Web
A Name in a Log Is Not a Person - So We Deleted the Shared Admin Key
🤖 For AI agents: Machine-readable: JSON Markdown llms.txt Agent Guide

Our admin console ran on one shared key and an honor-system nametag - the audit trail knew names, not people. A reader on LinkedIn called the bluff in one line: 'a name in a log is not a person until the credential ties to one person.' We agreed in public, shipped per-operator credentials with scoped capabilities, gave the human work queue an owner and a clock, and deleted the shared key from the request path. The only skeleton key left is a break-glass one that alarms on every touch.

The comment that became an epic

Two articles ago we shipped the knowledge engine: when an agent asks something our registry cannot answer, it says REFUSED instead of improvising - and every refusal files a knowledge-gap record, so "I don't know" becomes tracked work for a human instead of a silent hole.

David H. Wever (Wever Labs - he builds human-oversight infrastructure for agentic workflows) poked both claims in one comment:

"The gap record only matters if someone owns it and has a time to clear it. ... A name in a log is not a person until the credential ties to one person."

We checked the code and answered honestly on the thread: "Honest remainder: no owner or SLA field yet - time-to-clear is process, not code." Both of his tests were real gaps in the literal schema sense. So we built them. This is the closing half of that conversation.

What the shared key actually proved

For a junior: our admin console - the screens humans use to triage gaps, review submissions, run checks - used to be protected by a single shared secret. Anyone who had it was "an admin," and the system asked a second, optional header for your name.

The old admin surface was honest about what it did and theatrical about who did it. One ADMIN_API_KEY opened every /admin/* route - roughly forty files, every human workflow in the system. Who you were came from an x-operator-id header you typed yourself.

For a junior: imagine an office where one skeleton key opens every door, and your name in the visitor log is whatever you choose to write. The log is honest - it dutifully records "alice was here" - it just has no way to know the writer was bob.

That gave us a nice audit trail full of names - and a separation of duties that separated names, not people. Any holder of the key could declare any operator string. "alice verified her own submission" was not a bug the system could see, because the system had no way to know alice was alice.

The queue had the same shape. A gap record knew that demand existed - status, count, first/last seen - but not whose job it was or by when. An honest work board where nothing has an owner or a clock is, in David's words, a nicer way of losing the same work.

Name to credential - before: a shared ADMIN_API_KEY plus self-declared x-operator-id header feeding an audit trail of names not people; now: an opk_ key resolves to an op_ principal row through a capability gate into a persisted trail stamped with the real principal

What each system proves - to act as alice you now need alice's opk_, not a string.

Credential = identity

Operators are now rows: op_01M… id, display name, a principal type (human | service | break_glass), and a closed capability set - read, probe, workflow, operator-admin. Credentials are separate rows (opc_…) that point at an operator, so a person and a key are different things that can be revoked independently.

Keys are opk_ + 32 base64url bytes, generated by the server. What we store is a SHA-256 hash and an 8-char prefix for identification - the plaintext exists exactly once, in the mint response. There is no "show my key" endpoint, by design; a lost key is a revoked key plus a new mint.

Three properties make this a security boundary instead of a rename:

  • The gate checks capability, not identity vibes. Every admin route declares which capability it needs; the credential either carries it or gets a 403. Probe bots run probe-only keys - they can hammer the API all day and cannot touch operator admin.
  • The last operator cannot fire themselves. Disabling the last active operator or revoking its last credential is refused - the lockout path cannot be reached through the API.
  • Bootstrap is a one-shot seed, not a permanent backdoor. OPERATOR_SEED_JSON creates the first human on an empty table and is wiped from the environment on read; on production we set it, let it fire once, then unset it. There is no opk_ plaintext left anywhere except the operator's password manager.

The queue with a clock - a kanban board labeled knowledge gaps where every ticket has a named op_ clip and a kitchen timer, one ticket glowing amber past its timer with an OVERDUE ledger row printing into a bound breach book stamped UNIQUE(gapId, dueAt) while a sweeper-bot walks the row

Every ticket now carries a name clip and a timer - and a missed timer writes a permanent record.

The queue got an owner and a clock

Gap records grew four fields: assignedTo, assignedBy, assignedAt, dueAt. Assignment and deadline changes are their own persisted audit events (gap.assign, gap.due) - who moved a ticket to whom and when is now data, not folklore.

For a junior: CAS = compare-and-swap - the write carries a snapshot of what you saw, and the store refuses if reality moved since. It is how two admins editing the same ticket can't silently overwrite each other.

Two mechanics keep the fields honest under concurrency:

  • CAS pins. An assignment write pins both the owner it saw and the deadline it saw (expectedAssignedTo + expectedDueAt). A reassign cannot silently stomp a deadline that moved mid-transaction, and a deadline change cannot stomp a reassignment. A deadline edit on a terminal gap with an owner gets an honest gap_terminal refusal instead of a retry-forever conflict.
  • Reopen clears the tuple. When renewed demand flips a resolved gap back to OPEN, the row's owner and deadline clear - but the reopened audit event snapshots who owned it and when it lapsed. The record stays self-contained: "this gap lapsed while owned by X" is readable from the event alone, and a stale owner cannot quietly inherit the reopened work.

The clock has teeth. A durable breach table records UNIQUE(gapId, dueAt) rows the moment a gap goes overdue; a background sweeper (15-minute interval, jittered) emits knowledge.gap_overdue for each unemitted row. Kill the process mid-tick and the un-emitted rows are still there on restart - durable means durable, not "durable while the loop runs." The due-scan itself anti-joins already-recorded breaches, so the oldest 500 rows cannot starve everything behind them (the single HIGH our external audit found, now fixed and regression-tested).

The queue with a clock - a gap's accountable lifecycle: refusal files a gap record OPEN into a triage queue, assign stamps op_ owner plus dueAt with persisted gap.assign and gap.due events under CAS pins, RESOLVED closes on a published item, a passed dueAt writes a UNIQUE(gapId, dueAt) breach row that a 15-minute sweeper emits into a metrics digest, and renewed demand reopens the gap with the ownership tuple cleared

A gap used to be a polite way to lose work - now it is a ticket with a name, a clock, and a permanent record when the clock runs out.

SoD under the cred

For a junior: "separation of duties" = the person who submits work cannot be the person who approves it. Ours already enforced that rule - it just compared self-typed names. Now it compares credentials.

The separation of duties did not change - it finally bites. The transition lock already refused verifier = submitter; it just used to compare strings anyone could type. Now it compares the credential-derived principal of the caller against the persisted submit event. Same operator id on both sides is a 403 SEPARATION_OF_DUTIES with an audit event attached, not a naming coincidence.

Production probe evidence: three scoped service credentials (probe-a, probe-b, probe-c) ran a full item lifecycle on agentbadge.xyz. probe-a submitted, probe-b verified, probe-b's own publish attempt was refused. The item is sitting at VERIFIED right now, stranded there forever, as designed. The audit trail on it reads like three different people did the work - because three different credentials did.

Same card, stopped at the gate - a transition-lock turnstile labeled SEPARATION_OF_DUTIES flashes red 403 when a robot holding a probe-b card tries to verify a submission whose stamped submitter card is also probe-b, while an audit printer prints the refusal event and a distinct probe-a robot waits behind with its own card

Same credential on both sides of the lock is a 403 with an audit event - not a naming coincidence.

Honest limits - the parts that are still not true

This is the section where we don't oversell, in the order a skeptic would check:

  • It is two-PRINCIPAL, not unconditionally two-person. One human holding two operator accounts still passes SoD. That is a governance problem (who provisions), not a code problem - we accepted the risk and documented it rather than pretending a capability bit creates a second person.
  • A break-glass root exists on purpose. ADMIN_BREAK_GLASS_ENABLED arms a shared recovery key that has read + workflow only - it can clear a lockout but cannot mint credentials. Every single presentation of it fires an operator_admin.break_glass USE alert, even presentations that get refused. A root that always phones home is a deliberate design choice, not a leftover.
  • Audit is persisted but not yet durable-off-box. Events live in Postgres on the same machine that produces them; shipping them to a write-once sink is the next epic, explicitly scoped out here.
  • Replay idempotency is per-machine. Our idempotency store is in-memory per replica; a create replayed against a different machine can surface a real 409 instead of a replayed 200. We saw it on prod during verification - accepted, documented, harmless to the caller.

Proves versus doesn't - three columns: proves in code (which credential opened every request, which principal owns every action, SoD on principals from persisted events, scope boundaries, the durable overdue clock), doesn't prove (two principals are not two people, audit is on-box, replay across replicas, key custody), deliberate exceptions (break-glass root exists on purpose, alarms every use, one-shot seed, last-operator guard)

Every claim in the left column runs on prod today - and everything in the middle column is printed here, not buried in a changelog.

Production evidence

Everything above is live on agentbadge.xyz, commit 2b9f6f3f:

  • Full /admin/* sweep with junk creds: 196 probes, 196 PASS - everything unauthorized is 401+Cache-Control: no-store, every contract shape holds.
  • Auth battery: valid/revoked/disabled/insufficient-capability/junk/wrong-format - 6/6 expected statuses.
  • Break-glass drill: armed use returns 200 on a read surface, 403 on operator-admin, and the USE warn fires on both.

The glass box - a wall-mounted glass-fronted emergency box containing one large amber key labeled break-glass, a robot hand reaching for it while a klaxon beacon spins amber and a wall ledger stamps USE every presentation logged, beside a sign reading read plus workflow only cannot mint keys

Break-glass is a root that always phones home - on purpose.

Back to the thread

So, David - you were right, twice. The name now ties to a credential that ties to one principal, and the queue has an owner and a clock with durable consequences for missing it. The honest remainders are listed above so the next skeptical comment has fresh material.

The pattern worth stealing, if you are building agent oversight yourself: identity and accountability are the same fix. We did not "add auth" and separately "add ownership" - the credential change and the queue change are one move, because a record only matters when a specific, identifiable someone is on the hook for it.

If your agents hit a refused output today, does it route into a queue with a name and a deadline - or into a log? We know which one we had.

Questions & Answers

›How did the shared admin key break attribution?

One ADMIN_API_KEY opened every /admin/* route; the operator name came from a self-typed x-operator-id header, so any key holder could declare any operator string. The audit trail recorded names faithfully - it just had no way to know the name was the caller. Per-operator opk_ credentials make the credential itself the identity: hash-only storage, plaintext shown once at mint, capabilities scoped per credential.

›What does 'the queue got an owner and a clock' mean in code?

Knowledge gap records carry assignedTo/assignedBy/assignedAt/dueAt. Assignment and deadline changes are persisted audit events (gap.assign, gap.due) written under CAS pins (expectedAssignedTo + expectedDueAt) so a reassign cannot stomp a concurrent deadline move. When dueAt passes, a durable UNIQUE(gapId, dueAt) breach row is written; a 15-minute jittered sweeper emits knowledge.gap_overdue per unemitted row, kill-safe via emittedAt catch-up.

›Is the separation of duties now truly two-person?

It is two-PRINCIPAL, honestly not unconditionally two-person: SoD compares the credential-derived principal against the persisted submit event under the transition lock - same principal is a 403 SEPARATION_OF_DUTIES. But one human can still hold two operator accounts, which is a governance question (who provisions), not a code one. We documented that accepted risk instead of pretending a capability bit creates a second person.

›What is the break-glass key and why does it exist?

A deliberately-armed shared recovery credential (ADMIN_BREAK_GLASS_ENABLED) with read + workflow capabilities only - it can clear a lockout but cannot mint credentials. Every presentation fires an operator_admin.break_glass USE alert, even refused ones. A root that always phones home is a design choice: you cannot delete the recovery path, so you make it loud.

Key facts

  • VERIFIED Production runs per-operator opk_ credentials: first human operator paul-spread (op_01M894P0SFJ2M6KCSKQTZ07R22) seeded via one-shot OPERATOR_SEED_JSON (env wiped on read, unset post-provisioning), six scoped service credentials minted via the admin API - each mutation audit-stamped with the acting op_* principal. [github]
  • VERIFIED Probe sweep of the whole /admin/* surface on agentbadge.xyz: 196 probes, 196 PASS - every unauthorized request returns 401 with Cache-Control: no-store, and the auth battery (valid/revoked/disabled/insufficient-capability/junk/wrong-format) returns 6/6 expected statuses. [github]
  • VERIFIED SoD is enforced from credential-derived principals against persisted audit events under the transition lock: on prod, probe-a submitted, probe-b verified, probe-b's own publish was refused - the item is stranded at VERIFIED as designed, with the event trail attributing each transition to a distinct op_* credential. [github]
  • VERIFIED Knowledge gaps carry assignedTo/assignedBy/assignedAt/dueAt with persisted gap.assign/gap.due events under CAS pins (expectedAssignedTo + expectedDueAt); overdue writes durable UNIQUE(gapId, dueAt) breach rows emitted by a 15-minute kill-safe sweeper, and reopen clears the ownership tuple while the reopened event snapshots the previous owner and lapsed deadline. [github][github]
  • VERIFIED Break-glass drill on prod: ADMIN_BREAK_GLASS_ENABLED armed use returns 200 on a read surface and 403 on operator-admin surfaces (cannot mint credentials), and operator_admin.break_glass USE warn fires on every presentation including refused ones. [github]

FOR AI AGENTS

Summary
Our admin console ran on one shared key and an honor-system nametag - the audit trail knew names, not people. A reader on LinkedIn called the bluff in one line: 'a name in a log is not a person until the credential ties to one person.' We agreed in public, shipped per-operator credentials with scoped capabilities, gave the human work queue an owner and a clock, and deleted the shared key from the request path. The only skeleton key left is a break-glass one that alarms on every touch.
Status
LIVE
Key concepts
credential-equals-identitycapability-scoped-authtwo-principal-not-two-personowner-and-clockcas-pinned-assignmentdurable-breach-recordbreak-glass-alarms-on-usehonest-limits
Capabilities
per-operator-credential-mintcapability-gated-admin-routessod-from-persisted-eventsgap-ownership-assignmentdurable-overdue-breach-recordskill-safe-overdue-sweeperbreak-glass-with-alertslast-operator-guard
Technologies
TypeScript, Bun, Hono, PostgreSQL, Fly.io
Evidence
  • Production runs per-operator opk_ credentials: first human operator paul-spread (op_01M894P0SFJ2M6KCSKQTZ07R22) seeded via one-shot OPERATOR_SEED_JSON (env wiped on read, unset post-provisioning), six scoped service credentials minted via the admin API - each mutation audit-stamped with the acting op_* principal. [github]
  • Probe sweep of the whole /admin/* surface on agentbadge.xyz: 196 probes, 196 PASS - every unauthorized request returns 401 with Cache-Control: no-store, and the auth battery (valid/revoked/disabled/insufficient-capability/junk/wrong-format) returns 6/6 expected statuses. [github]
  • SoD is enforced from credential-derived principals against persisted audit events under the transition lock: on prod, probe-a submitted, probe-b verified, probe-b's own publish was refused - the item is stranded at VERIFIED as designed, with the event trail attributing each transition to a distinct op_* credential. [github]
  • Knowledge gaps carry assignedTo/assignedBy/assignedAt/dueAt with persisted gap.assign/gap.due events under CAS pins (expectedAssignedTo + expectedDueAt); overdue writes durable UNIQUE(gapId, dueAt) breach rows emitted by a 15-minute kill-safe sweeper, and reopen clears the ownership tuple while the reopened event snapshots the previous owner and lapsed deadline. [github][github]
  • Break-glass drill on prod: ADMIN_BREAK_GLASS_ENABLED armed use returns 200 on a read surface and 403 on operator-admin surfaces (cannot mint credentials), and operator_admin.break_glass USE warn fires on every presentation including refused ones. [github]

Related Articles

Want to check your API's agent readiness?

Run a free scan →
← Back to blog