GET /v1/receipts/:request_id (require_ingress_or_admin_key) still accepted
the bare ABACUS_API_KEY directly with zero per-agent binding, documented at
the time as an intentional exception to the 2026-11-05 per-agent-key fix
(f4fb4fb3/7119565f) that scoped /v1/proxy and /v1/budget. Two real problems:
anyone holding the master secret (meant only for deriving per-agent keys)
got full cross-agent receipt visibility, widening that secret's blast
radius beyond ABACUS_ADMIN_API_KEY's intended scope; and a properly
provisioned agent -- which per the per-agent model only ever holds its OWN
derived key, never the master secret -- could not use the endpoint its own
doc comment says exists for "an agent reading its own spend."
require_ingress_or_admin_key now accepts the same per-agent derived key
require_api_key does (bound to X-Abacus-Agent) or the admin key; the bare
master secret no longer authenticates any route directly. get_receipt adds
an ownership check (receipt.agent_id must match the authenticated agent,
unless admin), with a mismatch reporting the same 404 as "never existed" --
no cross-agent request-id enumeration.
cargo build --workspace clean; full workspace test suite green including 3
new regression tests (cross-agent denial, admin cross-agent read, bare
master key rejected); cargo clippy -p abacus-proxy --all-targets -D warnings
confirmed pre-existing-only (git stash/clippy/pop) on hold_reaper.rs, untouched
by this diff.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>