You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stage 1 of the v2 architecture. Replaces #87 (client-side scope enforcement in S3CredentialBackend) with a sovereign sidecar + cap-token + worker architecture. After stage 1, credentials are stored at s3://$BUCKET/bots/<actor_omni_hex>/credentials/<service>.enc (actor_omni-keyed paths, stable across K3 rotation), and the broker has zero credential-decrypt authority.
master_wallet appears in chain history (audit events, scope mutations)
Block-explorer + ENS lookups work on the operator's wallet
Zero third-party trust required (no relay service)
Hosted-relay mode kept as opt-in for gas subsidy + tx batching only (not for privacy — actor_omni hash exposure does NOT weaken K3 due to 2^160 address-space rainbow infeasibility).
What ships in stage 1
Daemon as sovereign sidecar
Localhost HTTP proxy at $XDG_RUNTIME_DIR/agentkeys-proxy.sock (Unix socket; SO_PEERCRED for caller-auth)
Optional TCP localhost:9090 for container deployments
Lazy-fetch + short TTL (5 min) credential cache
Required controls before any proxy operation:
Caller auth via SO_PEERCRED (E1) / pod namespace (E2) / TEE caller pin (E3)
GH issue body — v2 stage 1: Foundation (sovereign sidecar + on-chain identity + credentials-service worker)
Title: v2 stage 1 — Foundation: sovereign sidecar + on-chain identity + credentials-service worker
File via:
Stage 1 of the v2 architecture. Replaces #87 (client-side scope enforcement in S3CredentialBackend) with a sovereign sidecar + cap-token + worker architecture. After stage 1, credentials are stored at
s3://$BUCKET/bots/<actor_omni_hex>/credentials/<service>.enc(actor_omni-keyed paths, stable across K3 rotation), and the broker has zero credential-decrypt authority.Default mode: sovereign
Stage 1 ships sovereign mode as default:
Hosted-relay mode kept as opt-in for gas subsidy + tx batching only (not for privacy — actor_omni hash exposure does NOT weaken K3 due to 2^160 address-space rainbow infeasibility).
What ships in stage 1
Daemon as sovereign sidecar
$XDG_RUNTIME_DIR/agentkeys-proxy.sock(Unix socket; SO_PEERCRED for caller-auth)localhost:9090for container deployments(uid, binary_path) → allowed_services~/.config/agentkeys/envwith proxy URLs + placeholder auth tokenssource ~/.config/agentkeys/envto shell rc (one-time)Broker becomes cap-mint authority
/v1/cap/cred-fetch,/v1/cap/cred-store/credential/*endpoints (moved to creds-service worker)On-chain identity layer (3 contracts on Litentry chain; reserve EVM L2 as fallback)
scope[operator_omni][agent_omni] → {services, read_only}device_pubkey_hash → {operator_omni, actor_omni, role, attestation, k11_cred_id (zero in stage 1)}credentials-service worker
/credential/*endpointss3://$BUCKET/bots/<actor_omni_hex>/credentials/<service>.encagentkeys_actor_omni(NOT master_wallet — stable across K3 rotation)Migration from #87
SidecarCredentialBackendthat uses localhost proxy URL--credential-backend=sidecarMigration steps for existing #87 deployments
agentkeys_user_wallet→agentkeys_actor_omnibots/<wallet>/tobots/<actor_omni_hex>/:--credential-backend=sidecarflagTasks
~/.config/agentkeys/envwriter with proxy URLs + placeholders/v1/cap/cred-fetch,/v1/cap/cred-store)/derive-cred-kek,/sts-credentials) + K3 epoch verification + K10 verification helperagentkeys_user_wallettoagentkeys_actor_omni--credential-backend=sidecarflag--credential-backend=s3(today's v2 stage 1 — sovereign sidecar + on-chain identity + credentials-service worker (#89) #87)Dependencies
Cross-reference
Design context: see consolidated arch.md v2.
Predecessor: today's S3CredentialBackend implemented in PR #87.