Data in Transit and Data at Rest in Mule


If you ever had to deal with the security design for a system you've probably heard these terms. Both of them refer to the state of our data. Our data can be in two states:
  • It can be stored in our records systems, such as databases, and storage providers... at the user level it can also be stored in physical or digital media. This is when the data is at rest, it's not moving
  • But when we work on integration scenarios, this data will constantly move across our different systems and applications. The Data is in transit, is actively moving from one location to another, many times over the Internet. That's what we try to do with our Mule apps, create APIs so that data can be accessed and travel easily to our API consumers.
When we work in Integration it is important to understand the security concerns related to each state and the security mechanisms we can put in place to protect our data.

Here's a quick summary on what those security concerns and mechanisms are depending on the state of our data.

Data in Transit:

  • Security Concerns: The primary concern with data in transit is interception or eavesdropping by unauthorized parties during transmission.
  • Security Mechanisms:
    • Encryption: Encrypting data ensures that even if intercepted, it remains unreadable without the decryption key. Common protocols for securing data in transit include TLS (Transport Layer Security) for web traffic and VPNs (Virtual Private Networks) for secure private connections.
    • Secure Protocols: Using secure communication protocols (e.g., HTTPS, SSH) ensures that data transmitted over networks is protected from interception and manipulation.Data Integrity Checks: Hashing and digital signatures can verify that data has not been altered during transmission, providing integrity assurance.

Data at Rest:

  • Security Concerns: The main concern with data at rest is unauthorized access to stored data, whether through physical theft or digital intrusion.
  • Security Mechanisms:
    • Encryption: Encrypting stored data ensures that even if storage media is compromised, the data remains protected. This can be achieved through file-level encryption, disk encryption (e.g., BitLocker, FileVault), or database encryption.
    • Access Controls: Implementing strong access controls, such as authentication and authorization mechanisms, limits who can access data and under what conditions.
    • Data Masking and Tokenization: Techniques like data masking replace sensitive data with fictional data or tokens, reducing exposure in case of unauthorized access.
    • Backup and Recovery: Regularly backing up data and ensuring backups are securely stored protects against data loss due to breaches or system failures.

In Mule

When designing security for our Mule apps, most of the times we focus only on protecting the data in transit. For the simple reason that our mule apps and APIs should be stateless, that is, our mule apps should not store or keep any data. Especially for REST APIs, stateless is one of the principles in REST architectures.

That's why you'll find many more mechanisms like mTLS, OAuth, VPNs etc to protect the data crossing the Mulesoft layer of integration. Mulesoft is not responsible for storing any of our data, typically that's the responsibility of the data owner. In that regard, Mule is only an access layer to data, not a repository.

The only data that is susceptible of being stored in Mule would be:
  • Object Store - The OS typically is used to store temporary or cached information, like watermarks or tokens. This info can be encrypted
  • If we use asynchronous communication, data can be temporarily stored in a queue of a broker. We need to make sure that the broker can protect that info if necessary.
  • Logs - Must be protected at rest, especially if they contain confidential information
  • User data - information to the users logged in the Anypoint platform
Previous Post Next Post