This Key Distribution and Secure Updates Framework is a comprehensive platform designed to manage IoT devices, companies, software, and software packages. The system ensures secure communication and efficient update management between IoT devices and the backend service. It includes a backend service, an IoT device client with device load monitoring, a user-friendly frontend interface, and Vault for secure key management, ensuring that cryptographic keys are securely generated, stored, and distributed.
- Secure IoT device registration
- Device load monitoring and optimal update scheduling
- Secure software package management
- Encrypted communication between devices and backend
- User-friendly dashboard for managing companies, devices, models, and software packages
The system consists of three main components:
- Backend Service: Implemented in Java and Spring Boot, it provides RESTful APIs for managing users, companies, devices, models, and software packages.
- IoT Device Client: A Python script simulating an IoT device with a mock HSM for secure key management and encrypted communication with the backend.
- Frontend: A React-based user interface for managing the system.
- AdminUserServiceImpl: Manages admin users.
- CompanyServiceImpl: Manages companies.
- DeviceServiceImpl: Manages devices.
- ModelServiceImpl: Manages models.
- SoftwarePackageServiceImpl: Manages software packages.
- SoftwareServiceImpl: Manages software entries.
- UpdateHistoryServiceImpl: Manages update histories.
- UpdateServiceImpl: Manages the update process for devices.
- VaultSecretServiceImpl: Handles encryption, decryption, and key management using Vault.
- MockHSM: A mock Hardware Security Module for encryption, decryption, and key management.
- Device Registration: Registers the device with the backend.
- Update Management: Checks for updates, downloads them, verifies signatures, and flashes software packages.
- App.js: Main React component for routing.
- MainDashboard.js: Displays an overview of companies, devices, software, and software packages.
- Dashboard.js: Displays detailed information about a specific company.
- Models.js: Manages models.
- Devices.js: Manages devices.
- Software.js: Manages software entries.
- SoftwarePackages.js: Manages software packages.
- Java 11 or higher
- Maven
- Node.js and npm
- Docker and Docker Compose
- Python 3.x
- Virtualenv (optional but recommended)
- Clone the repository:
git clone https://github.com/rgligora/key-distribution-secure-update-framework.git
-
Navigate to the
backenddirectory:cd key-distribution-secure-update-framework/backend -
Build and run Vault using Docker:
docker build -t vault-setup . docker run -it --name vault-container -p 8200:8200 vault-setup
- Build and run PostgreSQL using Docker Compose:
docker-compose up -d
-
Navigate to the
backenddirectory:cd key-distribution-secure-update-framework/backend -
Build the project:
mvn clean install
-
Run the Spring Boot application:
mvn spring-boot:run
-
Navigate to the frontend directory:
cd frontend -
Install the dependencies:
npm install
-
Start the React application:
npm start
-
Create and activate a virtual environment:
cd key-distribution-secure-update-framework/client python -m venv venv source venv/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
-
Run the IoT device client:
python client.py <backend_IPaddress>
Once all components are running, you can access the frontend at http://localhost:3000 to interact with the system. The backend service runs on http://0.0.0.0:8080, and the IoT device client communicates with this backend service for registration and updates.