Commit graph

292 commits

Author SHA1 Message Date
Pulse Monitor
f2f47b10fa feat: add ability to remove password authentication
New Feature:
- Add "Remove Password" button in Settings → Security tab
- Allows users to disable password authentication completely
- Returns Pulse to open access mode (no auth required)
- Requires current password confirmation for security

Implementation:
- New API endpoint: POST /api/security/remove-password
- New modal component: RemovePasswordModal.tsx
- Removes password from systemd override files
- Clears auth configuration from running instance
- Invalidates all sessions after removal

This addresses the issue where users couldn't disable authentication
once it was enabled. Now they can easily toggle between secured and
open modes as needed for their use case.
2025-08-13 20:39:26 +00:00
Pulse Monitor
0bd956a9db docs: update documentation for security changes and API improvements
Documentation Updates:
- Fix CORS documentation to reflect new secure defaults (no CORS by default)
- Add API token management endpoints to API.md
- Document CORS configuration in SECURITY.md
- Update environment variable documentation with defaults
- Add authentication variables (PULSE_PASSWORD, API_TOKEN, etc.)
- Add troubleshooting for CORS and authentication issues
- Remove outdated references to ALLOWED_ORIGINS=*
- Clarify that CORS defaults to same-origin only

All documentation now accurately reflects:
- Security improvements from recent audit
- New API token management features
- Correct CORS behavior and configuration
- Complete environment variable reference
2025-08-13 19:56:21 +00:00
Pulse Monitor
c563396f18 fix: address critical security vulnerabilities from audit
Security Fixes:
- Fix path traversal vulnerability in tar extraction (HIGH)
  - Validate and sanitize paths from tar archives
  - Prevent directory traversal attacks via ../
  - Ensure extracted files stay within destination directory

- Remove weak SHA-256 password hashing code (MEDIUM)
  - Removed unused SHA-256 hash function from crypto package
  - All password hashing now uses bcrypt (cost 12) exclusively
  - Added warning comment about proper password hashing

- Fix error information leakage (MEDIUM)
  - Add sanitizeErrorMessage helper function
  - Log detailed errors internally while returning generic messages
  - Prevent exposure of system internals in error responses

- Change default CORS from * to restrictive (MEDIUM)
  - Default to no CORS headers (same-origin only)
  - Allow localhost origins only in development mode
  - Require explicit configuration for production CORS

These fixes address all critical and medium severity issues found
in the security audit while maintaining backward compatibility.
2025-08-13 19:46:39 +00:00
Pulse Monitor
35b51c3a77 feat: enhance security and improve API token UX
Security Improvements:
- Add comprehensive CSRF protection for state-changing operations
- Implement rate limiting (500 req/min general, 10/min for auth)
- Add account lockout after 5 failed login attempts
- Secure session management with HttpOnly cookies
- Add security headers (CSP, X-Frame-Options, etc.)
- Implement audit logging for security events
- Session invalidation on password change

API Token UX Improvements:
- Always show API token to authenticated users (no longer hide after generation)
- Add ability to view existing token anytime from Settings
- Fix clipboard copy with HTTP fallback

Authentication Flow Fixes:
- Fix WebSocket initialization to occur after auth check
- Fix CSRF validation to handle server restarts gracefully
- Adjust rate limiting to exclude high-frequency endpoints
- Fix authentication check to use session cookies properly

