Skip to content

Device identity & credentials

Every device on CORE-M has two identifiers and exactly one active credential type. Understanding the difference is the foundation for provisioning and for rotating credentials.

device_idhardware_id
What it isPlatform-assigned UUIDManufacturer serial, MAC address, or other stable hardware identifier
Who sets itCORE-M, at registrationYou, from the hardware
UniquenessGlobally uniqueUnique within a tenant
Mutable?NeverTreated as immutable — it is the idempotency anchor
Used forAll API paths and lookups (e.g. /api/v1/devices/{device_id})De-duplication and idempotent (re-)provisioning

The device_id is what you use everywhere in the API. The hardware_id exists so the platform can recognize the same physical device across retries: registering or provisioning twice with the same hardware_id returns the existing device instead of creating a duplicate.

Devices authenticate to CORE-M with one of three credential types. Pick the one that matches your protocol and threat model.

CredentialIssued byStored at rest asPresented as
API keyProvisioning or CreateAPIKey; returned raw onceSHA-256 hash (raw key never stored)Authorization: Bearer sk_live_… or X-API-Key: sk_live_…
PSK (pre-shared key)Generated/assigned at provisioning, ≥ 32 bytesSecurely on the platform; provisioned to the deviceDTLS PSK handshake (CoAP, LwM2M)
X.509 client certYour CA; the public cert is registered via RegisterDeviceCertOnly the SHA-256 fingerprint of the DER bytesmTLS client certificate (MQTT, CoAP, LwM2M)

The most common device credential. Format:

sk_live_ + URL-safe encoding of 32 random bytes

The platform stores only a hash of the key. The raw value is returned exactly once — at provisioning or when you create the key — and cannot be retrieved again. If it is lost, rotate to a new one.

Present it on every request using either header:

POST /api/v1/devices/{device_id}/uplink HTTP/1.1
Host: api.kronoxdata.com
Authorization: Bearer sk_live_Zr8K2mQx...redacted...
Content-Type: application/json
{"kind":"telemetry","payload":"..."}

The auth middleware resolves the key to its tenant_id and device_id and injects them into the request context. The device never sends its own tenant_id — identity is derived from the credential, so a stolen key cannot impersonate another tenant’s device.

A symmetric secret of at least 32 bytes, used for the DTLS handshake on UDP transports. Best for constrained devices on CoAP or LwM2M where running a full certificate stack is too heavy. The PSK is generated or assigned during provisioning and burned into the device alongside its identity. Treat it like any other secret: it grants the same access as an API key.

The strongest device credential, used for mutual TLS (mTLS) on MQTT, CoAP, and LwM2M. You issue the certificate from your own CA and register only the public certificate with the platform via RegisterDeviceCert (POST /api/v1/devices/{device_id}/certs). CORE-M parses the PEM server-side and stores only the SHA-256 fingerprint of the DER bytes — that fingerprint is the identity anchor for mTLS lookups.

To stop trusting a certificate, revoke it by fingerprint with RevokeDeviceCert (DELETE /api/v1/devices/certs/{fingerprint}). List a tenant’s certificates with ListDeviceCerts (GET /api/v1/devices/certs, optionally filtered by device_id).

Credentials are not forever. Two operations keep them safe:

  • Rotate — issue a fresh credential and retire the old one. For API keys, the new key is returned once; the old key keeps working for a configured overlap window so the device can switch over without downtime, then stops being accepted.
  • Revoke — kill a credential immediately. Future requests using a revoked API key or certificate return UNAUTHENTICATED, and active protocol sessions authenticated by it are disconnected where the transport supports it.

You don’t mint credentials by hand — they are issued as part of a provisioning flow: