Tenant-verifiable Ed25519-signed cockpit snapshot (OCF-06)
GET /api/v1/cockpit/snapshot
GET
/api/v1/cockpit/snapshot
Build + sign the 7-panel cockpit snapshot bundle.
Returns the response via Response(content=bytes, media_type="application/json") — NOT a plain dict — because
FastAPI’s default JSON serialiser does not guarantee key
ordering. Byte-exact output is required so a consumer can
re-canonicalise the response (excluding the signature field)
and verify the signature against the embedded public key with
zero ambiguity.
Flow:
- :class:
CockpitSnapshotServicecollects per-panel state. - The signable subset (everything except
signature) is canonicalised withsort_keys=True, separators=(',', ':'). - :class:
SnapshotSignersigns the canonical bytes with the tenant’s CEO Ed25519 private key. - The final response bytes are re-canonicalised from the signable payload plus the signature so the returned JSON is deterministic (signature-verifiers replay step 2 client-side).
Raises: HTTPException 422: No active CEO certificate for the tenant.
Authorizations
Responses
200
Successful Response