Onboarding Flows
How a device gets its credentials, by attestation tier and integration model — from shared keys to manufacturer birth certificates.
A tier 1 device receives a shared key and connects with a username and password. Tier 2 and 3 devices receive an X.509 certificate issued over EST by the tenant's Device CA, and connect with mTLS.
Use a certificate tier when you need:
- Stronger device identity — certificates are cryptographically bound to a device, not just a shared secret
- Automatic rotation — EST re-enrollment renews certificates before expiry without manual key distribution
- Zero-trust broker access — the broker verifies the device certificate against the Device CA on every connection, not just a password hash
- Tenant isolation — the certificate's OU field encodes the tenant, enforcing ACLs at the TLS layer
Decision Matrix
Choose a flow based on your integration model and the device's attestation capability:
| Tier 1 — Shared Key | Tier 2 — OTP | Tier 3 — Birth Certificate | |
|---|---|---|---|
| Consumer / App | App + shared key | App + OTP + EST | App + birth cert + EST |
| B2B / Industrial | Pre-provisioned + shared key | Pre-provisioned + OTP + EST | Pre-provisioned + birth cert + EST |
Consumer / App flows — A customer app (mobile or web) scans the device, provisions it to a tenant via the Provision API, and hands the device WiFi credentials over BLE or SoftAP. Best for retail products where an end user sets up the device.
B2B / Industrial flows — Devices are pre-provisioned during manufacturing or deployment. No customer app is involved. The device self-onboards when it first connects to the network. Best for commercial appliances, industrial sensors, connected chargers, and fleet deployments.
Attestation tiers — Higher tiers provide stronger identity guarantees:
| Tier | Attestation | Key Generation | Manufacturer Requirement |
|---|---|---|---|
| 1 | Shared key from Glaze | None — MQTT username/password, no certificate | None — Glaze provides the key |
| 2 | One-time password | Server-side (EST) | Register devices, flash OTP |
| 3 | Birth certificate | On-device (chip) | Operate own PKI, sign birth certs |
How It Works
All flows share the same four-step lifecycle:
1. Provision
The device is registered into an enrollment group and then activated by running the group's activation workflow. In consumer flows a customer app drives this; in B2B flows it happens during manufacturing or via a deployment pipeline.
2. EST Enrollment
The device authenticates to the Beacon Tower EST server using its tier-specific credential (shared key, OTP, or birth certificate). EST issues an operational certificate signed by the tenant's Device CA. Tier 1 skips this step.
3. Connect
The device connects to the Mosquitto broker using mTLS with its Device CA-issued certificate, and verifies the broker's server certificate against the Device CA. Tier 1 also connects over TLS and verifies the broker against the Device CA, but authenticates with a username and password instead of a client certificate. The broker verifies the certificate chain and extracts the device identity and tenant from the certificate fields.
Every tier connects by the broker's DNS name (never by IP) and sends that name as the TLS SNI: every tenant on an environment shares one IP and ports 8883/8884, and SNI is what picks this tenant's broker out of the others. Every tier also sets an MQTT keepalive of at most 120 s (60 s on cellular). See TLS, Hostname, and SNI for why.
4. Renew
Before the certificate expires, the device re-enrolls with EST using its current operational certificate. A new certificate is issued without requiring the original attestation credential.
Key Concepts
EST (Enrollment over Secure Transport)
RFC 7030 — a standard protocol for certificate enrollment. Beacon Tower's EST server exposes four endpoints, and which one a device uses depends on whether it can generate its own key material:
| Endpoint | Auth | Used by |
|---|---|---|
GET /.well-known/est/cacerts | Anonymous | All tiers, to fetch the tenant Device CA chain (pass ?device_id=) |
POST /.well-known/est/serverkeygen | HTTP Basic (device_id:secret) to enroll, mTLS to renew | Tier 2 — the server generates the keypair |
POST /.well-known/est/simpleenroll | mTLS with the birth certificate | Tier 3 initial enrollment, with a CSR |
POST /.well-known/est/simplereenroll | mTLS with the current operational certificate | Tier 3 renewal, with a CSR |
serverkeygen returns multipart/mixed carrying a PKCS#7 certificate and a PKCS#8 private key,
because devices on those tiers cannot produce a key themselves. The simpleenroll and
simplereenroll routes are mTLS-only and require a PKCS#10 CSR — a device that cannot sign a CSR
cannot use them.
These endpoints are device-facing and are not published on the management API host. See the Device API reference.
Path aliases
/.well-known/est/* is the canonical form and the one the service itself serves. EST client
libraries derive it automatically from a bare hostname, so most firmware never constructs it by
hand.
Tenant deployments additionally accept the short form /est/*, aliased onto the canonical path by
an ingress rule that ships in the tenant template. Firmware written against /est/cacerts works on
any tenant provisioned from that template.
Prefer the canonical path. The alias is a deployment-level convenience rather than a property of the
service, so it is present wherever tenants are stamped from the template but is not guaranteed in
development or bespoke environments. Firmware that uses /.well-known/est/* works in every case.
Onboarding CA and Device CA
Devices trust two Beacon Tower CAs, and are flashed with only one of them.
- Beacon Tower Onboarding CA — global, the same for every tenant. Flashed at manufacture. It
verifies the device-facing host (
device.<domain>) that servesget_settingsand/.well-known/est/*. - Beacon Tower Device CA — per tenant. It signs the broker's server certificate and, on tiers 2
and 3, the device's operational certificate. Because it differs per tenant it is not flashed; the
device fetches it from
GET /.well-known/est/cacerts?device_id={device_id}on first boot, over a connection verified with the Onboarding CA.
| Connection | Verified with | Where the device gets the CA |
|---|---|---|
https://device.<domain> — get_settings, /.well-known/est/* | Onboarding CA | Flashed at manufacture |
MQTT broker (host and port from get_settings) | Device CA | GET /.well-known/est/cacerts on first boot |
This holds for every tier. Tier 1 stops there: it authenticates to the broker with a username and password and never enrolls a certificate. Tiers 2 and 3 also enroll an operational certificate that the broker verifies against the same Device CA.
Device Registry
Tracks device lifecycle state: registered, enrolled, active. Stores device metadata (serial, hardware revision, batch) and attestation credentials (shared keys, OTPs, birth certificate fingerprints).
Activation
A device is bound to a tenant in two steps. POST /api/devices/register adds it to an
enrollment group; running the group's activation workflow provisions it with the provider:
POST /api/enrollment-groups/{groupId}/workflows/device-activation/run
The enrollment group defines the owning organization, attestation type, provider configuration, and
which workflows may run against it. A fresh activation returns 201; running it again against an
already-active device is rejected with 409 device_already_provisioned.
Settings API
GET /get_settings — the device's path for retrieving its own MQTT credentials. Authenticates with HTTP Basic Auth using the device id plus the enrollment group's bootstrap key (Tier 1) or its OTP (Tier 2), or with mTLS using a Glaze-issued certificate (Tier 3). Returns whatever the enrollment group's response_template renders against the per-device variable set (primary key, secondary key, broker URL, etc.). It is the device's first call on every tier; Tier 1 gets its MQTT credentials here, Tiers 2 and 3 get the broker and EST URLs.
mTLS (Mutual TLS)
Both the broker and the device present certificates during the TLS handshake. The broker verifies the device's certificate against the Device CA; the device verifies the broker's server certificate. This replaces username/password authentication.
Birth Certificates (Tier 3)
X.509 certificates issued by the manufacturer's own PKI during production. Proves hardware authenticity — the device was manufactured by a known, trusted party. Used only for initial EST enrollment; operational access uses Device CA-issued certificates.
OTP (One-Time Password, Tier 2)
A unique token generated when the manufacturer registers a device with the registry. Flashed onto the device or printed on a label. It is validated but never consumed — the device keeps it permanently for get_settings and for re-enrollment after certificate expiry.
Shared-Secret Onboarding
For devices that don't need certificate-based authentication, the shared-secret onboarding flow provisions devices with MQTT username/password credentials. It's simpler to set up but doesn't provide the security properties of mTLS.
Next Steps
- Consumer Tier 1 — Shared Key — Start here if your manufacturer has no PKI
- B2B Tier 1 — Shared Key — Start here for pre-provisioned industrial devices
- Device Onboarding — Shared-secret onboarding (username/password)
- MQTT Protocol Reference — Topic structure and payload formats