Commit Graph

44 Commits

Author SHA1 Message Date
Fimeg
e72e9fc16f feat: add host restart detection and fix agent version display
Potential fixes for issues #4 and #6.

Agent version display:
- Set CurrentVersion during registration instead of waiting for first check-in
- Update UI to show "Initial Registration" instead of "Unknown"

Host restart detection:
- Added reboot_required, last_reboot_at, reboot_reason fields to agents table
- Agent now detects pending reboots (Debian/Ubuntu via /var/run/reboot-required, RHEL/Fedora via needs-restarting)
- New reboot command type with 1-minute grace period
- UI shows restart alerts and adds restart button in quick actions
- Restart indicator badge in agent list

The reboot detection runs during system info collection and gets reported back to the server automatically.

Using shutdown command for now until we make the restart mechanism user-adjustable later - need to think on that.
Also need to come up with a Windows derivative outside of reading event log for detecting reboots.
2025-10-31 15:03:59 -04:00
Fimeg
3f9164c7ca fix: complete security vulnerability remediation
Critical Security Fixes:
- Fix JWT secret derivation vulnerability - replace deriveJWTSecret with cryptographically secure GenerateSecureToken
- Secure setup interface - remove JWT secret display and API response exposure
- Fix database migration 012 parameter naming conflict in mark_registration_token_used function
- Restore working Docker Compose environment variable configuration

Security Impact:
- Eliminates system-wide compromise risk from admin credential exposure
- Removes sensitive JWT secret exposure during setup process
- Ensures cryptographically secure JWT token generation
- Fixes agent registration and token creation functionality

Testing:
- Agent registration working properly
- Token consumption tracking functional
- Registration tokens created without 500 errors
- Secure JWT secret generation verified
2025-10-31 10:41:04 -04:00
Fimeg
63cc7f6645 fix: critical security vulnerabilities
- Fix JWT secret derivation vulnerability - replace deriveJWTSecret with cryptographically secure GenerateSecureToken
- Secure setup interface - remove JWT secret display and API response exposure
- Addresses system-wide compromise risk from admin credential exposure
2025-10-31 09:32:34 -04:00
Fimeg
e64131079e add automatic redirect from setup to login after completion
- Add SetupCompletionChecker component that monitors health status
- Automatically redirect to /login when server becomes healthy after setup
- Improves user experience by eliminating manual navigation step
2025-10-31 08:39:16 -04:00
Fimeg
fd4974de21 fix screenshot header text - change Windows Update History to Live Operations 2025-10-31 08:24:37 -04:00
Fimeg
23f8ea539e fix README screenshot layout - swap Live Operations with Linux Update History only 2025-10-31 08:23:20 -04:00
Fimeg
982750e694 fix welcome mode redirect - add missing /api/health endpoint
- swap Live Operations to main screenshots section
- remove WebSocket reference from future features
- better screenshot layout with Live Operations prominent
2025-10-31 08:21:49 -04:00
Fimeg
b9dcdcf71b fix bootstrap authentication - use matching redflag_bootstrap password 2025-10-31 08:10:53 -04:00
Fimeg
6af159f1bb remove test-agent from version control 2025-10-31 07:41:53 -04:00
Fimeg
e5d59eac02 fix deployment workflow - manual bootstrap copy and restart 2025-10-31 07:41:00 -04:00
Fimeg
44bb05ca5d added .env bootstrap and fallback 2025-10-31 06:54:34 -04:00
Fimeg
a3e3ac33a7 docs: improve screenshot layout with collapsible section 2025-10-30 22:23:26 -04:00
Fimeg
a92ac0ed78 v0.1.17: UI fixes, Linux improvements, documentation overhaul
UI/UX:
- Fix heartbeat auto-refresh and rate-limiting page
- Add navigation breadcrumbs to settings pages
- New screenshots added

Linux Agent v0.1.17:
- Fix disk detection for multiple mount points
- Improve installer idempotency
- Prevent duplicate registrations

