Summary
- In CoAP over UDP, the 16-bit Message ID handles duplicate detection and ACK/Reset correlation; the Token, together with endpoint context, matches a response to an outstanding request. RFC 7252 keeps the two deliberately separate.
- A matching Token is a correlation receipt. It is not proof of a person, a device owner, an authenticated principal, an authorization decision, a fresh resource state, or a completed physical action.
Picture the trace. A client fires a request at a constrained device. The reply comes back carrying the same short string of bytes the client dropped into the Token field. Request on the left, response on the right, identical Token in the middle. It looks like a handshake. It feels like proof.
So somebody writes one generous log line — transaction verified — and ships it to the dashboard, where it turns green and everyone stops asking questions.
That single sentence spends evidence the protocol never deposited.
The Token tells the client which outstanding request a response answers. Full stop. It does not say who owns the endpoint, who is standing behind the gateway, whether the request was authorized, whether the sensor reading is fresh, or whether the actuator actually moved. Even its anti-spoofing job is bounded: randomized Tokens make blind guessing harder when transport security is absent. They do not graduate into credentials by being hard to guess.
Carsten Bormann's place in this design is precise, and worth stating without inflation. He is one of three authors of RFC 7252, the 2014 Standards Track definition of CoAP. He is first-listed on RFC 8323, which carries CoAP over TCP, TLS and WebSockets. The first document separates Message ID from Token. The second runs a clean subtraction experiment on that separation: when a reliable transport takes over retransmission and duplicate handling, CoAP deletes Message ID and keeps Token.
One field disappears. The other stays. That is about as close as protocol engineering gets to a controlled trial.
Two small fields, two different clocks
CoAP was built for nodes and links where every byte is rent. Over UDP its fixed header carries a 16-bit Message ID, and RFC 7252 hands that value to the message layer. Its job: spot duplicate messages, and tie an Acknowledgement or Reset back to the Confirmable or Non-confirmable message that provoked it. The matching rule includes the endpoint, and the same Message ID cannot be reused with that endpoint inside the exchange lifetime.
That state runs on a short clock. A Confirmable message gets retransmitted when its ACK goes missing, so the receiver can see the same Message ID from the same source endpoint more than once. It should acknowledge every copy and, normally, process the enclosed request or response exactly once. The Message ID answers a bounded question: have I already seen this exchange, and does this ACK or Reset belong to it?
Token lives one layer up, at request/response. The client mints it; the server echoes it back untouched. RFC 7252 calls it a client-local identifier for telling concurrent requests apart, and notes it could just as well have been called a request ID. Tokens in flight must be unique for a source/destination endpoint pair — not for the Internet, not for an organization, not for a human being.
Its clock outlives a single datagram. A Confirmable request may get a piggybacked response inside its ACK, or a separate response later. Message ID tracks the message mechanics; Token follows the semantic request into whatever legal response form returns.
The two fields travel together often enough that people mistake co-presence for equivalence. In a piggybacked response both match because the acknowledgement and the response share one message. In a separate response the Token is the request/response link, while the new message runs its own message-layer exchange.
The rot starts when an observability pipeline files both under one generic correlation_id. The schema gets tidier. The investigator loses which clock expired, which endpoint scope applied, which reuse rule mattered, and whether a duplicate verdict was about a datagram or an application operation.
RFC 8323 removes the ambiguity by removing a field
CoAP over TCP does not need a UDP message layer to retransmit or deduplicate. TCP delivers reliable ordered bytes; CoAP adds framing for message boundaries. So RFC 8323 strips the Type and Message ID fields from the frame on reliable transports.
Token stays.
That is not an appendix convenience. It is an architectural responsibility test. If Message ID were the identifier of the application transaction, deleting it would break request/response matching. It doesn't — because Token owns that job. If Token were just another duplicate marker, it would vanish alongside Message ID. It doesn't — because reliable transport has no idea which CoAP response satisfies which CoAP request.
The comparison hands an operator a diagnostic. A fault that appears only on UDP sends you to retransmission, exchange lifetime, Message ID reuse, duplicate cache and ACK/Reset handling. A fault that shows up on UDP and on reliable transports sends you upward: outstanding-request state, Token generation and matching, endpoint or connection binding, intermediaries, response processing, application state. Transport differences become a way to localize a fault instead of an excuse to flatten telemetry.
They also set a ceiling. A TCP or TLS connection can supply a stronger channel context than an unauthenticated UDP tuple, depending on configuration. It still does not turn the Token into an identity. The security association and the Token are joined evidence with different authors and different lifetimes.
A random Token closes one door, not the building
RFC 7252 recommends a nontrivial randomized Token for clients without transport-layer security — at least 32 bits of randomness on the general Internet, scaled to the threat model. The reason is response spoofing: an off-path attacker who cannot guess the Token is less likely to inject a reply the client accepts as an answer to an outstanding request.
Message ID is nearly useless here. It is usually sequential and guessable, and an attacker can simply send a separate response that ignores the request's Message ID. Another clean division of labor: Message ID serves the duplicate and acknowledgement machine; Token randomness adds a correlation challenge against blind injection.
But a successful match proves only that the response carried a value hard enough for the attacker to guess under the assumed observation model. An on-path observer may have seen it. A compromised intermediary may hold the state. A weak generator may repeat it. A stale request table may accept it under the wrong lifetime. Renaming the Token an "authentication token" answers none of that.
The receiving endpoint must treat a Token it did not generate as opaque. A server echoes bytes; it does not read them as a username, a session authority or a customer account. The client may attach local meaning to its own value, but no other hop inherits that meaning for free.
So an audit should record the random-generation policy, Token length, reuse scope, endpoint binding and outstanding-request lifetime — and record the security mode in a separate field. If privacy matters, telemetry can keep a keyed digest instead of raw Token bytes, as long as the join still works. "Token matched" and "peer authenticated" must stay two fields even when both happen to be true.
A proxy does not carry one universal Token across the path
"Endpoint" reads like a stable machine. In real constrained deployments a request wanders through forward proxies, reverse proxies, gateways, address translators and transport changes. CoAP Tokens are hop-by-hop.
An intermediary typically holds the client-side Token and transport address while issuing its own upstream request under its own Token. When the origin's response arrives, the intermediary recovers the downstream mapping and builds the response the client expects. One application journey can therefore contain several Token namespaces, several endpoint contexts and more than one timeout.
Incident attribution feels this. A Token on the device-facing hop may never have appeared on the client-facing hop. A gateway log that shows only its upstream Token cannot name the downstream requester. A match at one hop proves nothing about whether the next hop preserved the right mapping. The minimum useful record carries the observation point and a privacy-safe local join between the two hop records.
If the system later writes one "global transaction ID," it should be honest about where that ID came from. It is an observability construct the operator invented, not a wire-level fact CoAP supplied end to end. Its trust rests on the mapping code, the clock, the storage and the access controls that produced it.
Putting request state into the Token changes custody, not truth
RFC 8974 explores a later trick: a client serializes parts of its per-request state into the Token and recovers them when the server echoes the value back. Longer Tokens make more state portable. The authors are Klaus Hartke and Michael Richardson, not Bormann; the document matters here as a stress test of the earlier field boundary.
It puts "stateless" in quotation marks for good reason. A client may skip a record per request and still need per-server state, Token-generation state and congestion-control state. Confirmable UDP messages still need message-exchange state. A client leaning on extended Tokens must first discover support in a stateful exchange unless some other reliable mechanism hands it that knowledge.
Serialization also turns a private table row into bytes that travel. Integrity protection becomes mandatory. Replay, freshness and privacy need answers. Format changes need version separation. A maliciously large Token can eat scarce memory. A chain of "stateless" intermediaries can inflate Tokens as each hop serializes more client information.
The server remains an echo point. It need not understand the state inside the Token. The returning value lets the client rebuild its own prior context; it does not make the server the issuer of that context, and it does not certify the context is true. Custody moves from local memory to an opaque round trip. Responsibility does not evaporate.
This is the same institutional mistake that shows up far from protocol engineering. Moving a fact into a shared record makes it portable and reviewable. It does not give the record authority over the actor whose state it describes. A ledger entry, a Token and an RFC can each coordinate. None becomes a principal merely because other systems lean on it.
Build a receipt that does not overclaim
A useful CoAP receipt starts with where and when the packet or frame was observed. It names the transport and the endpoint or connection context. It records the security mode and the authenticated peer claim, if one exists, without copying that claim into the Token field.
For UDP it keeps message type, Message ID, exchange lifetime, retransmission count and the duplicate-processing verdict. For every transport it keeps Token length and a safe representation of the value, the request method and target, the local outstanding-request record, the response code and the match result. At an intermediary it links downstream and upstream records without pretending the wire carried a universal identifier.
Then it walks past the protocol. Which authorization decision admitted the operation? Which resource version did the response describe? Did the application transaction commit? Did the actuator confirm completion through an independent signal? Which software and configuration revisions make the receipt stale?
No single field answers those, because they belong to different actors. The client owns correlation state. The transport and CoAP message layer own delivery mechanics. The security layer owns its peer claim. The server owns authorization and resource processing. The application or device owner owns outcome evidence. The IETF specifies interoperable behavior; it does not run the deployment.
Carsten Bormann's role is evidence, not mandate
The current IETF profile lists Bormann as a chair of the CoRE working group and the Thing-to-Thing Research Group, with 65 RFCs to his name. Those facts describe a substantial contribution record at the time of review. They do not convert one contributor into the owner of consensus, of a deployed implementation, or of an operator's risk decision.
The stronger attribution is narrower. RFC 7252 records Bormann among the authors who specified the separation. RFC 8323, with Bormann first in the author list, shows that separation surviving a change of transport. The documents are IETF products — publicly reviewed, collectively approved.
Running code supplies the next piece of evidence. A conforming parser, a Token generator with measured randomness, a duplicate cache, a correctly bound security association, a gateway mapping and an application receipt show what a particular system actually adopted. A standard's publication date cannot replace those observations.
That restraint is not a discount on engineering credit. It is the engineering contribution. A compact protocol succeeds when it says exactly enough for independent systems to interoperate, then stops before its fields get drafted into claiming identities, permissions and outcomes they were never built to carry.
The Token matched a reply. The operator still has to prove the rest.
Sources
- https://www.rfc-editor.org/rfc/rfc7252.html
- https://www.rfc-editor.org/rfc/rfc8323.html
- https://www.rfc-editor.org/rfc/rfc8974.html
- https://datatracker.ietf.org/person/Carsten%20Bormann
- https://www.ietf.org/lib/dt/media/photo/carsten-bormann-PAX2o.jpg
- https://heng.lu/running-code-primary-the-patch-needed-to-preserve-the-internet-original-design/
- https://heng.lu/minimum-initial-specification-localized-future-decision-voluntary-adoption-internet-coordination-system/
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






