Verifying the Communication and Security Mechanisms of WAMP

Han Bao, Chenhui Wang, Huibiao ZhuProceedings/Proceedings 2025

Abstract

The Web Application Messaging Protocol (WAMP) is a routed protocol designed to connect components in distributed applications through Publish/Subscribe and Remote Procedure Call messaging patterns. It defines a Basic Profile for core interactions and an Advanced Profile to extend its functionality. With its flexibility, scalability, and ability to support various communication patterns, WAMP has gained significant attention in distributed systems. However, existing studies on the communication and security properties of WAMP remain limited. In this paper, we employ the Communicating Sequential Processes (CSP) to model the two patterns of WAMP formally and verify several properties using Process Analysis Toolkit (PAT), including deadlock-freedom, data reachability, concurrency and ordering consistency. Verification results confirm that the model satisfies these properties, ensuring the reliability of interactions under various scenarios. Furthermore, by incorporating an intruder model and WAMP's optional authentication mechanisms from the Advanced Profile, we demonstrate improved security guarantees.

Introduction

In the evolving landscape of IoT and distributed web applications, real-time communication between components is paramount. While protocols like MQTT handle Publish/Subscribe (Pub/Sub) and HTTP manages Request/Response, the Web Application Messaging Protocol (WAMP) uniquely unifies both patterns into a single routed protocol. Despite its adoption, WAMP has lacked rigorous theoretical verification regarding its functional correctness and security robustness. This study addresses this gap by providing a mathematical verification of WAMP’s communication and security mechanisms using formal methods.

Methodology: Formal Modeling with CSP

The researchers utilized Communicating Sequential Processes (CSP) to describe the concurrent interaction patterns within WAMP. The protocol's architecture relies on a central router to decouple participants, leading to complex three-party interactions.

For the Remote Procedure Call (RPC) pattern, the model includes three primary roles: the Caller, the Callee, and the Dealer (Router). The sequence of interactions involves session establishment, registration of procedures, the call invocation, and the eventual result or error return.

Figure 1: Sequence diagram of the WAMP RPC interaction pattern, illustrating the roles of Caller, Dealer, and Callee.

The models were analyzed using the Process Analysis Toolkit (PAT), which performs exhaustive state-space exploration to verify properties such as deadlock-freedom and ordering consistency. To assess security, an "Intruder" process was introduced, capable of intercepting, forging, or eavesdropping on messages.

Verification Results

The verification process yielded critical insights into both the functional logic and the security posture of the protocol.

Functional Soundness

The "Basic Profile" of WAMP was found to be logically sound. The PAT model checker confirmed that properties such as Deadlock-freedom, Data Reachability, Concurrency, and Ordering Consistency are all valid. The routed architecture successfully ensures that messages arrive in the correct sequence, which is vital for maintaining state in distributed systems.

Security Vulnerabilities and Mitigation

A key finding is the distinction between logical correctness and security. While the Basic Profile functions correctly without crashing, it is inherently vulnerable to active attackers. In the absence of authentication, the intruder model successfully demonstrated that impersonation (e.g., Caller_Fake) and data leakage are "VALID" states—meaning they are achievable by an attacker.

To mitigate these risks, the researchers verified the Advanced Profile features, specifically Cryptosign (based on Ed25519) and TLS. Upon implementing these mechanisms, the intruder's ability to compromise the system was nullified.

Figure 4: Verification results for WAMP with authentication, showing that intruder-related properties (impersonation and leakage) become INVALID.

As shown in the results, the inclusion of authentication and encryption makes security-breach states "INVALID," proving that these optional features are essential for deployments in untrusted environments.

Conclusion and Future Work

This formal verification confirms that WAMP provides a reliable foundation for distributed messaging, provided its security extensions are utilized. The study highlights that WAMP’s optional Cryptosign and TLS features are mathematically necessary to prevent impersonation and eavesdropping.

Future research will focus on expanding the model to account for multi-role clients—where a single entity acts as Caller, Callee, Publisher, and Subscriber simultaneously—and exploring more sophisticated attack vectors to further harden the protocol's theoretical framework.

Summary updated

BibTeX
@inproceedings{bao2025verifying,
  author = {Han Bao and Chenhui Wang and Huibiao Zhu},
  title = {{Verifying the Communication and Security Mechanisms of WAMP}},
  booktitle = {Proceedings/Proceedings},
  year = {2025},
  doi = {10.18293/seke2025-048},
}
Figure