Model Ledger

Security model

Assume every boundary will eventually be tested.

The architecture limits what each workload can read, what each credential can call, and what the platform can safely do when evidence is incomplete.

Secrets boundary

Per-record envelope encryption; production KEKs live outside the database. The web application and billing worker cannot bulk-decrypt credentials.

Tenant isolation

Row-level security, workload-specific database roles, default-deny grants, and explicit negative tests for browser, RPC, and view access.

Controlled egress

Suppliers can use official endpoints or public HTTPS Responses endpoints. Address validation is automatic; buyer platform keys are never forwarded. Custom endpoints receive the prompts they process.

Accounting integrity

Quota and funds are reserved atomically before dispatch. Unknown upstream outcomes enter reconciliation instead of becoming free usage.

Audited sensitive actions

Credential changes, payout details, withdrawals, and administrative approvals are recorded with actor context and an append-only audit trail.

An explicit trust boundary

The gateway must briefly handle a plaintext supplier key in memory to call an upstream provider. This is not zero-knowledge infrastructure. Plaintext is never persisted or returned, and supplier dashboards never receive consumer prompts.