RFC: non-secret exact-agent credential persistence attestation for managed agents
Problem
External controllers that assign work to a named Buzz Desktop agent — schedulers, workflow engines, compliance-gated pipelines — need to verify that the agent's credential is durably held by the OS keyring, bound to exactly that agent, and not sitting in the inline 0o600 JSON fallback. Today there is no supported way to observe this without reading private storage:
ManagedAgentRecord.private_key_nsecis re-hydrated from the keyring on load, so the in-memory record cannot distinguish keyring-backed from inline-fallback storage.SecretStore::probe/loadhave legacy-migration side effects, so an external observer must not call them even if it could.- The only alternatives are scraping
managed-agents.jsonand the OS keychain directly — exactly the kind of undocumented coupling that breaks on every internal refactor, and which downstream integrators should not be doing at all.
The concrete downstream case: an orchestration layer that hands leads/tasks to a named Buzz sales agent must keep its "production ready" gate fail-closed until it can prove exact-agent credential persistence. Without a supported surface that gate can never open against stock Buzz — and the alternatives (forking, or scraping) are worse for everyone.
Proposal
A public, non-secret attestation object issued per managed agent:
{
"schema_version": "buzz.desktop.exact_agent_credential_persistence.v1",
"agent_pubkey": "<hex64>",
"persistence_backend": "os_keyring",
"inline_fallback": false,
"parallelism": 1,
"public_identity_hash": "<hex64>",
"attestation_hash": "<hex64>",
"stock_release_id": "[email protected]",
"issued_at": "2026-08-08T12:00:00Z"
}
- No secret ever enters the code path: the builder takes only "is an inline key present" (boolean), a read-only keyring probe, and public identity material (
pubkey, the public NIP-OA auth-tag JSON). There is no parameter or field that can carry the nsec. - Read-only by construction: presence is derived via
SecretStore::load_all_readonly, neverprobe/load(which can triggermigrate_legacy_key). - Fail-closed: keyring unreachable → error (
attestation_keyring_unreachable); credential absent everywhere → error (attestation_credential_missing). It never guesses.KeyringProbe::Unreachablemust never read asos_keyring— sameOk(None)-vs-Errdiscipline ashydrate_keys_with. - Tamper-evident:
attestation_hashis the SHA-256 of the serialized object with that field empty;public_identity_hashbinds pubkey + auth tag. - Forward-compatible:
persistence_backendis an extensible enum — if #4925 (daz-secrets) lands it becomes a new variant; consumers treat unknown strings as "not the backend I require".
Surface: one read-only #[tauri::command] (get_agent_persistence_attestation), following the get_identity / ManagedAgentSummary non-secret-projection precedent.
Relationship to existing work
- #2754 (RFC: stable extension points for downstream integrations) — this is a concrete, minimal instance of exactly that ask: a stable non-secret contract so downstream distributions don't scrape internals.
- #3721 (RFC: NIP-TR portable trust attestations) — different layer. NIP-TR is about earned capability/trust; this is only about where the credential lives. Complementary, not overlapping.
- #4925 (Replace platform keyrings with daz-secrets) — composes cleanly: the backend enum gains a variant, the attestation contract is unchanged.
- #3205 (export agent NIP-OA attestation to git credential helper) — different surface and purpose; no overlap in code.
Implementation
I have a working implementation with unit tests (pure builder + read-only probe tested against the existing FakeKeyStore harness, sibling _tests.rs files per the file-size convention) and a docs page. PR follows immediately.
Happy to adjust the surface — command vs. settings export, field naming, snake_case vs camelCase — to maintainer preference, or to drop it entirely if you'd rather solve this a different way.
I think there is a useful local readiness signal here, but I would not call the proposed object an attestation. The hash is self-generated, so anyone who changes a field can recompute it. It does not authenticate Buzz, bind a verifier challenge, prevent replay, or prove that the current process used the credential.
There is also an exact-agent gap. Finding an entry named agent:<pubkey> proves that an entry exists, not that its value derives that pubkey. load_all_readonly also brings every stored agent key into this command to answer one presence question.
I would fold the useful part into #2957 as owner-local credential persistence evidence: keyring verified, inline fallback, missing, unavailable, or mismatched. The check should be narrow and should distinguish stored from used by the current launch. A Tauri command is internal renderer IPC, so it does not give external schedulers a stable trust surface. @BradGroux, this may be useful input to the authentication section once the current evidence labels are narrowed.
If an external controller needs a verifiable claim, that needs a separate challenge-bound signed receipt with an authenticated issuer and launch binding. parallelism, stock_release_id, and a self-hash should not be part of the local persistence result.
Thanks @wolfyy970 — your suggestion to fold credential persistence into #2957 as owner-local evidence is now implemented in that PR.
The readiness manifest now includes a credential_persistence check with four states:
- Keyring verified —
SecretStore::probe()confirmed an entry exists foragent:<pubkey>. Ready. - Inline fallback — Key is in the
0o600JSON file because the keyring was unreachable at last save. Ready, with detail noting inline storage. - Missing — No key in keyring or inline storage. Attention.
- Unavailable — Keyring backend is unreachable this boot, so persistence can't be determined. Unknown.
The check is read-only: probe() checks entry presence without loading the secret. As you noted, this does not prove the keyring entry's value derives the agent's pubkey — that would require loading the secret, which this check deliberately avoids. That gap is documented in the Rust doc comment.
The parallelism, stock_release_id, and self-hash fields from the original proposal are not part of this check. The persistence result is scoped to owner-local IPC — it is not a verifiable claim for external schedulers.
PR #2957 also includes the four language-narrowing items from your review.
@BradGroux thanks for picking this up — the four-state credential_persistence check in #2957 is the right shape, and dropping parallelism, stock_release_id, and the self-hash while scoping the result to owner-local IPC is correct.
@wolfyy970's review was right on every point; I've conceded the details in #5312 and closed it. One finding from verifying the load_all_readonly objection is worth having in this thread, because it argues for your probe() choice specifically:
probe() falls back to probe_legacy_key when the blob is missing or lacks the key, so it still finds credentials stored in the old per-key format. load_all_readonly is load_blob() alone, with no legacy fallback. My version would therefore have reported an un-migrated agent as "missing" on first launch after an upgrade — a false negative on a credential that actually exists. Your probe()-based check doesn't have that hole, so the read-only claim and the correctness both hold.
Closing this RFC as resolved by #2957. The remaining piece — a verifiable claim for an external controller — is a genuinely separate design (challenge-bound signed receipt, authenticated issuer, launch binding) and shouldn't ride on the local persistence result. If that need becomes concrete downstream I'll open a fresh RFC scoped to it alone rather than reopening this one.