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
Labels:backend, priority:high, week-1-4 Assignee: Backend Dev
Context
Per Sections 5, 8 of the Source of Truth, the proxy currently forwards to OpenAI/Anthropic but does NOT store or inject real API keys from an encrypted vault. The credential vault is the backbone of the entire product — "the agent never holds real credentials." Additionally, Binance and generic REST API proxying are not implemented.
HMAC-SHA256 auth: Fishnet stores both API key and secret. On each request, compute HMAC signature from request params + secret, append to request. Agent never sees raw secret.
Hardcoded endpoint blocking:
POST /sapi/v1/capital/withdraw/* — BLOCKED, cannot be overridden
DELETE /api/v3/openOrders — BLOCKED by default, user can override in policy
Allowed endpoints:
GET /api/v3/ticker/*, GET /api/v3/klines — read-only, always allowed
POST /api/v3/order — allowed with limits (max order value USD, daily volume cap)
Per-trade volume tracking: daily trade volume counter in spend DB
Parse order value from request body, check against policy limits before forwarding
4. Generic SaaS API Proxy (Section 5.3 — Week 3-4)
[BE-1] Credential Vault, Binance Proxy & Generic SaaS Proxy
Labels:
backend,priority:high,week-1-4Assignee: Backend Dev
Context
Per Sections 5, 8 of the Source of Truth, the proxy currently forwards to OpenAI/Anthropic but does NOT store or inject real API keys from an encrypted vault. The credential vault is the backbone of the entire product — "the agent never holds real credentials." Additionally, Binance and generic REST API proxying are not implemented.
1. Encrypted Credential Vault (Section 8 — Week 1-2)
Owner: Backend Dev | Files:
src/vault/The entire vault module is missing. This is the highest-priority backend work.
libsodium secretbox(sodiumoxidecrate)SecretKeystruct withzeroizecrate — memory zeroed on dropmlockto prevent swap to diskchmod 600(owner read/write only)GET /api/credentials— returns[{id, service, name, created_at, last_used_at}](never return keys)POST /api/credentials— accepts{service, name, key}, encrypts and stores, returns{id, service, name}DELETE /api/credentials/:id— removes credential, returns{deleted: true}2. Proxy Credential Injection
Wire the vault into the existing proxy pipeline so real keys are injected at request time:
last_used_aton each proxy requestAuthorization: Bearer <key>x-api-key: <key>3. Binance Exchange Proxy (Section 5.2 — Week 3-4)
localhost:8472/binance/api/*->api.binance.com/api/*POST /sapi/v1/capital/withdraw/*— BLOCKED, cannot be overriddenDELETE /api/v3/openOrders— BLOCKED by default, user can override in policyGET /api/v3/ticker/*,GET /api/v3/klines— read-only, always allowedPOST /api/v3/order— allowed with limits (max order value USD, daily volume cap)4. Generic SaaS API Proxy (Section 5.3 — Week 3-4)
localhost:8472/custom/{name}/*-> user-configuredbase_url/*DELETE /repos/*)rate_limitandrate_limit_window_secondsAcceptance Criteria