Documentation:
- README rewrite: 538→229 lines, homelab-focused
- Split docs: API.md, CONFIGURATION.md, DEVELOPMENT.md
- Add NOTICE for Apache 2.0 attribution
2025-10-30 22:17:48 -04:00
Fimeg
3940877fb2 fix: use Docker volume for server config instead of bind mount
- Change server-config from bind mount to named volume
- Fixes permission denied errors when saving configuration
- Config now persists properly across container restarts
2025-10-29 15:37:18 -04:00
Fimeg
0b07ca4c5e fix: improve setup error handling and health endpoint
- Add /api/v1/health endpoint for web app compatibility
- Add detailed error logging to setup handler
- Show actual error messages when config save fails
- Helps debug permission and filesystem issues
2025-10-29 15:31:46 -04:00
Fimeg
8abbacbec4 feat: add web UI service to docker-compose
- Add Dockerfile for React web application
- Add nginx configuration for API proxying
- Add web service to docker-compose.yml
- Web UI now accessible on port 3000
- API requests proxied to backend server on port 8080
2025-10-29 15:15:45 -04:00
Fimeg
8252b9edd5 fix: add Windows binaries to gitignore
Prevent future commits of redflag-agent.exe
2025-10-29 15:15:38 -04:00
Fimeg
c437ecd730 fix: update gitignore to exclude aggregator-agent binary
Add aggregator-agent/aggregator-agent to gitignore to prevent
future commits of compiled binaries.
2025-10-29 14:06:33 -04:00
Fimeg
88c58c1b4b fix: remove compiled binaries from repository
Binaries should be built locally, not committed to git.
  This fixes clone permission issues.
2025-10-29 14:03:47 -04:00
Fimeg
1f520fd9e6 testing: web-based server setup with automatic restart
- Add React setup form matching our design system
- Implement automatic server restart after configuration
- Add WelcomeChecker component for proper routing
- Update API to handle setup endpoints and restart logic
- Improve setup workflow with proper loading states and redirects

Testing complete setup workflow from welcome mode to login.
2025-10-29 13:37:02 -04:00
Fimeg
73fb8d49b0 Implement web-based welcome mode configuration 2025-10-29 13:16:17 -04:00
Fimeg
b1ea9e72ad Add welcome mode for server configuration 2025-10-29 13:08:52 -04:00
Fimeg
1acddb58a5 Auto-configure server on first Docker run 2025-10-29 13:01:28 -04:00
Fimeg
237e04531f Fix duplicate volumes in docker-compose 2025-10-29 12:54:26 -04:00
Fimeg
5251825ac1 Add agent distribution system 2025-10-29 12:50:00 -04:00
Fimeg
c027a1da6c Fix Go version and agent workflow 2025-10-29 12:43:18 -04:00
Fimeg
740d75f3cf Docker deployment for most users 2025-10-29 12:37:00 -04:00
Fimeg
c48ea033fc Fix windowsupdate package missing in fresh clones 2025-10-29 12:15:30 -04:00
Fimeg
0d591e2e21 Fix missing utils package for fresh clones
- Remove aggregator-server/internal/utils/ from gitignore
- Add utils/version.go with version comparison functions
- Resolves 'does not contain package' error when cloning from GitHub
2025-10-29 12:08:30 -04:00
Fimeg
b34a8f461b Add go mod tidy to build process for fresh clones
- Update Makefile to include go mod tidy in all build targets
- Add build-all target specifically for fresh clone deployment
- Update README to include go mod tidy in manual build instructions
- Resolves 'updates to go.mod needed' error after module path changes
2025-10-29 12:00:11 -04:00
Fimeg
e40cb14945 Fix module paths for GitHub repository structure
- Update go.mod files to use github.com/Fimeg/RedFlag module path
- Fix all import statements across server and agent code
- Resolves build errors when cloning from GitHub
- Utils package (version comparison) is actually needed and working
2025-10-29 11:53:20 -04:00
Fimeg
56ed1069e0 Add Go prerequisite to documentation 2025-10-29 11:34:59 -04:00
Fimeg
3bf69a6e2c Remove marketing buzzwords and add attribution 2025-10-29 11:18:14 -04:00
Fimeg
27760a1574 Add Apache 2.0 attribution for windowsupdate package
- Add THIRD_PARTY_LICENSES.md with proper attribution to Zheng Dayu
- Update README.md with third-party license section
- Document Apache 2.0 license compatibility
- Remove marketing buzzwords from README
2025-10-29 10:54:25 -04:00
Fimeg
03fee29760 v0.1.16: Security overhaul and systematic deployment preparation
Breaking changes for clean alpha releases:
- JWT authentication with user-provided secrets (no more development defaults)
- Registration token system for secure agent enrollment
- Rate limiting with user-adjustable settings
- Enhanced agent configuration with proxy support
- Interactive server setup wizard (--setup flag)
- Heartbeat architecture separation for better UX
- Package status synchronization fixes
- Accurate timestamp tracking for RMM features

