Skip to content

Handle signed firmware device-info uploads and diagnose discarded metadata - #153

Merged
Lash-L merged 4 commits into
mainfrom
investigate/device-info
Oct 12, 2026
Merged

Lash-L merged 4 commits into
mainfrom
investigate/device-info

Conversation

@Lash-L

@Lash-L Lash-L commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Firmware POST /devices/{did}/info currently falls through to the generic acknowledgement, so its serial and feature metadata is discarded. Add a dedicated handler that retains verified metadata for existing inventory devices while preserving the complete acknowledgement body and device identities, names, product IDs and keys.

The handler verifies the fixed five-field form against the recovered device RSA public key (PKCS#1 v1.5 / SHA-256), checks path/body DID agreement and retains conservative field validation. All three persisted Qrevo MaxV uploads verified under this contract. G10S firmware inspection confirms that its upload callback accepts HTTP 200/201 and ignores response data; evidence and model limits are documented.

Sanitized logs distinguish stored, unchanged, unmatched, validation/authentication rejection and write failure using only DID, outcome and updated-record count. Inventory updates use the transaction and atomic persistence API from #152, whose commit is included as a dependency. Merge #152 first.

Validation: 58 focused storage, device-info, firmware, admin and home tests passed; git diff --check passed. Tests cover signature tampering, duplicate fields, unknown keys/devices, identity preservation, idempotence, diagnostic privacy and a real HTTP form with URL-escaped base64 + and / signatures, including the Roborock path prefix.

Limitations: acknowledgement may suppress future uploads when a key or inventory link is missing; captured signed reports are replayable; existing cloud snapshot precedence remains. No HA deployment changes.

@Lash-L
Lash-L merged commit 9de7729 into main Oct 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant