Skip to content

Security modes

Every firmware artifact has a security_mode field that describes the level of trust assurance applied during OTA delivery. Set it in the manifest sidecar at upload time.

Modes

basic (default)

Transport security via HTTPS plus a SHA-256 checksum on the artifact.

The OTA check response includes "checksum": "<sha256>" and "size": <bytes>. The device should verify both after download and abort the update if either mismatches; do not flash an artifact whose checksum does not match.

Suitable for: prototyping, hobby projects, and internal fleets where code-signing infrastructure is not yet in place.


signed

Firmware signed with a project-scoped Ed25519 private key that only you hold. Two independent verifications protect the fleet:

  1. At upload: the server verifies the signature in signing_metadata against one of the project's registered public keys before the artifact is accepted. Uploads with a missing, invalid, or revoked-key signature are rejected outright; no build number is consumed.
  2. On device (essential): the OTA check response includes signing_key_id, signature_algorithm, and signature (base64). The device hashes the image while writing it and marks it bootable only after the SHA-256 matches the offer's checksum, and it checks the signature only when a public key is pinned.

The signature covers the raw binary bytes exactly as delivered from the pre-signed URL. Register keys in project settings (Advanced mode) or via the developer API; SimpleOTA stores only the public key.

On Arduino and ESP-IDF, SimpleOTAClient 1.0.0+ and the simpleota component verify on the device once you set cfg.signing_keys and cfg.num_signing_keys before simpleota_init(). Custom integrations verify manually.

See the full signed firmware guide for key generation, CI signing commands, and device-side verification code.

Suitable for: commercial fleets where devices must never boot a binary that was not approved by the key holder, even if an account or upload credential is compromised.

Strict mode

The image signature covers the firmware bytes. The build number is assigned by SimpleOTA after the image was signed, so it is not covered. Strict mode closes that gap. Once the upload has its build number, a short text naming the project, the key, the build number and the image's SHA-256 is signed with the same key, and that strict signature is attached with POST /projects/{id}/artifacts/{aid}/strict-signature/. A build that has one is strict-ready. The SimpleOTA CLI (simpleota) 0.2.0 or later does this for every signed upload and release, and simpleota build make-strict does it for an earlier build. The private key never leaves your machine; SimpleOTA stores the signature. The signed firmware guide has the steps to switch a fleet over, and lists which release paths are strict-ready. The dashboard upload form is not one of them.

The offer then carries it as manifest_signature. A device in strict mode rebuilds the signed text from its own project id and the offer's key id, build number and checksum, and refuses the offer unless the strict signature is there and verifies with its pinned key, before it downloads anything. A server that has been taken over then cannot offer an old signed image as a newer build, or one project's image to another project's devices when both pin the same key.

Only strict mode gives that protection. A device in signed mode with a project id checks a strict signature when the offer has one, which catches a wrong signature, but a server that has been taken over can leave it out.

A device in strict mode (SIMPLEOTA_SECURITY_STRICT, in the Arduino and ESP-IDF clients from 1.2.0) sends "require_manifest": true on its check-ins:

  • it is offered only strict-ready builds. It stays on its current build when only a build that is not strict-ready would update it. When strict mode holds back a build that fits the device, has it in its rollout and is newer than its build, the check-in has the status it would get anyway (no_compatible_build, up_to_date or not_in_rollout) with a message saying why. An offer has no message, so a device offered an older strict-ready build hears of the newer one once it runs the older build;
  • like a device on another chip, it is left out of a build that is not strict-ready: that deployment's compatible device count and device list do not include it, and the deployment still starts, resumes and reaches the devices the build fits.

Per-device tokens (soto_dev_…) and project tokens (soto_proj_…) are how check-ins authenticate. They are separate from artifact security_mode; see Device tokens.


How modes are matched

security_mode on the artifact is basic or signed. An upload with token is rejected. On the device, check-ins may report basic or signed when your firmware opts in, or omit the field. A reported security_mode of token in the check-in body is ignored and is not stored.

For compatibility, an artifact is only offered when the artifact and device values are exactly equal, or either side is blank. A device that never reports a mode matches every artifact on this dimension. That rule is symmetric for basic and signed, which has consequences in both directions:

Device reports basic artifact signed artifact
(nothing) offered offered
basic offered not offered
signed not offered offered

What this means in practice:

  • A basic device can never receive a signed artifact. Upgrading a fleet to signed therefore goes through one last basic upload whose firmware pins the key and switches the reported mode; see the migration recipe.
  • A signed device can never receive a basic artifact. Once your fleet reports signed, every subsequent upload must be signed; there is no quiet fallback to unsigned releases (that is the point).
  • A blocked device does not error. It receives a normal no_compatible_build response and stays on its current build. After changing modes, watch the project device list for devices stuck on old builds; they are the ones still reporting the previous mode.

Changing security modes lists the build each move needs, in both directions and including strict mode.

Choosing a mode

Deployment Recommended mode
Prototyping / hobby project basic
Production fleet with key management signed

Setting the mode

In your manifest sidecar:

{
  "framework": "arduino",
  "version_label": "1.4.2",
  "chip_family": "esp32",
  "security_mode": "signed"
}

Valid values are basic and signed. Omitting the field defaults to basic.