Documentation Updates:
- Document all security features comprehensively
- Update API documentation with CSRF usage examples
- Add security feature details to README
2025-08-13 19:05:23 +00:00
Pulse Monitor
66403e88fb refactor: consolidate authentication system and improve API structure
- Remove registration tokens feature in favor of simpler API token auth
- Add password authentication with change password functionality
- Centralize API client logic with proper auth handling
- Add development scripts for better DX (hot-reload, proxy setup)
- Refactor auth middleware and handlers for cleaner separation
- Update frontend to use new centralized API client
2025-08-13 14:51:46 +00:00
Pulse Monitor
4c59d53c0c fix: use same restart mechanism as updates for security setup
- Exit cleanly with os.Exit(0) instead of trying systemctl restart
- Let systemd's Restart=always bring service back up
- New environment variables loaded automatically on restart
- Same proven approach used by update system
2025-08-12 21:13:45 +00:00
Pulse Monitor
f33241a145 fix: handle permission issues in security setup gracefully
- Try automatic setup first (if sudo available)
- Fall back to generating a simple apply script
- Show single command to run: sudo bash /etc/pulse/apply-security.sh
- Script handles all systemd configuration steps
- Clear UI shows when manual step is needed
2025-08-12 21:11:21 +00:00
Pulse Monitor
59f95dc13f feat: make security setup fully automatic for systemd
- One-click security that actually applies immediately
- Creates systemd override file automatically
- Auto-restarts service after 2 seconds
- No manual command line steps needed
- Shows clear success message about auto-restart
- Still provides manual instructions for Docker users
2025-08-12 21:08:00 +00:00
Pulse Monitor
4a14ceb68e fix: improve security setup instructions with actual commands
- Replace vague 'see documentation' with actual commands
- Show systemd and Docker examples with credentials filled in
- Include the restart command in the instructions
- Make commands copy-paste ready with proper formatting
2025-08-12 21:03:45 +00:00
Pulse Monitor
b1c5c4e6ff fix: simplify and clean up Security tab UI
- Show Quick Setup prominently when no auth configured
- Hide API tokens and registration tokens when not needed
- Consolidate Export/Import into single Backup & Restore section
- Only show advanced features when authentication is enabled
- Remove redundant descriptions and duplicate sections
2025-08-12 21:01:48 +00:00
Pulse Monitor
6ac6f62950 fix: permanently solve frontend embed sync issue
- Add build.sh script that ensures frontend is copied before Go build
- Update backend-watch.sh to sync frontend on every restart
- Remove duplicate frontend files from internal/api/
- Frontend embed directory already in .gitignore
- No more manual copying needed - just run ./build.sh
2025-08-12 20:56:43 +00:00
Pulse Monitor
7323aae12b feat: add smart security context detection (Phase 3)
- Detect public vs private network access
- Show stronger warnings for public access without auth
- Red banner when accessed from internet without authentication
- Support for trusted networks configuration via PULSE_TRUSTED_NETWORKS
- Automatic RFC1918 private IP detection
- Enhanced security status API with network context
- Added debug logging for encryption key loading
2025-08-12 20:23:37 +00:00
Pulse Monitor
da6dc52a91 feat: add Quick Security Setup wizard for one-click security hardening
- Created QuickSecuritySetup component with password/token generation
- Added /api/security/quick-setup endpoint to generate config
- Shows credentials once with copy/download functionality
- Generates systemd environment configuration file
- Only shows when authentication is not already enabled
2025-08-12 20:10:21 +00:00
Pulse Monitor
5e6a8357af cleanup: remove security audit documentation files 2025-08-12 20:01:33 +00:00
Pulse Monitor
56efbbd996 feat: add non-intrusive security warning system
- Security warning banner shows when security score is low
- Displays security score (0-5) based on enabled features
- Fully dismissible (1 day, 1 week, forever)
- Shows details of what's enabled/disabled
- Links directly to Security settings tab
- Enhanced /api/security/status endpoint
- Updated documentation

