Memorylayer keeps the service model narrow: GitHub identity, workspace-scoped keys, hashed secrets, hardened browser boundaries, audit trails, and Postgres-backed isolation.
Users authenticate through GitHub OAuth, so Memorylayer does not store passwords.
Workspace API keys are shown once, hashed at rest, and revocable independently.
CSP, frame blocking, host checks, and origin checks reduce browser-side attack paths.
Memory writes, bridge calls, invites, keys, and usage events are recorded.
The current controls are designed to be understandable and inspectable.
| Area | Current behavior | Operator action |
|---|---|---|
| Identity | GitHub OAuth only; no service-side passwords. | Use GitHub account controls and organization policy. |
| API keys | Tokens are shown once, stored as hashes, and scoped to one workspace. | Use separate keys per agent or integration. |
| Revocation | Keys can be revoked from the workspace dashboard. | Rotate keys when an integration changes hands. |
| Isolation | Each workspace uses its own Engram schema. | Create separate workspaces for separate projects or teams. |
| Browser hardening | CSP, frame blocking, nosniff, referrer policy, permissions policy, and HSTS on HTTPS. | Keep custom embeds and third-party scripts out of the service surface. |
| Request guards | Host allow-list, browser origin checks, body-size limits, and basic auth/API throttles. | Set allowed hosts and rate limits in deployment environment variables. |
| HTTP probes | Traversal markers, encoded path escapes, dotfiles, PHP probes, and unsafe methods are blocked before routing. | Treat repeated blocked probes as scanner traffic and rotate exposed keys if needed. |
| JSON handling | Workspace API JSON bodies must be valid objects; malformed calls with valid keys are recorded as failed usage events. | Monitor 400-series usage spikes as integration or abuse signals. |
| Session cookies | Signed, HTTP-only Starlette sessions with SameSite=Lax and HTTPS-only cookies in production. | Use a long random secret and rotate after suspected compromise. |
| Usage | Authenticated calls are recorded with route, key, status, and timestamp. | Review usage before rotating or deleting keys. |
| Audit | Workspace actions and bridge calls write audit entries. | Use the audit feed to explain state changes. |
Hosted memory is durable infrastructure. Store useful context, not secrets.
Use secret managers for API keys, credentials, and tokens. Memorylayer is for context.
Prefer decisions, outcomes, file paths, and verified state over vague transcripts.
Separate keys make usage trails readable and revocation safe.