RidgeRun Platform Security Manual - Over-the-Air Updates
- Introduction
- General Security Concepts
- Getting Started
- Contact Us
- Sponsor your Favorite Feature
Over-the-Air Updates
This page describes the security considerations for using Over-the-Air updates in an NVIDIA Jetson Yocto-based product. It focuses on signing Mender artifacts, distributing the public verification key through Yocto, and validating that devices only install artifacts produced by an authorized signing workflow.
For the base Jetson Mender integration, including Yocto layers, A/B root filesystem layout, initial flashing, Mender service validation, manual update installation, rollback, and artifact creation, see:
This page builds on that workflow and adds the artifact-signing step needed for a production-oriented OTA release process.
Security Goal
A Yocto OTA flow should ensure that a device installs only approved update artifacts. Mender provides rollback and A/B update behavior, but artifact signature verification adds an additional security check: the device can reject an artifact if it was not signed by the expected release-signing key.
The signing model uses two keys:
| Key | Location | Purpose |
|---|---|---|
private.key
|
Signing system only. | Used to sign Mender artifacts. This key must remain protected. |
public.key
|
Distributed to devices. | Used by the Mender Client to verify signed artifacts. |
The private key must not be stored on the target device, included in the Yocto image, or shared with manufacturing systems that do not need signing authority.
On the target image, the public verification key should be installed as:
artifact-verify-key.pem
Generating Artifact Signing Keys
Generate an ECDSA256 private/public key pair:
# Generate private key with parameters openssl ecparam -genkey -name prime256v1 -out private-and-params.key # Extract private key openssl ec -in private-and-params.key -out private.key # Extract public key openssl ec -in private-and-params.key -pubout -out public.key
The generated files are:
private.key: used by the release-signing system.public.key: distributed to devices for artifact verification.
Rename the public key before adding it to the Yocto layer:
mv public.key artifact-verify-key.pem
Signing Mender Artifacts
Mender artifacts can be signed when they are created or after the Yocto build has produced an unsigned artifact.
Signing While Creating an Artifact
Use the -k option with mender-artifact write:
mender-artifact write rootfs-image \ -t jetson-orin-nano-devkit \ -n release-1 \ -f core-image-base-jetson-orin-nano-devkit.ext4 \ -k private.key \ -o artifact-signed.mender
The artifact name passed with -n should match the release artifact name expected by the build and deployment workflow.
Signing an Existing Artifact
If Yocto generates an unsigned .mender artifact, sign it as a separate release step:
mender-artifact sign artifact.mender \ -k private.key \ -o artifact-signed.mender
This approach is useful when the Yocto build system and the signing system are separated. The build system produces the unsigned artifact, and the signing system applies the production signature.
If an artifact is modified after signing, the signature must be regenerated.
Verifying a Signed Artifact
Before distributing a signed artifact, validate it with the public key:
mender-artifact validate artifact-signed.mender -k public.key
This validation should be part of the release process before uploading the artifact to the update server or delivering it to devices.
Adding the Verification Key to Yocto
The Mender Client verifies artifact signatures using the configured artifact verification key. Only the public verification key is required on the device.
Add artifact-verify-key.pem to a custom Yocto layer and include it through a recipe append.
Example .bbappend:
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://artifact-verify-key.pem"
Place the key in the recipe's files/ directory:
recipes-mender/
└── mender/
├── files/
│ └── artifact-verify-key.pem
└── mender_%.bbappend
For Mender Clients older than 4.0.0, apply the append to the mender-client recipe instead of the mender recipe.
After adding the key, make sure the Mender Client configuration uses the artifact verification key through the appropriate ArtifactVerifyKey or ArtifactVerifyKeys option for the client version used by the product.
Secure OTA Release Flow
A production OTA release flow should separate image generation, artifact signing, verification, and deployment.
Recommended flow:
- Yocto builds the image and produces an unsigned
.menderartifact. - The unsigned artifact is transferred to the release-signing environment.
- The signing environment signs the artifact using
private.key. - The signed artifact is validated with the public key.
- The signed artifact is uploaded to the Mender server or delivered through the approved release channel.
- The Jetson device receives the artifact.
- The Mender Client verifies the artifact signature using
artifact-verify-key.pem. - The update is installed into the inactive root filesystem slot.
- The device reboots into the updated slot.
- The update is committed after the system is validated.
- If the update fails before being committed, Mender rolls back to the previous working slot.
Best Practices
- Keep
private.keyoutside the Yocto build tree when possible. - Do not include the private signing key in the target image.
- Restrict access to the artifact-signing key.
- Use different signing keys for development and production.
- Validate signed artifacts before deployment.
- Regenerate the signature whenever an artifact is modified.
- Test artifact verification on a sample device before fleet deployment.
- Archive signed artifacts, public verification keys, release metadata, and validation logs.
- Define when the device should run
mender-update commitso failed boots can still roll back. - Test rollback behavior before deploying OTA updates to production devices.
Common Issues
| Issue | Cause | Recommendation |
|---|---|---|
| Signed artifact is rejected by the device. | The public verification key on the device does not match the private key used to sign the artifact. | Confirm the device image contains the expected artifact-verify-key.pem and validate the artifact with mender-artifact validate.
|
| Artifact validates on the host but not on the device. | Device configuration may not be using the expected artifact verification key. | Check the Mender Client configuration and the installed verification key path. |
| Artifact was modified after signing. | The signature no longer matches the artifact contents. | Sign the artifact again after the modification. |
| Private key appears in build artifacts or target image. | The signing key was placed in the Yocto layer or build tree incorrectly. | Keep only the public verification key in Yocto. Store the private key in the signing environment. |
| Device cannot roll back after a failed update. | The update was committed before system health was validated. | Commit only after the application and boot health checks pass. |