Skip to main content
QUICK REVIEW

[Paper Review] JSON Web Token (JWT) based client authentication in Message Queuing Telemetry Transport (MQTT)

Krishna Shingala|arXiv (Cornell University)|Mar 7, 2019
Arduino and IoT ApplicationsEngineering7 references9 citations
TL;DR

This paper evaluates JSON Web Token (JWT) and TLS-based mutual authentication for MQTT clients in IoT systems, demonstrating that JWT offers lightweight, privacy-preserving authentication suitable for constrained devices, while TLS provides strong security but higher resource overhead. The key contribution is a comparative analysis highlighting trade-offs in security, performance, and deployment complexity for IoT environments.

ABSTRACT

This paper is an overview of JSON Web Token (JWT) and Transport Layer Security (TLS) as two primary approaches for authentication of the things on the Internet. JSON Web Token (JWT) is used extensively today for authorization and authentication within the OAuth and the OpenId framework. Recently, the Google Cloud IoT has mandated the use of JWT for both HTTP and Message Queuing Telemetry Transport (MQTT) protocol based clients connecting to the cloud service securely over TLS. MQTT is the protocol of choice in IoT devices and is the primary focus of this paper as the application protocol. Another popular cloud platform Amazon Web Service (AWS) uses the TLS mutual authentication for client authentication. Any comparison provided here between the two approaches is primarily from a constrained device client perspective.

Motivation & Objective

  • To evaluate JWT and TLS as authentication mechanisms for MQTT-based IoT clients.
  • To compare the security, performance, and resource overhead of JWT and TLS from the perspective of constrained IoT devices.
  • To assess the privacy implications and trust model differences between JWT and certificate-based TLS authentication.
  • To identify deployment challenges and risks associated with each approach in real-world IoT systems.
  • To provide guidance for selecting authentication schemes based on use case, device constraints, and threat model.

Proposed method

  • The paper analyzes the JWT standard (RFC 7519) and its integration with OAuth and OpenID Connect for token-based authentication.
  • It examines the TLS handshake process, including certificate chains and mutual authentication, as implemented in AWS IoT.
  • The study compares JWT-based authentication (as used in Google Cloud IoT) with TLS client certificate authentication in terms of computational cost, memory usage, and key management complexity.
  • It evaluates the use of HMAC-SHA256 and public-key signatures (e.g., ECDSA) in JWT for integrity and authenticity.
  • The paper discusses the role of secure channels (TLS) in protecting JWT exchanges and the risks of man-in-the-middle attacks if not properly secured.
  • It highlights the importance of secure time synchronization and the risks of known-plaintext attacks in predictable MQTT payloads over TLS.

Experimental results

Research questions

  • RQ1How does JWT-based authentication compare to TLS mutual authentication in terms of computational and memory overhead on constrained IoT devices?
  • RQ2What are the privacy implications of using JWT versus client certificates for device authentication in IoT systems?
  • RQ3How do the trust models of JWT and TLS differ, and what are the implications for key management and device lifecycle?
  • RQ4What are the security risks associated with using JWT over unsecured channels, and how does TLS mitigate them?
  • RQ5To what extent can TLS 1.3 reduce the performance gap between JWT and certificate-based authentication in IoT deployments?

Key findings

  • JWT-based authentication provides better client privacy than TLS mutual authentication, as it does not expose client identity through certificates.
  • TLS mutual authentication requires complex certificate chain management and is more computationally intensive, especially on resource-constrained devices.
  • JWTs are stateless and can be validated independently, reducing server-side state management compared to certificate revocation lists in TLS.
  • The use of JWTs over TLS ensures secure token exchange, but the integrity of the entire channel depends on strong TLS configuration and implementation.
  • Both schemes rely on TLS for secure communication, making them vulnerable to TLS protocol weaknesses or implementation flaws.
  • Known-plaintext attacks on TLS may be feasible in MQTT due to predictable message patterns, especially when using block ciphers in CBC mode.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.