Commit Graph

349 Commits

Author SHA1 Message Date
Pulse Monitor b316510a2b fix: resolve WebSocket metric updates and improve polling efficiency
- Fix alternating zero I/O metrics by implementing rate caching for stale data from Proxmox
- Hardcode polling interval to 10 seconds (matching Proxmox cluster/resources update cycle)
- Remove polling interval settings from UI (no longer user-configurable)
- Implement efficient VM/container polling using single cluster/resources API call
- Remove 'Remove Password' feature (auth is now mandatory)
- Fix CSRF validation for Basic Auth (exempt from CSRF checks)
- Fix Generate API Token modal and authentication
- Remove redundant 'Active' status from Authentication section
- Remove Connection Timeout setting from frontend (backend-only)
- Clean up frontend console logging (reduce verbosity)
- Remove PBS polling interval setting (fixed at 10s)
- Add frontend rebuild detection to backend-watch script
- Improve first-run setup flow and error handling
2025-08-16 12:12:10 +00:00
Pulse Monitor f524166f9d refactor: remove legacy system.json API token management
- Remove old /api/system/api-token endpoints
- Remove APIToken field from SystemSettings struct
- Remove token handling from system_settings.go
- Clean up config.Load() to not read token from system.json
- Remove unused frontend API token functions
- Remove unused APITokenManager and CurrentAPIToken components

API tokens are now managed exclusively via .env file with the new
/api/security/regenerate-token endpoint. This eliminates confusion
between the two systems and ensures consistency.
2025-08-15 10:04:39 +00:00
Pulse Monitor 4323339c5e feat: add Generate New API Token functionality
- Add backend endpoint to regenerate API tokens without resetting auth
- Updates .env file with new token while preserving other settings
- Frontend component with clear UX for token generation
- Shows new token once with copy functionality
- Indicates restart required to activate new token
- Works across all deployment types (Docker, LXC, native)

Much better UX than telling users to 'reconfigure security' just for a new token
2025-08-15 09:58:36 +00:00
Pulse Monitor 4d3d5592a5 fix: add informative content to API Token section when auth is enabled
- Show API Token Active status
- Add security notice about one-time visibility
- Include usage example with curl
- Replaces empty section that was confusing users
2025-08-15 09:51:40 +00:00
Pulse Monitor b212498c71 fix: remove misleading API token display after setup
- Remove CurrentAPIToken component entirely
- API tokens now only shown once during initial setup
- Add clear warning that token won't be shown again
- Remove sessionStorage caching of tokens
- Follows security best practices (like GitHub/AWS)

This prevents showing cached/wrong tokens from sessionStorage that don't match the actual configured token
2025-08-15 09:46:10 +00:00
Pulse Monitor b947eb8a98 fix: improve security setup and pending restart detection
- Add pending restart detection when .env exists but not loaded
- Update frontend to show pending state instead of re-showing setup
- Fix QuickSecuritySetup to refresh security status after configuration
- Remove auto-restart attempts from security setup
- Show deployment-appropriate restart instructions
- Update documentation to reflect new update mechanism

Related to security setup issues after removing sudo/auto-restart capabilities
2025-08-15 09:35:40 +00:00
Pulse Monitor c6690d5392 docs: comprehensive documentation update for v4.3.8
- Add critical docker-compose bcrypt escaping documentation
- Create comprehensive TROUBLESHOOTING.md guide
- Create dedicated DOCKER.md deployment guide
- Update CONFIGURATION.md with service name variations
- Document that .env file is not created when using env vars
- Add warnings about dollar sign escaping in docker-compose.yml

