Skip to content

This project aims to design and implement a basic web server capable of handling multiple client requests concurrently using techniques from concurrent programming. The focus will be on understanding and applying concurrency concepts rather than delving into advanced features like security, performance testing, and detailed design documentation.

License

coderzmac/flask-iot-api-gateway

Repository files navigation

🔐 IoT Gateway Security Project This project simulates an IoT environment with a secure edge gateway that authenticates devices and manages sensor data using JWT tokens. It demonstrates key concepts in IoT security including token-based access control, structured logging, and modular sensor simulation.

🚀 Features 🧪 Simulated IoT sensor (sensor_simulator.py)

🌐 Flask API gateway with JWT authentication

🔐 Secure login via /login endpoint

📥 Sensor data submission to /sensor-data

📝 Real-time logging to gateway.log

🛡️ Device config via device_config.json

🛠 Requirements

Python 3.8+

Flask

PyJWT

Requests

▶️ Run the Project

Start the Flask API server: python apitest.py

Run the sensor simulator: python sensor_simulator.py

📄 Project Structure

apitest.py – Main Flask server

sensor_simulator.py – Simulates temperature & humidity data

device_config.json – Device list

gateway.log – Request and data logs

About

This project aims to design and implement a basic web server capable of handling multiple client requests concurrently using techniques from concurrent programming. The focus will be on understanding and applying concurrency concepts rather than delving into advanced features like security, performance testing, and detailed design documentation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published