This is Phase 1 of the security improvement plan:
- Non-breaking (no user impact)
- Educational (shows security posture)
- Dismissible (respects user choice)
- Helpful (one-click to security settings)
2025-08-12 19:55:59 +00:00
Pulse Monitor
21bad84700 feat: standardize on bin/ directory structure for all archives
- ALL archives now use bin/pulse structure (including architecture-specific)
- Matches what Proxmox community script expects
- Install script checks bin/ first, falls back to root for old archives
- Eliminates confusion from having two different structures
- One consistent path forward: archives have bin/ directory
2025-08-12 19:30:59 +00:00
Pulse Monitor
389e5f0b73 fix: clean up build script and maintain compatibility
- Keep universal archive for Proxmox community script (expects bin/ structure)
- Architecture-specific archives have pulse in root (simpler)
- Install script handles both structures transparently
- Removed duplicate checksum generation
- Removed unnecessary frontend-modern directory from universal archive
2025-08-12 19:27:56 +00:00
Pulse Monitor
e51240c782 fix: add TODO comment about simplifying in v5
- Current dual-path logic needed for backwards compatibility
- v4.3.0 universal archive has bin/ structure
- Architecture-specific archives have pulse in root
- TODO: Standardize on single structure in v5
2025-08-12 19:21:52 +00:00
Pulse Monitor
7bc12f15fd fix: remove unnecessary frontend dist copy from build script
- Frontend is embedded in the binary since v4.3.0
- No need to copy dist files to release archives
- Reduces archive size
2025-08-12 19:18:10 +00:00
Pulse Monitor
afadeb835a fix: correct pulse binary path in install script (fixes #308)
- Install script now handles both archive layouts (with/without bin directory)
- Service file points to correct path: /opt/pulse/pulse (not /opt/pulse/bin/pulse)
- Fixes service startup issue in fresh LXC installations
2025-08-12 19:13:46 +00:00
Pulse Monitor
6a28d7dc20 docs: add comprehensive migration guide
- Created MIGRATION.md with clear backup/migration procedures
- Emphasizes export/import as the only supported migration method
- Warns against direct file copying
- Includes security notes about passphrase protection
- Added troubleshooting and pro tips
- Updated README and SECURITY docs to reference migration guide
2025-08-12 19:02:33 +00:00
Pulse Monitor
b968d91dcd feat: include guest metadata in config export/import
- guest URLs are now backed up with config export
- restored on import to preserve custom URLs across migrations
- stored in plain text (not encrypted) as they're just service URLs, not credentials
- import failures for guest metadata are non-fatal (logged as warnings)
2025-08-12 16:54:18 +00:00
Pulse Monitor
4166a56afd fix: prevent URL editor modal from closing on WebSocket updates
- moved modal state to Dashboard component level
- removed local modal state from GuestRow
- modal now persists through API updates and component re-renders
- passed openUrlEditor callback from Dashboard to GuestRow components
2025-08-12 16:41:15 +00:00
Pulse Monitor
b9a768b5e6 feat: add per-guest custom URL functionality
- guests can now have custom URLs that make their names clickable
- added metadata store for persisting guest metadata to JSON files
- added API endpoints for managing guest metadata
- integrated edit button in dashboard to set/edit custom URLs
- guest names become clickable links when custom URL is set
2025-08-12 16:35:14 +00:00
Pulse Monitor
782651e24e feat: make node names in summary cards clickable
- Node names in the summary cards at the top now link to Proxmox web interface
- Matches the behavior of node names in the table rows below
- Uses same hover effect (blue color) for consistency
2025-08-12 16:19:02 +00:00
Pulse Monitor
78381497c7 fix: add missing Telegram option in webhook service dropdown
- Telegram was available in backend but missing from frontend dropdown
- Added 'telegram' to service list and display name mapping
- Fixes issue where users couldn't select Telegram as webhook service
2025-08-12 15:42:05 +00:00
Pulse Monitor
75f4b74b83 feat: implement API token management UI (addresses #302)
- Add interactive API token management in Settings > Security tab
- Users can now generate, view, regenerate, and delete API tokens from the UI
- Tokens are persisted in system.json and survive restarts
- Environment variable API_TOKEN still takes precedence for backward compatibility
- Proper authentication enforcement when tokens are configured
- Secure token generation using crypto/rand (32 bytes, hex encoded)
- Clean UI with copy-to-clipboard functionality for newly generated tokens
2025-08-12 15:32:23 +00:00
Pulse Monitor
ef3789e9e0 feat: add RC badge to header for release candidate versions
The Pulse logo now displays an orange "RC" badge when running a release
candidate version. This helps users identify when they're testing pre-release
versions.

- Backend now detects RC versions and sets channel field accordingly
- Frontend displays RC badge next to Pulse logo when channel is "rc"
- Works for both git-based and VERSION file-based builds
2025-08-12 14:47:21 +00:00
Pulse Monitor
e42c1ab4e8 chore: bump version to v4.3.1-rc.1 2025-08-12 14:29:37 +00:00
Pulse Monitor
8492b0932d fix: dashboard now uses actual configured host URLs for node links
addresses #306 - The dashboard and storage views were hardcoding port 8006 for node links,
but now they properly use the host URLs from the node configuration. This ensures users
are redirected to the correct URL when clicking on node names, respecting custom ports
and protocols configured in the settings.

- Added host field to Node struct in Go models
- Updated monitor.go to populate host field from instance config
- Added host field to TypeScript Node interface
- Modified Dashboard and Storage components to use nodeHostMap for correct URLs
- Falls back to old behavior if host field is not available
2025-08-12 14:28:19 +00:00
Pulse Monitor
b77df2f2f1 feat: add custom webhook payload templates and fix Telegram chat_id handling
- Add custom JSON payload template support for generic webhooks
- Users can now define custom webhook formats with Go template syntax
- Fix Telegram webhook issue where chat_id in URL caused 400 errors
- Automatically strip chat_id from URL and place in JSON body for Telegram
- Add comprehensive webhook documentation with examples
- Update API documentation with webhook endpoints

Addresses #305
2025-08-12 14:03:13 +00:00
Pulse Monitor
6765db9b13 chore: bump version to v4.3.0 2025-08-12 13:09:09 +00:00
Pulse Monitor
cf3fefabda fix: correct webhook icon URLs and add release notes
- Fix Discord webhook templates to use logo.svg instead of non-existent favicon.svg
- Add comprehensive release notes for v4.3.0 about embedded frontend breaking change
- Document migration path and benefits of embedded frontend

The embedded frontend is a significant architectural improvement that eliminates
path-related issues but requires clear communication to users about the change.
2025-08-12 12:59:02 +00:00
Pulse Monitor
d5d359ce45 fix: update systems to work with embedded frontend
- Fix auto-updater to handle single-binary structure
- Fix Docker build to copy frontend before Go compilation
- Add development script for frontend rebuilds
- Remove unnecessary frontend directory copying in updater

The embedded frontend change simplifies deployment but required
updates to various build and update systems.
2025-08-12 12:52:27 +00:00
Pulse Monitor
7a6f5f9ae4 chore: add embedded frontend directory to gitignore 2025-08-12 12:46:13 +00:00
Pulse Monitor
5d50fe06da feat: embed frontend in Go binary for simplified deployment
Addresses #304 - Eliminates redirect loops and path issues by embedding
the frontend directly in the Go binary using go:embed

- Frontend is now embedded at compile time, no separate files needed
- Simplified tarball structure - just the binary and config files
- No more path searching or frontend directory issues
- Works consistently across all installation methods
- Smaller deployment footprint and simpler installation

This change makes Pulse a true single-binary deployment, eliminating
the complexity of managing separate frontend files and the issues that
arose from different installation structures.
2025-08-12 12:45:57 +00:00
Pulse Monitor
8431a49329 fix: improve frontend file discovery to prevent redirect loops
- Add multiple search paths for frontend files
- Check parent directories when binary is in bin/ subdirectory
- Support both tarball extraction and installed structures
- Fixes issue #304 where manual tarball extraction caused redirect loops
- Maintains compatibility with community scripts
2025-08-12 12:33:40 +00:00
Pulse Monitor
bf7518e428 chore: remove temporary Docker Hub README
- Docker Hub description has been updated via docker-pushrm
- No need to keep this file in the repository
2025-08-12 12:24:24 +00:00
Pulse Monitor
b3a4bb5863 docs: refine Docker Hub README for professional tone
- Remove excessive emojis
- Match professional tone of main repository README
- Use technical language appropriately
- Improve structure and clarity
- Focus on technical details over marketing language
2025-08-12 12:19:12 +00:00
Pulse Monitor
36c34fecc7 docs: create updated Docker Hub README
- Modern, comprehensive overview for Docker Hub
- Clear quick start instructions
- Feature highlights with emojis
- Security information
- Multi-arch support details
- Current version info (v4.2.1)
- Proper setup instructions with auto-setup script
- Alert configuration overview
2025-08-12 12:15:26 +00:00
Pulse Monitor
6239106dc2 chore: remove more test artifacts and old screenshots
- Delete old screenshots directory (proper ones are in docs/images)
- Remove .devdata test directory
- Update .gitignore to exclude these directories
- Keep repository focused on production code only
2025-08-12 11:26:28 +00:00
Pulse Monitor
c6716cd0c2 chore: clean up repository and remove test files
- Remove all temporary test files and documentation
- Delete testing-tools directory with old screenshots and scripts
- Remove stray package.json files from root
- Update .gitignore to prevent test files from being committed
- Keep repository clean and focused on production code
2025-08-12 11:25:32 +00:00
Pulse Monitor
a91bd42b74 docs: comprehensive documentation updates
- Add registration tokens documentation to SECURITY.md
- Add email configuration guide to README.md
- Create comprehensive API.md with all endpoints documented
- Include examples for bash, PowerShell, and Python API usage
- Document WebSocket connection for real-time updates
- Add rate limiting information and error response formats
2025-08-12 11:23:26 +00:00
Florian Bussmann
0c167c92ac docs: update API endpoints (#303) 2025-08-12 12:11:45 +01:00
Pulse Monitor
1cdc6a011c chore: bump version to v4.2.1 2025-08-12 10:52:51 +00:00
Pulse Monitor
6316f2c1fe docs: add pre-release verification report for v4.2.1 2025-08-12 10:51:50 +00:00
Pulse Monitor
b68ee634e9 fix: PBS edit form now correctly loads token authentication data
- Keep full token format (user@realm\!token-name) in edit form for PBS nodes
- Properly detect token vs password authentication based on hasToken/hasPassword fields
- Extract username from token format for internal use only
- Addresses issue #296 follow-up where PBS edit forms weren't populated correctly
2025-08-12 10:43:40 +00:00
Pulse Monitor
96559875f8 fix: preserve edit state during UI refresh for threshold overrides (#295)
- Editing state is now tracked at parent component level
- Edit state persists across WebSocket updates and re-renders
- Save/Cancel buttons no longer disappear during 5-second refresh cycle
- Fixes issue where users lost ability to save threshold changes
2025-08-12 10:11:06 +00:00
Pulse Monitor
c62952e070 fix: email test now uses saved password when not provided
- Test email button now works without re-entering password
- Backend uses saved password if test request has empty password
- Fixes authentication error when testing email notifications
2025-08-12 09:47:05 +00:00
Pulse Monitor
5282bfef2f cleanup: remove debug logging from email config components 2025-08-12 09:38:10 +00:00