uptane / aktualizr

C++ Uptane Client
Mozilla Public License 2.0
15 stars 15 forks source link

RFC: Make ECU Serial Numbers stable during provisioning #49

Closed cajun-rat closed 2 years ago

cajun-rat commented 2 years ago

At the moment during the provisioning process the Uptane Key, and ECU Serial number of the Primary can change. The can primarily occur if the device is offline when provisioning is attempted. The Uptane keys are not stored until they are successfully registered with the server.

This makes offline updates (#8) trickier, because at the moment SotaUptaneClient::finalizeAfterReboot() uses the ECU serial numbers to know which updates are due for it.

What I propose to do is to make the Uptane Key and ECU serial fixed. When the device boots for the first time it will generate these randomly and save them in storage, then stick with those throughout.

As I recall the reason we originally did this was to make provisioning more robust in partial-failure cases, but I feel that if we hit any problems like that in the future the better solution would be to built the recovery in the server, which would mean that it would also work in the cases where the user already has a stable ECU serial number.

What does everyone else think @pattivacek @tkfu @mike-sul ?

cajun-rat commented 2 years ago

Looking a bit closer at what is going on, I believe that this is already the current behaviour.