← Back to the chapter · Next detail →

Technical detail · CoAP API Design: Delivery and Security Decisions

CoAP credential choices and replay state

CoAP deployments need trusted credentials and a security context, the keys and stored state used to protect and verify messages, as well as permission checks.

A pre-shared key is a secret provisioned to the peers; protect its distribution and replacement. A raw public key is used without a certificate, so the peer still needs a trusted association between that key and an identity. An X.509 certificate binds a public key to an identity through a certificate trust system; plan validation and renewal. Choose credentials the deployment can provision, replace and revoke.

Replay protection rejects reuse of old protected messages using security context state. Preserve those checks, but also authorize newly issued requests. Rejecting an old protected command does not decide whether a new command is permitted or safe. Choose session idle limits from reconnect cost and exposure, and retain application state and outcome checks.

← Back to the chapter · Next detail →