Implement MQTT 5.0 enhanced authentication with the AUTH packet for challenge/response (e.g. SCRAM-style) login and re-authentication

domain: iot · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In CONNECT, set the Authentication Method property to the SASL-style mechanism name and include initial Authentication Data if the mechanism requires it
  2. If the server needs another exchange step, it returns an AUTH packet with Reason Code 0x18 (Continue authentication) carrying the next Authentication Data challenge
  3. Respond with a client-sent AUTH packet (Reason Code 0x18) containing the requested Authentication Data; repeat the challenge/response loop until the server sends CONNACK (initial login) or AUTH with Reason Code 0x00 (Success)
  4. To re-authenticate an already-connected session, have the client send an unsolicited AUTH packet with Reason Code 0x19 (Re-authenticate) and its Authentication Method/Data
  5. Continue the AUTH 0x18 challenge/response loop as needed until the server confirms with AUTH Reason Code 0x00 (Success) to complete re-authentication without dropping the session

Known gotchas

Related routes

Implement an MQTT 5 request/response pattern using the Response Topic and Correlation Data properties
docs.oasis-open.org · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans