SECURITY
Security
How Corsoul keeps your memory local, isolates tenants, and gates the cloud brain.
Beta draft. This page describes Corsoul's current security design and is written to match the actual data flow; formal terms will be finalized before the design-partner beta. If anything here does not match observed behavior, please reach us via Responsible disclosure below.
Where data lives: local-first
- The free tier runs entirely on your machine. Memory is stored in a local PGLite database (default
~/.corsoul/db; on Windows%USERPROFILE%\.corsoul\db). If you chose a cloud embedding model (e.g. OpenAI) at setup, only the memory text needed to create vectors is sent to that provider; with local Ollama or keyword-only, nothing leaves your machine. - Paid cloud consolidation (Sleep) is detached. Your data stays local at rest; only when you trigger a remote Sleep is the working set for that single run transiently uploaded. The server computes in a throwaway temporary database and returns declarative operations — it retains none of the working set.
Tenant isolation
- Every memory is bound to a scope namespace; a scope-bound token confines an external agent to its own namespace.
- The data plane performs per-tenant authorization on every request: a license may read or write only the scopes it governs. Cross-tenant access is refused opaquely (no disclosure of whether a scope exists).
Transport & exposure
- Cloud endpoints are served over TLS (Cloudflare).
- Services bind to
127.0.0.1by default; a non-loopback bind is allowed only when authentication (a secret or scope tokens) is configured, and only behind a trusted reverse proxy / VPN — never directly on the public internet. - CORS is default-deny: with no configured origin, no cross-origin headers are emitted, so a browser page cannot read responses cross-origin.
Authentication & access control
- Bearer credential comparison is constant-time — no length- or content-dependent timing leak.
- Credential surfaces apply per-IP failed-attempt backoff to blunt online brute force.
- The cloud cognition engine is gated by a signed time beacon: no valid entitlement, no cloud consolidation. Beacons carry device binding and a short TTL.
What the server stores
- We do not store your memory content. The server keeps only operational metadata: a metering ledger (per-run timestamp, deep points, token estimates, cost estimate), license↔scope bindings, device bindings, and daily quota counters.
- Retention periods and deletion are detailed on Data deletion & retention.
Graceful shutdown & data integrity
- On a termination signal every service performs a coordinated shutdown: refuse new requests → drain in-flight work → flush metering → CHECKPOINT the store before exiting, preventing restart-induced store tears.
Responsible disclosure
We welcome good-faith security research. Please send details to support@corsoul.com (interim address pending launch; a formal PGP key and SLA land with the beta). We commit to: no legal action against good-faith research that does not exfiltrate data or disrupt service; please allow a reasonable remediation window before public disclosure.