API Design
Endpoints
| Method | Path | Auth | Service | Feature |
|---|---|---|---|---|
| — | /v1/objects | — | safekeys/control-plane | control-plane-api |
| — | /v1/tokens | — | safekeys/control-plane | control-plane-api |
| — | /v1/tokens/ | — | safekeys/control-plane | control-plane-api |
| — | /v1/audit | — | safekeys/control-plane | control-plane-api |
| — | /v1/policies | — | safekeys/control-plane | control-plane-api |
| — | /healthz | — | safekeys/control-plane | control-plane-api |
Authentication
| Scheme ID | Type | Description |
|---|---|---|
| control-plane-api-key | api-key | Client credential used by the sidecar and CLI to authenticate to the control plane in the MVP. |
| sidecar-mtls | oauth2 | Mutual TLS device identity between sidecar and control plane, introduced alongside hardware binding. |
| local-sidecar-socket | none | Local authenticated channel (Unix domain socket) between an agent/CLI and the sidecar on the same host. |
Authorization
Control Plane API
Two client classes in the MVP. Human operators hold admin credentials (create/revoke policy, read audit). Sidecars hold narrow credentials scoped to their environment and may only request unwrap and report resolves.
| Role | Level | Helper |
|---|---|---|
| operator | admin | — |
| sidecar | resolve-only | — |
| auditor | read-only | — |
Service Security Configuration
| Service | Auth Method | Secrets Reference |
|---|---|---|
| Safekeys CLI | Local sidecar socket plus control-plane API key | docs/help/security-model.md |
| Control Plane Database | Postgres role per component; sidecar holds no direct DB access | docs/help/security-model.md |
| Control Plane API | API key (MVP), mutual TLS for sidecars (later) | docs/help/control-plane-auth.md |
| Safekeys MCP Server | Local sidecar socket; the MCP client is trusted as an agent host | docs/help/security-model.md |
| Python SDK | Local sidecar socket | docs/help/security-model.md |
| Safekeys.ai Site | none (public marketing site) | — |
| Sidecar / Resolver | Local authenticated channel; control-plane API key; device identity via mTLS later | docs/help/security-model.md |
| TypeScript SDK | Local sidecar socket | docs/help/security-model.md |