patinas-device-command
The daemon command plane (ADR-0019): the single trusted entry point the field app uses to reach a camera capability.
Each POST /v1/command carries a signed DeviceCommandToken (ADR-0011) which is
verified by patinas-device-auth::Verifier against a factory-pinned public key
before any command is considered. No SSH credential lives here.
Wire contract
Mirrors device-daemon-mock and is spoken by the app's DeviceApiHttp:
POST /v1/commandAuthorization: Bearer <sig_b64>- body:
{ "token": <DeviceCommandToken>, "program": "...", "args": [...], "scope": "status" } - response:
{ "schema_version": 1, "ok": true, "result": { "exit_code", "stdout", "stderr" } }
Configuration (env)
| Var | Meaning | Default |
|---|---|---|
DEVICE_COMMAND_BIND | listen address | 0.0.0.0:8443 |
DEVICE_MACHINE_ID | machine binding (sub must equal this) | machine:m1 |
DEVICE_KEYS | kid=base64_or_hex comma-separated pinned public keys | (empty) |
Key format
Each verification key is the 32-byte ed25519 public key, base64 (std) or hex. The matching private half lives with the issuer (cloud or signed bundle); it is never present here.
Status
Execution is a deterministic allowlist echo. Real capability invocation (IMU, health, sensor writes) is the next layer — the verifier + allowlist are the trust boundary, and the dispatch is a thin adapter on top.