RabbitMQ
Erlang
TLS Security
Network Failures
System Updates

RabbitMQ 3.6.1 / Erlang 18.3 TLS insufficient security failures

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

RabbitMQ, developed using the Erlang programming language, is an open-source message broker software that facilitates the storage and retrieval of messages in a complex distributed system. When it comes to security, TLS (Transport Layer Security) is fundamental in providing encrypted communication channels between clients and servers. This article aims to dissect the issue surrounding the insufficient security failures found in RabbitMQ 3.6.1 and Erlang 18.3, particularly focusing on their implementation of TLS.

Understanding the Problem Space

With RabbitMQ version 3.6.1 running on Erlang/OTP 18.3, several users have reported issues related to TLS, which is critical for securing message data in transit. The core issues involving TLS insufficient security in such configurations predominantly relate to:

  1. Outdated TLS Protocols Usage: Early versions of TLS protocols such as TLS 1.0 and 1.1 are considerably less secure when compared to TLS 1.2 and TLS 1.3. Using these outdated versions exposes communication to vulnerabilities and potential exploitation.
  2. Weak Cipher Suites: Cipher suites, which are used to secure an SSL/TLS connection, depict a combination of authentication, encryption, and message authentication code (MAC) algorithms. Insecure cipher suites included in these versions weaken the integrity and confidentiality of the communications.

How TLS Works in RabbitMQ

In RabbitMQ, TLS is managed by the underlying Erlang/OTP SSL application. The SSL application can be configured to specify which protocols and cipher suites are permissible during the handshake process, which initiates the secure communication.

Here’s a generic flow of how TLS works:

  1. Initiation: A client sends a "client hello" message that lists supported TLS versions, cipher suites, and compression methods.
  2. Server response: The server replies with a "server hello" message, selecting the protocol, cipher suite, and compression method from the list provided by the client.
  3. Authentication and Pre-Master Secret: The server then provides a certificate for authentication. The client verifies this certificate and sends a pre-master secret encrypted with the server’s public key, derived from the certificate.
  4. Session keys generation: Both the server and the client then generate session keys from the pre-master secret.
  5. Secure symmetric encryption established: These session keys are then used to encrypt the data transfer between the client and the server.

Examples of Configuration Issues

A typical insecure configuration in RabbitMQ which was common in version 3.6.1/Erlang 18.3 might look like:

erlang
1[
2  {rabbit, [
3     {ssl_options, [
4       {versions, ['tlsv1.1', 'tlsv1']},
5       {ciphers, [
6         {rsa, aes_256_cbc, sha256},
7         {rsa, aes_128_cbc, sha256}
8       ]}
9     ]}
10   ]}
11]

This configuration example explicitly allows older TLS versions (TLS 1.1, TLS 1.0) and weak cipher suites which do not effectively protect against modern threats.

Mitigation Strategies

To mitigate these security issues, consider:

  • Upgrading RabbitMQ and Erlang/OTP: Newer versions support better default security configurations.
  • Explicitly configuring TLS parameters: Always specify secure protocols (e.g., TLS 1.2 or higher) and robust cipher suites in the configuration. Remove any deprecated protocols or ciphers.
  • Regularly updating TLS certificates: Certificates should be rotated and updated regularly to ward off possible misuse.

Summary Table

AspectRisk in RabbitMQ 3.6.1 with Erlang 18.3Recommendations
TLS ProtocolsSupport for Deprecated Protocols (TLS 1.0/1.1)Upgrade and configure to use only TLS 1.2 or higher
Cipher SuitesInclusion of Weak Cipher SuitesSpecify strong cipher suites in configuration
Regular MaintenanceInconsistent updates to TLS and certificatesImplement regular updates and certificate rotation

Being proactive about these configurations and updates is essential to maintaining the security integrity of the RabbitMQ environment. As cyber threats evolve, so must the defenses we put in place to protect our systems and data.


Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.