Knowing your threat model is half the job. This companion post is the other half: the concrete mechanisms that keep a deployed fleet trustworthy for years ā identity, storage, boot integrity, and updates that can't brick everything at once.
One device, one credential
Fleet-wide passwords and hardcoded API keys are a supply-chain vulnerability ā one leak compromises every unit ever shipped. Each device gets unique credentials issued at provisioning, with expiry and rotation planned from day one. Certificates beat passwords where the hardware allows it: a client certificate in protected storage is harder to phish, share, or guess than any string a human invents.
ā Certificate-based auth and device tokens
Secrets live in protected storage, not source code
On-device credentials belong in NVS with proper access control plus a provisioning flow ā never as string literals in firmware. Assume anyone can dump your flash; design so a dump alone isn't enough. Work through what happens when a unit is returned, resold, or stolen: wipe procedures and revocation lists are part of the design, not an afterthought. The general principle ā shrink what the device exposes ā applies far beyond storage:
ā Credential storage on the device
ā Device security: shrinking the attack surface
Trust the code you run
Secure boot stops modified firmware from executing on your hardware.
ā The secure boot concept
Signed OTA with hash verification stops tampered images from installing. Automatic rollback on failure stops one bad release from becoming a fleet-wide outage ā an update path without rollback is a disaster waiting for a trigger. The full identity-to-update story, end to end:
ā Secure OTA with signed firmware
ā Identity, authorisation and secure updates
What "passing review" looks like
Unique per-device credentials (never hardcoded), TLS with proper certificate validation and clock sync, secure boot plus signed OTA with rollback, and a tested incident routine. That's the bar that separates professional firmware from hobbyist firmware.
Finish with IoT security engineering ā threat modelling to incident response in one track. Post what you've hardened, your provisioning flow, or your OTA rollback story. Tag with security.