These docs address the main confusion points from recent issues,
especially the docker-compose bcrypt hash problem affecting many users.
2025-08-14 22:23:57 +00:00
Pulse Monitor eb93cba6fa chore: bump version to v4.3.8
Emergency release to fix critical issues in v4.3.7:
- Install script now correctly installs binary to /opt/pulse/bin/pulse
- Password changes no longer require sudo (addresses #317)

These fixes restore basic functionality for new installations
and Docker deployments.
2025-08-14 22:00:12 +00:00
Pulse Monitor de3132dfd9 chore: bump version to v4.3.7 2025-08-14 21:08:28 +00:00
Pulse Monitor fa5bd4da0e fix: allow quick-setup endpoint to check if already configured
- ProxmoxVE script can now check if auth is already set without credentials
- Quick-setup endpoint is now public but handler checks if setup should be skipped
- Prevents duplicate auth configuration attempts
- Critical for automated setup scripts
2025-08-14 20:59:25 +00:00
Pulse Monitor bd2ae433f3 fix: remove legacy security setup handler
- Remove old buggy Quick Security Setup handler
- New handler in security_setup_fix.go handles all cases properly
- Tested and working with Docker, systemd, and manual installations
2025-08-14 20:52:53 +00:00
Pulse Monitor 809854538f chore: add debug logging for notification troubleshooting 2025-08-14 20:46:52 +00:00
Pulse Monitor 0563b2eb0e fix: address authentication and setup issues for v4.3.6
- Add service name detection (pulse vs pulse-backend) for ProxmoxVE compatibility
- Remove sudo attempts for non-root users (addresses #6833)
- Add bcrypt hash validation to ensure 60-character length
- Fix Docker .env generation with proper quotes to prevent shell expansion
- Skip security setup if API_TOKEN already configured
- Better environment detection (Docker vs Systemd vs Manual)
- Clear error messages for truncated hashes (addresses #314, #316)
2025-08-14 20:46:41 +00:00
Pulse Monitor 6623bec738 revert: remove unnecessary v4.3.7 release 2025-08-14 19:40:16 +00:00
Pulse Monitor 47f5bf531b chore: bump version to v4.3.7 2025-08-14 19:37:11 +00:00
Pulse Monitor 4f47d425d5 fix: add debug logging for Telegram webhook issues
- Enhanced logging to diagnose chat_id extraction problems
- Log payload being sent to Telegram for debugging
- Better error messages when chat_id is missing or invalid
2025-08-14 19:28:52 +00:00
Pulse Monitor d6a2a05d95 chore: bump version to v4.3.6 2025-08-14 19:12:35 +00:00
Pulse Monitor d2bf420980 fix: improve bcrypt hash validation and error reporting
- Add clear error message for truncated bcrypt hashes (addresses #316)
- Detect hashes between 55-59 chars and warn they're invalid
- Only accept exactly 60 character bcrypt hashes as valid
- Treat truncated hashes as plaintext to force users to fix them
2025-08-14 19:12:14 +00:00
Pulse Monitor d8536c1c75 chore: bump version to v4.3.5 2025-08-14 16:35:06 +00:00
Pulse Monitor 54506811a2 fix: address critical issues from v4.3.x releases
- Docker: Fix password change failing due to missing sudo (addresses #314)
  - Detect Docker environment and write directly to .env file
  - Preserve existing .env settings during password update
  - No longer requires sudo in Docker containers

- Alerts: Add debug logging for acknowledgement issues (addresses #310)
  - Enhanced logging to help diagnose 404 errors
  - Better error reporting for alert operations

- Installer: Fix directory creation order (addresses #311)
  - Create directories before downloading files
  - Prevents installation failure on fresh systems
2025-08-14 16:29:42 +00:00
Pulse Monitor e6ba9981a2 fix: improve cluster handling with offline nodes and fix node card border styling
- Cluster now handles offline nodes gracefully without marking endpoints unhealthy
- Fixed error 595 (node unreachable) not being treated as node-specific failure
- Added parallel health checks with shorter timeouts for better performance
- Fixed inconsistent border width on offline node cards (removed conflicting border-l-4)
- Switched to ring utility for consistent outline on offline/alert nodes
- Improved logout functionality with proper CSRF token handling

addresses #312, #315
2025-08-14 15:46:37 +00:00
Pulse Monitor 91ed56d825 fix: add critical node offline alerts
- alerts now trigger when nodes go offline or lose connectivity
- alerts automatically resolve when nodes come back online
- offline status is checked before resource thresholds
- logs critical events when nodes lose connectivity

This was a major oversight - nodes going offline should always trigger alerts
2025-08-14 14:47:35 +00:00
Pulse Monitor 57df26668a feat: add logout button to header when auth is enabled
- adds logout button next to connection status indicator
- implements /api/logout endpoint to clear sessions
- button only shows when authentication is configured
- clears session cookie and invalidates server-side session

implements #315
2025-08-14 14:39:26 +00:00
Pulse Monitor 541e8f3c64 fix: update cluster node online indicators based on actual status
- tracks online/offline status for individual cluster nodes
- updates ClusterEndpoint.Online field during node polling
- fixes issue where all cluster nodes showed green indicator regardless of status

fixes #312
2025-08-14 14:24:19 +00:00
Pulse Monitor 8b34532c10 docs: add clear explanation of .env vs .enc file split
- explains purpose of each file type
- clarifies that .env is only for auth, not a regression
- documents the technical reasoning behind the architecture
- addresses confusion raised in #314
2025-08-14 14:11:06 +00:00
Pulse Monitor c8c351f9e7 fix: ensure install directory exists before copying binary
addresses #311 - installer was trying to copy pulse binary before creating /opt/pulse directory
2025-08-14 14:09:43 +00:00
Pulse Monitor 055ef1e1ad docs: fix security documentation accuracy
- clarified .env file usage for Docker (it's acceptable for Docker volumes)
- emphasized need for quotes around bcrypt hashes to prevent shell expansion
- removed incorrect SHA3-256 'cost factor' reference (only bcrypt has cost factor)
- added notes about proper quoting in Docker examples
2025-08-14 13:42:00 +00:00
Pulse Monitor 167a42d92a chore: update version fallback to 4.3.4 2025-08-14 13:23:58 +00:00
Pulse Monitor 65d0360c24 chore: bump version to v4.3.4 2025-08-14 13:20:45 +00:00
Pulse Monitor 3933f59877 fix: quote environment variables in .env to prevent shell expansion
addresses #314 - bcrypt hashes with $ signs were being interpreted as shell variables
by godotenv, causing authentication to fail after Docker container restarts
2025-08-14 13:04:33 +00:00
Pulse Monitor 26b6cf8fcf docs: clarify Docker auth persistence via .env file
Updated security documentation to explicitly mention that Docker uses
the Quick Security Setup wizard and persists credentials via /data/.env
file in the volume, making it clear how auth works in Docker deployments.
2025-08-14 12:47:26 +00:00
Pulse Monitor 75b2fad471 fix: remove script output from logs to prevent credential leaks
Script outputs from change-password and remove-password operations could
potentially contain sensitive information. Removed output logging while
keeping error logging for debugging.
2025-08-14 12:37:20 +00:00
Pulse Monitor 3388198b6c docs: update Docker configuration to reflect .env file support
Docker now supports .env files in /data for auth credentials created
by the security wizard. This was added to fix the credential persistence
issue in Docker containers.
2025-08-14 12:28:25 +00:00
Pulse Monitor 893c621eb2 chore: bump version to v4.3.3 2025-08-14 12:21:23 +00:00
Pulse Monitor b2573a1ee3 fix: properly handle hashed API tokens in auth checks
The export/import handlers were using direct string comparison for API tokens
instead of proper hash comparison. This caused auth to fail when tokens were
stored as hashes (which is what the security wizard does).

addresses #314
2025-08-14 12:18:36 +00:00
Pulse Monitor 210e8c110a fix: Docker auth persistence by setting PULSE_DOCKER env var
The security wizard was failing to detect Docker environments because PULSE_DOCKER
env var was never set in the Dockerfile. This caused credentials to not persist
correctly after container restarts.

addresses #314
2025-08-14 12:07:59 +00:00
Pulse Monitor 0f91ee5f77 chore: bump version to v4.3.2 2025-08-14 11:41:00 +00:00
Pulse Monitor 300f805665 fix: critical auth persistence bug in Docker Quick Security Setup
- Docker containers were not saving credentials to persistent storage
- Non-Docker setups were saving plain text instead of hashed credentials
- After container restart, saved credentials would not work

This fixes issue #314 where users couldn't login after setting up security
in Docker containers. The Quick Security Setup now:
1. Properly hashes passwords and tokens before saving
2. Saves to /etc/pulse/.env for persistence in Docker volumes
3. Correctly loads credentials after container restart
2025-08-14 11:37:52 +00:00
Pulse Monitor 07b33ad215 chore: bump version to v4.3.1 2025-08-14 10:39:10 +00:00
Pulse Monitor d756da4620 feat: improve export/import functionality and documentation
- Add clear documentation that auth settings are intentionally excluded from exports
- Update API docs to explicitly state what is/isn't included in exports
- Enhance migration guide with security notes about auth exclusion
- Add UI warning in export dialog about auth settings not transferring
- Each Pulse instance should configure its own authentication for security

Related to user feedback about auth settings not transferring between instances
2025-08-14 10:30:21 +00:00
Pulse Monitor 597017ebce fix: improve export dialog for users without authentication
- No longer shows 'Use your login password' option when no auth is configured
- Defaults to passphrase-only mode for auth-less instances
- Shows 'Encryption Passphrase' instead of confusing login password references
- Always enforces 12-character minimum for auth-less users
- Clearer messaging throughout for different auth states
2025-08-14 10:17:10 +00:00
Pulse Monitor 97acef85c0 feat: auto-allow export/import on private networks without auth
- Homelab users on private networks (192.168.x.x, 10.x.x.x, 172.16.x.x) can now export/import without any configuration
- No need to set ALLOW_UNPROTECTED_EXPORT=true for typical homelab setups
- Public network access still requires authentication for security
- Simplifies backup/restore for users who don't need authentication
2025-08-14 10:07:29 +00:00
Pulse Monitor b755eaf3fe docs: update export/import documentation
- Clarify that session auth (password login) is sufficient for export/import
- Document that guest metadata and custom console URLs are included
- Update FAQ with clearer backup instructions
- Add UI-first approach to README backup section
2025-08-14 10:04:15 +00:00
Pulse Monitor 7659306ed7 revert: restore gradient animated login page
- Bring back the blue-cyan gradient background
- Restore animated Pulse logo with hover effects
- Keep the semi-transparent backdrop-blur card design
- Maintain the improved form field styling with icons
2025-08-14 09:56:44 +00:00
Pulse Monitor cdc77860ee fix: reload guest metadata after import
- Guest metadata handler now reloads from disk after import
- Custom console URLs are immediately available after import
- No longer requires service restart to see imported guest URLs
2025-08-14 09:51:40 +00:00
Pulse Monitor f62016099b fix: use correct data path for guest metadata export/import
- Export/import now uses PULSE_DATA_DIR env var (defaults to /etc/pulse)
- Guest console URLs and metadata are now properly included in backups
- Fixed path mismatch between runtime (/etc/pulse) and export (/var/lib/pulse)
2025-08-14 09:46:21 +00:00
Pulse Monitor 6f792fb40b fix: add CSRF token to export/import requests
- Export/import now includes X-CSRF-Token header from cookie
- Fixes 403 Forbidden error when exporting with session auth
- Both export and import endpoints now properly validate CSRF tokens
2025-08-14 09:34:54 +00:00
Pulse Monitor 8ed9054a63 fix: simplify export/import authentication flow
- Allow export/import with session auth when logged in with password
- No longer require API token when user is already authenticated
- Backend now accepts either session cookies OR API token
- Frontend only prompts for API token if no password auth exists
- Improved UX by eliminating redundant authentication requests
2025-08-14 09:32:24 +00:00
Pulse Monitor 53ccdac45f improve: enhance backup/restore UI with clearer password guidance
- Add visual cards for export/import actions with descriptive icons
- Allow users to use their login password by default for backups
- Add option for custom passphrase when needed
- Improve clarity around password requirements
- Add security notice with clear guidance
- Simplify the backup process by reducing password friction
2025-08-14 09:25:50 +00:00
Pulse Monitor 60d6be27a2 fix: correct documentation and add FRONTEND_PORT env var support
- Add support for FRONTEND_PORT environment variable (preferred over legacy PORT)
- Fix incorrect PULSE_PASSWORD references (should be PULSE_AUTH_PASS)
- Remove documented but unimplemented PULSE_DISABLE_SECURITY_WARNINGS
- Clarify Docker vs LXC/systemd configuration differences
- Update UI to accurately describe env variable override behavior
- Fix default values in docs (POLLING_INTERVAL=3, AUTO_UPDATE_ENABLED=false)
- Clarify CORS settings (empty = same-origin only, * = allow all)
- Improve documentation structure to clearly separate deployment types
2025-08-14 09:09:22 +00:00