Commit cd149ef
Add secure health endpoint and restore settings authentication
Create dedicated /api/v1/health endpoint for version checking that
exposes only minimal, non-sensitive information (version and status).
Previously, the Electron client used /api/v1/settings which exposed
sensitive system data (database paths, log paths, debug mode, etc.)
to unauthenticated clients.
Backend changes:
- Add GET /api/v1/health endpoint (public, no auth required)
- Restore @api_authenticated decorator to GET /api/v1/settings
- Keep @allow_when_password_required for password reset workflow
- Export get_version() function from settings module
- Fix test infrastructure: add missing port parameter to DigiScriptTestCase
Frontend changes:
- Update Electron VersionChecker to use /api/v1/health endpoint
- Update ServerSelector UI enhancements (text alignment, time formatting)
Tests:
- Add comprehensive test suite for health endpoint (4 tests)
- Add authentication tests for settings endpoint (2 tests)
- All 315 backend tests passing
- All 83 frontend tests passing
Security impact:
- Before: 10+ sensitive fields exposed publicly via /api/v1/settings
- After: Only 2 non-sensitive fields exposed via /api/v1/health
- Settings endpoint now requires authentication (401 without token)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 80181b0 commit cd149ef
File tree
6 files changed
+442
-28
lines changed- client/src/views/electron
- electron/services
- server
- controllers/api
- digi_server
- test
- controllers/api
6 files changed
+442
-28
lines changed
0 commit comments