auth: add authentication
All checks were successful
Build ESP32 BMC Firmware / build (push) Successful in 1m7s

This commit is contained in:
2026-03-17 13:18:47 +01:00
parent e678ccb8b3
commit 3dd8296dbe
5 changed files with 461 additions and 25 deletions

View File

@@ -9,6 +9,9 @@ A Baseboard Management Controller (BMC) firmware for ESP32-S3 that provides remo
- **Serial Console**: UART bridge with WebSocket support for remote console access
- **Web Interface**: Modern HTML/CSS dashboard for easy management
- **REST API**: Full REST API for programmatic control
- **HTTP Basic Authentication**: Secure access to web interface and API
- **OTA Updates**: Over-the-air firmware updates
- **System Logs**: View ESP32 logs via web interface or API
## Hardware Requirements
@@ -78,6 +81,23 @@ idf.py -p /dev/ttyUSB0 monitor
## Configuration
### Authentication
The web interface and API are protected by HTTP Basic Authentication. Default credentials:
- **Username**: `admin`
- **Password**: `admin`
To change credentials, edit `main/config.h`:
```c
#define BMC_HTTP_AUTH_USERNAME "your_username"
#define BMC_HTTP_AUTH_PASSWORD "your_password"
```
To disable authentication:
```c
#define BMC_HTTP_AUTH_ENABLED 0
```
### Network Settings
By default, the firmware uses DHCP. To configure static IP: