Security and data protection
Secrets
| Secret | Where | Protection |
|---|---|---|
| Workspace model keys, knowledge keys | platform database | AES-256-GCM with the platform data key; associated data binds each value to its workspace and field |
| API keys, invite codes | platform database | SHA-256 hashes only; shown once |
| KIDA signing key | KIDA secret file | RS256; rotated with overlapping published keys |
| Service assertion keys | platform and NAK secret files | Ed25519; verifiers pin public keys by key ID |
| KIDA caller credential | platform secret file | KIDA stores only its SHA-256 |
| Database credentials | per-service secret files | one role and database per service; TLS with certificate verification |
Network
- Only the edge proxy is reachable from the internet. It serves the platform
API and KIDA’s public keys, and returns 404 for
/internal/*and KIDA’s caller API. - Engines run on private networks. KIDA additionally admits callers only from exact, configured peer addresses.
- File parsing and virus scanning run in a network with no internet access.
Requests
- Strict JSON bodies (unknown fields rejected), size limits, timeouts.
- Per-actor rate limits held in PostgreSQL, so they apply across replicas.
- Security headers on every response; CORS only for configured origins.
- Every change to a workspace is written to its audit trail.
Logs
Logs are structured JSON with request IDs: method, route, status and duration. They never contain request bodies, credentials, Camel tokens, API keys, invite codes or end-user messages. The end-to-end test checks this.
Model input
Knowledge passages and user messages are passed to the model as data, with an instruction to treat retrieved text as untrusted. Citations are validated against what was actually retrieved.
Reporting a vulnerability
Email security issues to the Ngamia team privately rather than opening a
public issue. Include the request_id of any affected request.