Changelog¶
All notable changes to dawos-agent are documented here. For the full changelog with detailed descriptions, see CHANGELOG.md on GitHub.
The format follows Keep a Changelog and this project adheres to Semantic Versioning.
v0.4.0 (2026-07-14)¶
Added¶
- Session history database (SQLite WAL mode) with 4 endpoints: record, query with filtering, purge by timestamp, and statistics
- Config validation endpoint (
POST /api/v1/config/validate) for dry-run syntax checking without applying changes - CSV export endpoints for sessions and session history with RFC 4180 compliance and formula injection prevention
- RADIUS diagnostics endpoints: auth test, CoA disconnect test, and NAS client listing
- PPPoE runtime configuration endpoints: interface listing and module reload
- Session search endpoints: search by username, IP address, and session ID with pattern matching
- Extended system statistics endpoint with parsed numeric fields
- IP pool detail endpoint for single pool inspection
- 23 new Pydantic models, 5 new service modules, 4 new router modules
- Test suite expanded to 1410 tests with 100% coverage
Security¶
- CSV formula injection prevention (prefixes
=,+,-,@,\t,\rwith single-quote) - RADIUS shared secrets never exposed via API responses
- Parameterized SQL queries throughout session history service
v0.3.3 (2026-07-12)¶
Added¶
GET /api/v1/network/throughput— read-only endpoint (ViewerKey) that reads/proc/net/devand returns aggregate plus per-interface cumulativerx_bytes/tx_bytescounters. No sudo required.POST /api/v1/conntrack/flush— operator endpoint (ApiKey) that runsconntrack -Fvia sudo to clear all nf_conntrack entries. Returns pre-flush entry count. Sudoers entry added for/usr/sbin/conntrack.
Changed¶
- Bulk endpoint docstrings now include request body JSON examples — documents that
BulkRateLimitRequestuses per-item objects ({"items": [{"username": "...", "rate": "..."}]}) rather than a flat usernames+rate shape. - Test suite: 1410 tests, 100% coverage maintained
Fixed¶
sessions/statsreturns numeric fields as numbers —SessionStatsResponsenow typescpu_percentasfloatandpool_used/pool_totalasintinstead ofstr- SNMP health check: replaced UDP socket probe with
ss -lunfor reliability - IP pool CIDR validation returns HTTP 422 instead of 409
restart_session()catchesRuntimeErrorand reportssuccess: false- Event handler webhooks now fire actual HTTP POST via
httpx.AsyncClient - Event history bounded to 1000 entries via
deque(maxlen=1000) parse_stat()handles malformed accel-cmd output gracefully- Renamed misleading
cache_sizevariable
Security¶
- Internal error details no longer leaked to API clients (27 router modules, 106 handlers)
X-Request-IDheader validated against printable ASCII regex before acceptance- WebSocket
/ws/eventsnow prefersX-API-Keyheader over query parameter
v0.3.2 (2026-07-09)¶
Added¶
- Graceful shutdown endpoints for controlled accel-ppp daemon shutdown:
POST /api/v1/service/shutdown— soft (drain) or hard (immediate) mode withconfirmsafety guardPOST /api/v1/service/shutdown/cancel— cancel a pending soft shutdown and resume normal operation
ShutdownModeenum,ShutdownRequest, andShutdownResponsePydantic modelsshutdown(mode)andshutdown_cancel()async service functions
v0.3.1 (2026-07-09)¶
Fixed¶
- Version reporting --
/healthendpoint and__version__now read from package metadata viaimportlib.metadata.version()instead of a hardcoded string. Single source of truth ispyproject.toml. - httpx missing from main dependencies --
POST /api/v1/service/commandreturned HTTP 500 on fresh installs (BUG-8) - Health readiness probe accel-cmd flags --
-Haccepts host only; port needs separate-pflag (BUG-9) - Pylint R0903 false positives on middleware/logging dataclasses
v0.3.0 (2026-07-09)¶
Added¶
- WebSocket event bus with 4 channels (session, config, audit, system) for real-time streaming
- Prometheus metrics endpoint (
GET /metrics) with 5 application metrics - Health readiness probe (
GET /health/ready) for load balancer integration - Request ID middleware (UUID v4 in
X-Request-IDresponse header) - Rate limiting (per-IP, default 120/minute, configurable)
- Structured JSON logging (opt-in via
DAWOS_LOG_FORMAT=json) - Retry with exponential backoff for transient accel-cmd failures
- RBAC with three tiers: viewer, operator, admin
- Audit log with in-memory ring buffer and admin-only query endpoint
- Webhook notifications with optional HMAC-SHA256 signing
- Bulk operations endpoint for batch API calls
- Operational playbooks (health-check, backup-config, safe-restart)
- Comprehensive input validation with regex patterns and
shlex.quote()defense-in-depth - Metrics middleware (pure ASGI, excludes health/metrics paths)
- Named constants extracted to
dawos_agent/constants.py
Changed¶
- Systemd unit hardened:
Restart=always,WatchdogSec=30,StartLimitBurst=5/300s - Installer inline systemd unit synchronized with main unit file
Fixed¶
- Installer now sets ownership of
/etc/accel-ppp.confand/etc/accel-ppp.d/todawosuser - Installer
ReadWritePathssynced with main unit (added resolved.conf.d, dnsmasq.d, dnsmasq.conf)
Documentation¶
- Monitoring Integration guide (Prometheus, Grafana, alerting, WebSocket, audit)
- Production Hardening guide (resources, log rotation, systemd, scaling, backup)
- Architecture Decision Records (14 ADRs)
- Comprehensive security documentation
v0.2.0 (2026-07-08)¶
Changed¶
- All 14 DELETE endpoints standardized to HTTP 204 No Content (previously 12 of 14 returned 200 with JSON body)
Added¶
- Live integration test report -- 106 endpoints tested against real BNG node
- Config content validation (
field_validator+min_length=10) to reject empty config writes - GitHub Actions CI, Release, and Docs workflows
- Pre-commit hooks (Black, Ruff, Pylint)
- MkDocs Material documentation site
Fixed¶
- DNS write permissions --
set_dns()now usessudo teefor root-owned/etc/resolv.conf - DNS systemd sandbox -- added
/etc/resolv.conftoReadWritePaths - Empty config protection --
PUT /api/v1/configwith empty content now returns HTTP 422 - 32 Ruff lint violations fixed (SIM103, SIM105, SIM117, E501, F841)
- Inline comments removed from accel-ppp config template (caused
pppd_compatpath errors) - Safety-net
_ensure_accel_servicecall added in installer
v0.1.0 (2026-07-06)¶
Initial release.
Added¶
- PPP router management agent with 138 API endpoints across 29 router modules
- 28 service modules covering sessions, config, network, firewall, NAT, PPPoE, traffic, routing, conntrack, IP pools, DHCP, DNS, NTP, LLDP, VRRP, monitoring, diagnostics, flow accounting, event handling, zone firewall, scheduler, connection limits, MAC filtering, PADO delay, and logs
- X-API-Key authentication with 401 responses
- Pydantic v2 request/response models (140+ schemas)
- Guarded config apply with auto-revert (checkpoint system)
- SSE streaming for traffic monitoring and log tailing
- Interactive installer with TUI wizard (
install.shv2.0) - Non-interactive install mode (
--yesflag) and uninstaller (--uninstall) - Systemd service with security hardening
- Sudoers configuration with least-privilege rules (6 commands only)