Design updates that remain controlled when things go wrong.
What you will learn
- Design an update sequence with authenticity and compatibility checks.
- Define interruption, rollback and recovery behaviour.
- Account for signing authority and installed-fleet maintenance.
The scenario
A technician transfers an update to the sensor. The current design starts installation immediately and has no defined recovery behaviour if power fails.
Your task
- Define how the package’s origin and integrity are verified.
- State what happens when verification fails.
- Describe interrupted-installation recovery.
- Identify questions about rollback and signing-key changes.
Read the worked answer
Verify the package against an authorised signing key before installing it. Reject an invalid package without replacing working firmware. Design and test a recovery mechanism appropriate to the device, such as validated alternate images or a protected recovery mode.
Specify whether older versions may be installed and under what conditions. Define signing-key rotation and recovery from key compromise. Test interruption at meaningful installation stages and verify that recovery does not bypass update authentication.
Identify the states before choosing the mechanism
Use a technician-installed sensor update. Separate package receipt, validation, staging, installation, first boot, acceptance and recovery. The initial design begins replacement as soon as transfer starts. Draw the current sequence and mark where loss of power, an invalid package or a wrong product image could affect operation.
Spend about 45 minutes on a state and decision sketch. You do not need to choose one memory layout for every device. State the hardware constraints and the recovery assumptions that a real implementation would have to verify. Keep the update path’s authority separate from ordinary measurement-reporting credentials.
Define the acceptance decisions
Authenticate the package against a controlled trust anchor before replacing working software. Check package integrity, target product and compatibility, required prerequisites and allowed version transitions. Describe rejection without silently reducing the checks. A package signed by an accepted key can still be unsuitable for this sensor.
Decide rollback policy explicitly. Returning to a previous image may aid recovery but could reintroduce a known weakness. Distinguish controlled fallback after failed activation from arbitrary installation of old releases. Define signing-key rotation and compromise response, including devices that have not received recent updates. Identify who can approve exceptional recovery.
Test the meaningful failure points
Include interrupted transfer, loss of power during replacement, failed first boot, invalid signatures, incompatible packages and prohibited version transitions. Verify that the sensor reaches the specified working or recoverable state and that recovery does not bypass package authentication. Test successful updates and preservation or controlled migration of configuration.
Retain the starting image, package identity, device and boot configuration, injection point, expected outcome and actual state. Confirm what the technician sees and how they continue safely. A test labelled “power loss” without the installation stage or recovery result cannot establish the intended claim. Review the recovery route’s physical and credential protections too.
Apply the ideas
An older signed image installs successfully and restores operation, but it contains a known security weakness. Propose a version policy and a controlled recovery route that makes the trade-off visible.
Compare your approach
Define which versions are permitted and how the device enforces that policy under normal update and recovery. Use a reviewed fallback image or protected recovery mode that authenticates the replacement and preserves a justified security baseline. If an exceptional downgrade is authorised, record the reason, affected configuration, compensating measures, responsible approver and route back to a supported release. Test policy transitions and interruption; a valid signature alone should not decide the downgrade.
Review your work
- Are authenticity and compatibility separate decisions?
- Is recovery authenticated and testable?
- Are downgrade and signing-key changes governed explicitly?
Keep this output: An update state sketch, acceptance policy and fault-injection test table.
