Novel Security Models for IoT–Fog–Cloud Architectures in a Real-World Environment
Abstract
:1. Introduction
- We propose a fine-grained data access control model based on the attribute-based encryption (ABE) of the IoT–Fog–Cloud architecture to limit access to sensor data to meet the authorization aim.
- We propose a blockchain-based certificate model of the IoT–Fog–Cloud architecture to authenticate IoT devices to fog devices to meet the authentication aim.
- We evaluate the performance of the security model (fine-grained data access control and blockchain-based certificate) using AWS message broker metrics for a real-life scenario of the IoT–Fog–Cloud architecture.
- We compare the performance of the IoT–Fog–Cloud architecture with and without our security model using AWS message broker metrics and present its efficiency and feasibility.
2. Overview of IoT–Fog–Cloud Architecture
3. Authentication Model and Authorization Model
3.1. Proposed Authentication Model: Blockchain-Based Certificate
3.2. Proposed Authorization Model: Attribute-Based Encryption for Access Control
4. Experiment Setup and Evaluation Metrics
4.1. Hardware
4.2. Software
Algorithm 1: Collect data from the IoT device and send it to the fog device–IoT–Fog–Cloud architecture. This algorithm provides authentication and authorization operations from IoT devices (DHT11 sensor + Raspberry Pi) to fog devices. | |
1: | Import board |
2: | Import adafruit_dht |
3: | Import paho.mqtt.client as mqtt |
4: | From Crypto.Cipher import ABS |
5: | Import base64 |
6: | Define the DHT sensor type (DHT11) |
7 | Define the Raspberry Pi’s input/output pins to which the DHT11 is connected |
8: | Define a Python library (adafruit_dht:DHT11) to read the DHT series of humidity and temperature sensors on a Raspberry Pi with one argument, DHT pin connected |
9: | Define the key length which must be either 16, 24, or 32 bytes long |
10: | Define humidity topic variable and temperature topic variable for each IoT device (DHT11 attached to Raspberry Pi) in each experiment |
11: | Define MQTT broker variable |
12: | Define the variable of MQTT port |
13: | While True do |
14: | Define a connection function |
15: | Connect to Internet |
16: | If (the connection is established) then |
17: | Print “connected” |
18: | Else (the connection is not established) then |
19: | Try reconnecting to Internet |
20: | Define a message function |
21: | Read humidity degree from Raspberry Pi serial port using (dhtDevice.humidity) |
22: | Read temperature degree from Raspberry Pi serial port using (dhtDevice.temperature) |
23: | Print humidity degree |
24: | Print temperature degree |
25: | Generate keys containing a set of attributes for each sensor data type in each IoT device |
26: | Generate a first key containing a set of attributes for temperature sensor in each IoT device |
27: | Generate a second key containing a set of attributes for humidity sensor in each IoT device |
28: | Create the cipher config for first key (temperature sensor) |
29: | Create the cipher config for second key (humidity sensor) |
30: | Use the cipher of the first key to encrypt the humidity degree message using cipher.encrypt |
31: | Use the cipher of second key to encrypt the temperature degree message using cipher.encrypt |
32: | Encode the cipher and humidity degree message using the base64 module |
33: | Encode the cipher and temperature degree message using the base64 module |
34: | Print the encrypted message |
35: | Publish humidity topic with its encrypted message to fog device |
36: | Publish temperature topic with its encrypted message to fog device |
37: | End while |
38: | Create a client to connect to fog device |
39: | Make the client run connect, and message function |
40: | Enable the transport layer security using fog device certificates and MQTT protocol version |
41: | Connect the client to the MQTT broker using fog device’s IP address and MQTT port 1883 |
42: | Call a loop_start() method for the client connection |
Algorithm 2: Collect data received from the fog device and send it to the cloud–IoT–Fog–Cloud architecture. This algorithm provides authentication and authorization operations from fog devices to IoT devices (DHT11 sensor + Raspberry Pi) and from fog devices to the AWS cloud. | |
1: | Import sys |
2: | Import ssl |
3: | Import adafruit_dht |
4: | Import paho.mqtt.client as mqtt |
5: | From Crypto.Cipher import ABS |
6: | Import base64 |
7: | Define the key length which must be either 16, 24, or 32 bytes long |
8: | Define the MQTT broker variable |
9: | Define the MQTT port variable |
10: | While True do |
11: | Define a connection function |
12: | Subscribe for all topics in each IoT devices |
13: | Connect to Internet |
14: | If (the connection is established) then |
15: | Print “connected” |
16: | Else (the connection is not established) then |
17: | Try reconnecting to Internet |
18: | Define a message function |
19: | Define keys containing a set of attributes for each sensor data type in each IoT device based on access policy |
20: | Define a first key containing a set of attributes for temperature sensor in each IoT device |
21: | Define a second key containing a set of attributes for humidity sensor in each IoT device |
22: | Create the cipher config for first key (temperature sensor) |
23: | Create the cipher config for second key (humidity sensor) |
24: | Decode the encrypted message using the base64 module |
25: | Use the cipher of the first key to decrypt the humidity degree message using cipher.decrypt |
26: | Use the cipher of second key to decrypt the temperature degree message using cipher.decrypt |
27: | Print the decrypted message |
28: | Publish humidity topic with its decrypted message to AWS cloud |
29: | Publish temperature topic with its decrypted message to AWS cloud |
30: | end while |
31: | Create two clients, the first client used for the MQTT broker, and the second client used for the AWS broker |
32: | Make the first client run connect, and message function |
33: | Connect the first client to MQTT broker using fog device’s IP address and MQTT port |
34: | Call a loop_start() method for the first client connection |
35: | Enable the transport layer security for the second client using the AWS certificates paths and MQTT protocol version |
36: | Connect the second client to AWS broker using AWS Endpoint and AWS port |
37: | Call a loop_start () method for the second client connection |
4.3. Evaluation Metrics: AWS Cloud Metrics
5. Evaluation Methods
5.1. IoT–Fog–Cloud Architecture with Blockchain-Based Certificate Model versus without Blockchain-Based Certificate Model
5.2. IoT–Fog–Cloud Architecture with Access Control Model versus without Access Control Model
6. Evaluation of Results
6.1. IoT–Fog–Cloud Architecture with Blockchain-Based Certificate Model versus without Blockchain-Based Certificate Model
6.2. IoT–Fog–Cloud Architecture with Access Control Model versus without Access Control Model
7. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Nebbione, G.; Calzarossa, M.C. Security of IoT Application Layer Protocols: Challenges and Findings. Future Internet 2020, 12, 55. [Google Scholar] [CrossRef] [Green Version]
- Yunana, K.; Alfa, A.A.; Misra, S.; Damasevicius, R.; Maskeliunas, R.; Oluranti, J. Internet of Things: Applications, Adoptions and Components—A Conceptual Overview. In Proceedings of the Hybrid Intelligent Systems; Abraham, A., Hanne, T., Castillo, O., Gandhi, N., Nogueira Rios, T., Hong, T.-P., Eds.; Springer International Publishing: Cham, Germany, 2021; pp. 494–504. [Google Scholar]
- Zhou, W.; Jia, Y.; Peng, A.; Zhang, Y.; Liu, P. The Effect of IoT New Features on Security and Privacy: New Threats, Existing Solutions, and Challenges Yet to Be Solved. IEEE Internet Things J. 2019, 6, 1606–1616. [Google Scholar] [CrossRef] [Green Version]
- Alzoubi, Y.I.; Osmanaj, V.H.; Jaradat, A.; Al-Ahmad, A. Fog Computing Security and Privacy for the Internet of Thing Applications: State-of-the-Art. Secur. Priv. 2021, 4, e145. [Google Scholar] [CrossRef]
- Aleisa, M.A.; Abuhussein, A.; Sheldon, F.T. Access Control in Fog Computing: Challenges and Research Agenda. IEEE Access 2020, 8, 83986–83999. [Google Scholar] [CrossRef]
- Aleisa, M.A.; Abuhussein, A.; Alsubaei, F.S.; Sheldon, F.T. Examining the Performance of Fog-Aided, Cloud-Centered IoT in a Real-World Environment. Sensors 2021, 21, 6950. [Google Scholar] [CrossRef] [PubMed]
- Aleisa, M.; Hussein, A.A.; Alsubaei, F.; Sheldon, F.T. Performance Analysis of Two Cloud-Based IoT Implementations: Empirical Study. In Proceedings of the 2020 7th IEEE International Conference on Cyber Security and Cloud Computing (CSCloud)/2020 6th IEEE International Conference on Edge Computing and Scalable Cloud (EdgeCom), New York, NY, USA, 1–3 August 2020; IEEE: New York, NY, USA, August, 2020; pp. 276–280. [Google Scholar]
- The DDoS Attack on Dyn’s DNS Infrastructure. Available online: https://www.thousandeyes.com/blog/dyn-dns-ddos-attack/ (accessed on 13 February 2022).
- Alrawais, A.; Alhothaily, A.; Hu, C.; Xing, X.; Cheng, X. An Attribute-Based Encryption Scheme to Secure Fog Communications. IEEE Access 2017, 5, 9131–9138. [Google Scholar] [CrossRef]
- Khan, S.; Parkinson, S.; Qin, Y. Fog Computing Security: A Review of Current Applications and Security Solutions. J. Cloud Comp. 2017, 6, 19. [Google Scholar] [CrossRef]
- A Survey on Internet of Things: Architecture, Enabling Technologies, Security and Privacy, and Applications. Available online: https://ieeexplore.ieee.org/abstract/document/7879243/ (accessed on 13 February 2022).
- Patwary, A.A.-N.; Fu, A.; Naha, R.K.; Battula, S.K.; Garg, S.; Patwary, M.A.K.; Aghasian, E. Authentication, Access Control, Privacy, Threats and Trust Management Towards Securing Fog Computing Environments: A Review. arXiv 2020, arXiv:2003.00395. [Google Scholar]
- Eclipse Mosquitto. Available online: https://mosquitto.org/ (accessed on 13 February 2022).
- Industries, A. DHT11 Basic Temperature-Humidity Sensor + Extras. Available online: https://www.adafruit.com/product/386 (accessed on 20 November 2020).
- Foundation, T.R.P. Buy a Raspberry Pi 3 Model B. Available online: https://www.raspberrypi.com/products/raspberry-pi-3-model-b/ (accessed on 13 February 2022).
- Amazon CloudWatch Documentation. Available online: https://docs.aws.amazon.com/cloudwatch/index.html (accessed on 13 February 2022).
- AWS IoT Core Documentation. Available online: https://docs.aws.amazon.com/iot/ (accessed on 13 February 2022).
Equipment Name | Equipment Type | Quantity | Purpose |
---|---|---|---|
DHT11 | Sensor | 3 | Generates temperature degree and humidity degree |
Raspberry Pi | Version 3 (Model B) | 4 | Provides WiFi service and processing and storage capabilities |
Micro SD card | 32 GB of storage | 4 | Operating system storage |
Monitor | HP | 4 | Monitors the experiments |
Keyboards and mice | HP | 4 | Make it easier to work on a Raspberry Pi |
Power supply/adapter | CanaKit | 4 | Provides the Raspberry Pi with power |
HDMI cable | onn | 4 | Provides the connection between the Raspberry Pi and a monitor |
AWS Cloud Metrics | Descriptions |
---|---|
connect.success | This is used to count how many successful connections our fog devices made with the AWS cloud. |
ping.success | This is used to count how many ping messages our fog devices sent to the AWS cloud in the IoT–Fog–Cloud architecture. |
publishin.success | This is used to count how many publish requests were processed by the AWS cloud. |
publishout.success | This is used to count how many publish requests were made by the AWS cloud to the fog devices in the IoT–Fog–Cloud architecture. |
subscribe.success | This is used to count how many subscribe requests were processed by the AWS cloud. |
unsubscribe.success | This is used to count how many unsubscribe requests were processed by the AWS cloud. |
AWS Cloud Metrics (N. Virginia Datacenter)—Python Script—IoT–Fog–Cloud Architecture without Blockchain-Based Certificate Model | AWS Cloud Metrics (N. Virginia Datacenter)—Python Script—IoT–Fog–Cloud Architecture with Blockchain-Based Certificate Model | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IoT devices | 1 | IoT devices | 1 | ||||||||
Subscribe and publish requests | 2 | Subscribe and publish requests | 2 | ||||||||
AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 | AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 |
connect.success | 2 | 2 | 2 | 2 | 2 | connect.success | 2 | 2 | 2 | 2 | 2 |
ping.success | 2 | 2 | 8 | 29 | 120 | ping.success | 2 | 2 | 8 | 29 | 120 |
publishin.success | 44 | 44 | 206 | 586 | 2360 | publishin.success | 44 | 44 | 206 | 586 | 2360 |
publishout.success | 44 | 44 | 206 | 586 | 2360 | publishout.success | 44 | 44 | 206 | 586 | 2360 |
subscribe.success | 2 | 2 | 2 | 2 | 2 | subscribe.success | 2 | 2 | 2 | 2 | 2 |
unsubscribe.success | 2 | 2 | 2 | 2 | 2 | unsubscribe.success | 2 | 2 | 2 | 2 | 2 |
IoT devices | 2 | IoT devices | 2 | ||||||||
Subscribe and publish requests | 4 | Subscribe and publish requests | 4 | ||||||||
AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 | AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 |
connect.success | 4 | 4 | 4 | 4 | 4 | connect.success | 4 | 4 | 4 | 4 | 4 |
ping.success | 2 | 2 | 8 | 29 | 120 | ping.success | 2 | 2 | 8 | 29 | 120 |
publishin.success | 70 | 70 | 350 | 1110 | 4590 | publishin.success | 70 | 70 | 350 | 1110 | 4590 |
publishout.success | 70 | 70 | 350 | 1110 | 4590 | publishout.success | 70 | 70 | 350 | 1110 | 4590 |
subscribe.success | 4 | 4 | 4 | 4 | 4 | subscribe.success | 4 | 4 | 4 | 4 | 4 |
unsubscribe.success | 4 | 4 | 4 | 4 | 4 | unsubscribe.success | 4 | 4 | 4 | 4 | 4 |
IoT devices | 3 | IoT devices | 3 | ||||||||
Subscribe and publish requests | 6 | Subscribe and publish requests | 6 | ||||||||
AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 | AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 |
connect.success | 6 | 6 | 6 | 6 | 6 | connect.success | 6 | 6 | 6 | 6 | 6 |
ping.success | 2 | 2 | 9 | 29 | 119 | ping.success | 2 | 2 | 9 | 29 | 119 |
publishin.success | 115 | 115 | 548 | 1660 | 6510 | publishin.success | 115 | 115 | 548 | 1660 | 6510 |
publishout.success | 115 | 115 | 548 | 1660 | 6510 | publishout.success | 115 | 115 | 548 | 1660 | 6510 |
subscribe.success | 6 | 6 | 6 | 6 | 6 | subscribe.success | 6 | 6 | 6 | 6 | 6 |
unsubscribe.success | 6 | 6 | 6 | 6 | 6 | unsubscribe.success | 6 | 6 | 6 | 6 | 6 |
AWS Cloud Metrics (N. Virginia Datacenter)—Python Script—IoT–Fog–Cloud Architecture without Access Control Model | AWS Cloud Metrics (N. Virginia Datacenter)—Python Script—IoT–Fog–Cloud Architecture with Access Control Model | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IoT devices | 1 | IoT devices | 1 | ||||||||
Subscribe and publish requests | 2 | Subscribe and publish requests | 2 | ||||||||
AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 | AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 |
connect.success | 2 | 2 | 2 | 2 | 2 | connect.success | 2 | 2 | 2 | 2 | 2 |
ping.success | 2 | 2 | 8 | 29 | 120 | ping.success | 2 | 2 | 8 | 29 | 120 |
publishin.success | 44 | 44 | 206 | 586 | 2360 | publishin.success | 42 | 42 | 204 | 584 | 2358 |
publishout.success | 44 | 44 | 206 | 586 | 2360 | publishout.success | 42 | 42 | 204 | 584 | 2358 |
subscribe.success | 2 | 2 | 2 | 2 | 2 | subscribe.success | 2 | 2 | 2 | 2 | 2 |
unsubscribe.success | 2 | 2 | 2 | 2 | 2 | unsubscribe.success | 2 | 2 | 2 | 2 | 2 |
IoT devices | 2 | IoT devices | 2 | ||||||||
Subscribe and publish requests | 4 | Subscribe and publish requests | 4 | ||||||||
AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 | AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 |
connect.success | 4 | 4 | 4 | 4 | 4 | connect.success | 4 | 4 | 4 | 4 | 4 |
ping.success | 2 | 2 | 8 | 29 | 120 | ping.success | 2 | 2 | 8 | 29 | 120 |
publishin.success | 70 | 70 | 350 | 1110 | 4590 | publishin.success | 68 | 68 | 348 | 1108 | 4588 |
publishout.success | 70 | 70 | 350 | 1110 | 4590 | publishout.success | 68 | 68 | 348 | 1108 | 4588 |
subscribe.success | 4 | 4 | 4 | 4 | 4 | subscribe.success | 4 | 4 | 4 | 4 | 4 |
unsubscribe.success | 4 | 4 | 4 | 4 | 4 | unsubscribe.success | 4 | 4 | 4 | 4 | 4 |
IoT devices | 3 | IoT devices | 3 | ||||||||
Subscribe and publish requests | 6 | Subscribe and publish requests | 6 | ||||||||
AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 | AWS cloud metrics (minutes) | 0.5 | 1 | 5 | 15 | 60 |
connect.success | 6 | 6 | 6 | 6 | 6 | connect.success | 6 | 6 | 6 | 6 | 6 |
ping.success | 2 | 2 | 9 | 29 | 119 | ping.success | 2 | 2 | 9 | 29 | 119 |
publishin.success | 115 | 115 | 548 | 1660 | 6510 | publishin.success | 113 | 113 | 546 | 1658 | 6508 |
publishout.success | 115 | 115 | 548 | 1660 | 6510 | publishout.success | 113 | 113 | 546 | 1658 | 6508 |
subscribe.success | 6 | 6 | 6 | 6 | 6 | subscribe.success | 6 | 6 | 6 | 6 | 6 |
unsubscribe.success | 6 | 6 | 6 | 6 | 6 | unsubscribe.success | 6 | 6 | 6 | 6 | 6 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Aleisa, M.A.; Abuhussein, A.; Alsubaei, F.S.; Sheldon, F.T. Novel Security Models for IoT–Fog–Cloud Architectures in a Real-World Environment. Appl. Sci. 2022, 12, 4837. https://doi.org/10.3390/app12104837
Aleisa MA, Abuhussein A, Alsubaei FS, Sheldon FT. Novel Security Models for IoT–Fog–Cloud Architectures in a Real-World Environment. Applied Sciences. 2022; 12(10):4837. https://doi.org/10.3390/app12104837
Chicago/Turabian StyleAleisa, Mohammed A., Abdullah Abuhussein, Faisal S. Alsubaei, and Frederick T. Sheldon. 2022. "Novel Security Models for IoT–Fog–Cloud Architectures in a Real-World Environment" Applied Sciences 12, no. 10: 4837. https://doi.org/10.3390/app12104837
APA StyleAleisa, M. A., Abuhussein, A., Alsubaei, F. S., & Sheldon, F. T. (2022). Novel Security Models for IoT–Fog–Cloud Architectures in a Real-World Environment. Applied Sciences, 12(10), 4837. https://doi.org/10.3390/app12104837