Setup process for new installations:
1. docker-compose up -d postgres
2. ./redflag-server --setup
3. ./redflag-server --migrate
4. ./redflag-server
5. Generate tokens via admin UI
6. Deploy agents with registration tokens
2025-10-29 10:38:18 -04:00
Fimeg
b3e1b9e52f Bump agent version to 0.1.8 2025-10-25 12:40:16 -04:00
Fimeg
d1c5cb9597 feat: Updates page UI improvements and Windows agent enhancements
- Redesigned statistics cards with combined layout
- Added quick filters for Installing, Installed, Failed, Dependencies
- Implemented column sorting for all table headers
- Added package name truncation to prevent layout stretching
- Fixed TypeScript types for new update statuses
- Updated screenshots and README
2025-10-17 22:40:40 -04:00
Fimeg
4ef5216c89 Windows agent improvements and dependency workflow fixes
- Added system info reporting to agent main loop
- Updated README with current project status and screenshots
- Fixed a few workflow quirks
2025-10-17 16:26:21 -04:00
Fimeg
2ade509b63 Update README with current features and screenshots
- Cross-platform support (Windows/Linux) with Windows Updates and Winget
- Added dependency confirmation workflow and refresh token authentication
- New screenshots: History, Live Operations, Windows Agent Details
- Local CLI features with terminal output and cache system
- Updated known limitations - Proxmox integration is broken
- Organized docs to docs/ folder and updated .gitignore
- Probably introduced a dozen bugs with Windows agents - stay tuned
2025-10-17 15:28:22 -04:00
Fimeg
61294ba514 Add screenshots and update gitignore for alpha release
- Fixed gitignore to allow Screenshots/*.png files
- Added all screenshots for README documentation
- Fixed gitignore to be less restrictive with image files
- Includes dashboard, agent, updates, and docker screenshots
2025-10-16 09:16:05 -04:00
Fimeg
a7fad61de2 Update installer system for update approval functionality
Major milestone: Update installation system now works
- Implemented unified installer interface with factory pattern
- Created APT, DNF, and Docker installers
- Integrated installer into agent command processing loop
- Update approval button now actually installs packages

Documentation updates:
- Updated claude.md with Session 7 implementation log
- Created clean, professional README.md for GitHub
- Added screenshots section with 4 dashboard views
- Preserved detailed development history in backup files

Repository ready for GitHub alpha release with working installer functionality.
2025-10-16 09:06:12 -04:00
Fimeg
552f14f99a feat: Implement agent-grouped Docker interface with port information
Add comprehensive Docker container management with agent-centric organization:

Backend enhancements:
- Add DockerPort struct for container port mappings
- Extend DockerContainer model with agent hostname and ports
- Enhance Docker handlers to fetch agent information
- Extract port data from container metadata
- Support both container and host port display

Frontend improvements:
- Group containers by agent with clear visual separation
- Display agent hostnames instead of UUIDs
- Add dedicated Ports column with formatted mappings
- Show container counts and update status per agent
- Improve version delta display with visual indicators

This provides a much more intuitive interface for managing
Docker containers across multiple agents while maintaining
compatibility with existing approval workflows.
2025-10-16 08:07:54 -04:00
Fimeg
b14225d4c9 Add minimal README and fix gitignore 2025-10-13 16:49:12 -04:00
Fimeg
55b7d03010 Session 4 complete - RedFlag update management platform
🚩 Private development - version retention only

 Complete web dashboard (React + TypeScript + TailwindCSS)
 Production-ready server backend (Go + Gin + PostgreSQL)
 Linux agent with APT + Docker scanning + local CLI tools
 JWT authentication and REST API
 Update discovery and approval workflow

🚧 Status: Alpha software - active development
📦 Purpose: Version retention during development
⚠️  Not for public use or deployment
2025-10-13 16:46:31 -04:00