## 5 Implementation Details
### Security  
Data security in the processes of data transfer and storage is essential in distributed processes, which are related to the selected protocols and technologies. First, the EMQ broker supports authenticating MQTT clients with client ID, username/password, IP address, and even HTTP cookies [57]. Confluent also provides security through transport layer security (TLS) or Kerberos authentication, encryption of network traffic via TLS, and authorization via access control lists (ACLs) [58]. Furthermore, web application security was implemented with Silhouette, which supports several authentication methods, including OAuth, OpenID, CAS, credentials, and basic authentication [59]. Moreover, the authors consider the use of anonymization to prevent inferences in the data. Additionally, MongoDB provides security mechanisms, such as authentication, control, and encryption, to secure MongoDB deployments: role-based access control and transport layer security/secure sockets layer (TLS/SSL) [60]. Another important component of the architecture with security mechanisms is Apache Spark, which uses authentication via a shared secret in all the master/workers configurations and in the Spark applications [61]. On the other hand, the entire system is supported on the Google Cloud infrastructure, which provides a series of intrinsic security mechanisms such as physical access to its facilities through biometric identification [62]. For applications, there are guarantees of a secure boot stack, machine identity, service identity, service integration, service isolation, denial of service (DoS) protection, encryption of interservice communication, and intrusion detection. K8s also provides several possibilities to configure the security of nodes, containers, and pods [63]. Due to the goals of this work, only some of the K8s security options were used. Access to K8s was achieved through a Google account. Therefore, an authentication and authorization scheme for using the K8s cluster API was required. The granularity of access to K8s resources was achieved through security policies applied to users through RBAC's ClusterRoles and ClusterRoleBindings to provide access to cluster namespaces. An advantage of using K8s clusters is that the K8s nodes and the set of deployed containers represent a configurable communication network. A K8s cluster inherently provides IP filtering rules, routing tables, and firewall rules on each node. In addition, it is possible to configure additional firewall rules for the ports of system components. The information security of the services discussed in this paper is a critical issue that must be considered for data during movement or at rest. Although we have pointed out some security mechanisms, a full study of security mechanisms is beyond the scope of this article. Some challenges that must be addressed to increase the security of the data of e-health systems are indicated below. The collection of sensitive medical data from homes poses complex security and privacy challenges due to the open nature of patient data that is susceptible to eavesdropping. In [64], some issues related to the privacy and security of WBANs are mentioned, such as accountability, which is related to the need for a person who possesses patient information to have the responsibility of safeguarding such information. Moreover, there are several concerns about the data collected by crowdsensing applications since users' personal devices could be connected to insecure access points or be contaminated with malicious code, which opens up several challenges regarding detecting the veracity of the data collected [65]. On the other hand, in many countries, the treatment of medical data must follow strict medical regulations, such as the Health Insurance Portability and Accountability Act (HIPAA) in the United States. In recent years, there has been great interest from cloud computing platform providers such as Google and Amazon in offering HIPAA-compliant services for hosting sensitive data [66; 67].