rcourtman
e248f2b895
fix: Update TestPublicURLDetectionUsesForwardedHeaders for proxy hardening
...
The test was failing after commit d6cbfc23 added security hardening
that requires authentication and trusted proxy configuration for
X-Forwarded-* headers to be read during public URL detection.
- Add API token authentication to the test request
- Configure 127.0.0.1 as trusted proxy for the test
- Add export_test.go with ResetTrustedProxyConfigForTests() to allow
external tests to reset the trusted proxy configuration
2025-12-02 03:16:52 +00:00
rcourtman
24ae84671f
test: Add handleHealth method tests
...
Add 2 tests for health endpoint:
- POST/PUT/DELETE/PATCH return 405 Method Not Allowed
- HEAD is allowed (same as GET)
Coverage: 50% → 83.3%
2025-12-02 02:09:04 +00:00
rcourtman
b2a4296557
test: Add edge case for handleServerInfo method not allowed
...
Tests that POST requests to /api/server/info return 405.
2025-12-02 00:01:17 +00:00
rcourtman
09f7e289c1
Related to #712 : auto-restore host agent binaries for download
2025-11-20 15:45:21 +00:00
rcourtman
6eb1a10d9b
Refactor: Code cleanup and localStorage consolidation
...
This commit includes comprehensive codebase cleanup and refactoring:
## Code Cleanup
- Remove dead TypeScript code (types/monitoring.ts - 194 lines duplicate)
- Remove unused Go functions (GetClusterNodes, MigratePassword, GetClusterHealthInfo)
- Clean up commented-out code blocks across multiple files
- Remove unused TypeScript exports (helpTextClass, private tag color helpers)
- Delete obsolete test files and components
## localStorage Consolidation
- Centralize all storage keys into STORAGE_KEYS constant
- Update 5 files to use centralized keys:
* utils/apiClient.ts (AUTH, LEGACY_TOKEN)
* components/Dashboard/Dashboard.tsx (GUEST_METADATA)
* components/Docker/DockerHosts.tsx (DOCKER_METADATA)
* App.tsx (PLATFORMS_SEEN)
* stores/updates.ts (UPDATES)
- Benefits: Single source of truth, prevents typos, better maintainability
## Previous Work Committed
- Docker monitoring improvements and disk metrics
- Security enhancements and setup fixes
- API refactoring and cleanup
- Documentation updates
- Build system improvements
## Testing
- All frontend tests pass (29 tests)
- All Go tests pass (15 packages)
- Production build successful
- Zero breaking changes
Total: 186 files changed, 5825 insertions(+), 11602 deletions(-)
2025-11-04 21:50:46 +00:00
rcourtman
e07336dd9f
refactor: remove legacy DISABLE_AUTH flag and enhance authentication UX
...
Major authentication system improvements:
- Remove deprecated DISABLE_AUTH environment variable support
- Update all documentation to remove DISABLE_AUTH references
- Add auth recovery instructions to docs (create .auth_recovery file)
- Improve first-run setup and Quick Security wizard flows
- Enhance login page with better error messaging and validation
- Refactor Docker hosts view with new unified table and tree components
- Add useDebouncedValue hook for better search performance
- Improve Settings page with better security configuration UX
- Update mock mode and development scripts for consistency
- Add ScrollableTable persistence and improved responsive design
Backend changes:
- Remove DISABLE_AUTH flag detection and handling
- Improve auth configuration validation and error messages
- Enhance security status endpoint responses
- Update router integration tests
Frontend changes:
- New Docker components: DockerUnifiedTable, DockerTree, DockerSummaryStats
- Better connection status indicator positioning
- Improved authentication state management
- Enhanced CSRF and session handling
- Better loading states and error recovery
This completes the migration away from the insecure DISABLE_AUTH pattern
toward proper authentication with recovery mechanisms.
2025-10-27 19:46:51 +00:00
rcourtman
a279e6720e
Add auth enforcement integration tests
2025-10-25 15:02:48 +00:00
rcourtman
5c54685f04
Add API token scopes and standalone host agent
...
Introduces granular permission scopes for API tokens (docker:report, docker:manage, host-agent:report, monitoring:read/write, settings:read/write) allowing tokens to be restricted to minimum required access. Legacy tokens default to full access until scopes are explicitly configured.
Adds standalone host agent for monitoring Linux, macOS, and Windows servers outside Proxmox/Docker estates. New Servers workspace in UI displays uptime, OS metadata, and capacity metrics from enrolled agents.
Includes comprehensive token management UI overhaul with scope presets, inline editing, and visual scope indicators.
2025-10-23 11:40:31 +00:00
rcourtman
bc479643e4
release: prepare v4.25.0
2025-10-22 10:46:18 +00:00
rcourtman
524f42cc28
security: complete Phase 1 sensor proxy hardening
...
Implements comprehensive security hardening for pulse-sensor-proxy:
- Privilege drop from root to unprivileged user (UID 995)
- Hash-chained tamper-evident audit logging with remote forwarding
- Per-UID rate limiting (0.2 QPS, burst 2) with concurrency caps
- Enhanced command validation with 10+ attack pattern tests
- Fuzz testing (7M+ executions, 0 crashes)
- SSH hardening, AppArmor/seccomp profiles, operational runbooks
All 27 Phase 1 tasks complete. Ready for production deployment.
2025-10-20 15:13:37 +00:00
rcourtman
e367cd384e
fix: normalize version strings with build metadata in tests
2025-10-16 09:07:40 +00:00
rcourtman
958d6218c2
test: cover docker command lifecycle and server info
2025-10-15 19:47:51 +00:00
rcourtman
91fecacfef
feat: add docker agent command handling
2025-10-15 19:27:19 +00:00
rcourtman
5c79d2516d
feat: streamline docker agent onboarding
2025-10-14 09:45:32 +00:00
rcourtman
6475ba8374
fix: Update test version fallback and fix lint warnings #64
2025-10-13 15:50:23 +00:00
rcourtman
f46ff1792b
Fix settings security tab navigation
2025-10-11 23:29:47 +00:00