Commit Graph

94 Commits

Author SHA1 Message Date
GitHub Actions 14859adf87 Enhance GenerateConfig function to accept ruleset paths and update related tests
- Modified the GenerateConfig function to include an additional parameter for ruleset paths.
- Updated multiple test cases across various files to accommodate the new parameter.
- Enhanced the manager's ApplyConfig method to handle ruleset file creation and error handling.
- Added integration tests for Coraza WAF to validate runtime behavior and ruleset application.
- Updated documentation to include instructions for testing Coraza WAF integration locally.
2025-12-01 21:11:17 +00:00
GitHub Actions 76ab163e69 feat(security): integrate Caddy Manager into SecurityHandler and update related tests 2025-12-01 20:16:08 +00:00
GitHub Actions f5fb460cc6 feat(security): add DeleteRuleSet endpoint and implement related service logic 2025-12-01 19:56:15 +00:00
GitHub Actions b0a4d75a2a Refactor security configuration: Remove external CrowdSec mode support
- Updated SecurityConfig model to only support 'local' or 'disabled' modes for CrowdSec.
- Modified related logic in the manager and services to reject external mode.
- Adjusted tests to validate the new restrictions on CrowdSec modes.
- Updated frontend components to remove references to external mode and provide appropriate user feedback.
- Enhanced documentation to reflect the removal of external CrowdSec mode support.
2025-12-01 19:43:45 +00:00
GitHub Actions 570d904019 feat(security): implement decision and ruleset management with logging and retrieval 2025-12-01 18:23:15 +00:00
GitHub Actions 53765afd35 feat(security): implement self-lockout protection and admin whitelist
- Added SecurityConfig model to manage Cerberus settings including admin whitelist and break-glass token.
- Introduced SecurityService for handling security configurations and token generation.
- Updated Manager to check for admin whitelist before applying configurations to prevent accidental lockouts.
- Enhanced frontend with hooks and API calls for managing security settings and generating break-glass tokens.
- Updated documentation to include self-lockout protection measures and best practices for using Cerberus.
2025-12-01 18:10:58 +00:00
GitHub Actions c83928f628 Refactor Caddy configuration management to include security settings
- Updated `GenerateConfig` function calls in tests to include additional security parameters.
- Enhanced `Manager` struct to hold a `SecurityConfig` instance for managing security-related settings.
- Implemented `computeEffectiveFlags` method to determine the effective state of security features based on both static configuration and runtime database settings.
- Added comprehensive tests for the new security configuration handling, ensuring correct behavior for various scenarios including ACL and CrowdSec settings.
- Adjusted existing tests to accommodate the new structure and ensure compatibility with the updated configuration management.
2025-12-01 16:22:21 +00:00
GitHub Actions 581229e454 feat: ensure ACL is disabled when Cerberus is off in security status response 2025-12-01 16:22:21 +00:00
GitHub Actions 5717941d45 feat: add runtime override for ACL enabled flag in security handler 2025-12-01 16:22:21 +00:00
GitHub Actions b45ac58f10 feat: add ACL_DBOverride test to validate ACL configuration in security handler 2025-12-01 16:22:21 +00:00
GitHub Actions 4d639698bb Enhance logging security by sanitizing sensitive data
- Implemented filename sanitization in backup, import, and certificate handlers to prevent log injection attacks.
- Added tests to ensure filenames are sanitized correctly in backup and import handlers.
- Updated notification and domain handlers to sanitize domain names before logging.
- Introduced middleware functions for sanitizing request paths and headers to redact sensitive information in logs.
- Enhanced recovery middleware to sanitize logged paths and headers during panic situations.
- Updated various services to log sanitized values for sensitive fields.
2025-12-01 16:22:21 +00:00
GitHub Actions f1955711dc feat: enhance error handling for gzip and tar writer closures in ExportConfig 2025-12-01 16:22:21 +00:00
GitHub Actions d27f28e20c feat: propagate request context in notification service and related handlers 2025-12-01 16:22:21 +00:00
GitHub Actions 6ae05d159d feat: enhance logging in backup, import, and proxy host handlers with structured logging 2025-12-01 16:22:21 +00:00
GitHub Actions d789ee85e5 feat: Add CrowdSec configuration management and export functionality
- Implemented CrowdSec configuration page with import/export capabilities.
- Added API endpoints for exporting, importing, listing, reading, and writing CrowdSec configuration files.
- Enhanced security handler to support runtime overrides for CrowdSec mode and API URL.
- Updated frontend components to include CrowdSec settings in the UI.
- Added tests for CrowdSec configuration management and security handler behavior.
- Improved user experience with toast notifications for successful operations and error handling.
2025-12-01 16:22:21 +00:00
GitHub Actions 224a53975d feat(tests): add comprehensive tests for ProxyHosts and Uptime components
- Introduced isolated coverage tests for ProxyHosts with various scenarios including rendering, bulk apply, and link behavior.
- Enhanced existing ProxyHosts coverage tests to include additional assertions and error handling.
- Added tests for Uptime component to verify rendering and monitoring toggling functionality.
- Created utility functions for setting labels and help texts related to proxy host settings.
- Implemented bulk settings application logic with progress tracking and error handling.
- Added toast utility tests to ensure callback functionality and ID incrementing.
- Improved type safety in test files by using appropriate TypeScript types.
2025-12-01 16:22:21 +00:00
GitHub Actions 83afbbf1fc feat: Add CrowdSec management endpoints and feature flags handler
- Implemented CrowdSec process management with start, stop, and status endpoints.
- Added import functionality for CrowdSec configuration files with backup support.
- Introduced a new FeatureFlagsHandler to manage feature flags with database and environment variable fallback.
- Created tests for CrowdSec handler and feature flags handler.
- Updated routes to include new feature flags and CrowdSec management endpoints.
- Enhanced import handler with better error logging and diagnostics.
- Added frontend API calls for CrowdSec management and feature flags.
- Updated SystemSettings page to manage feature flags and CrowdSec controls.
- Refactored logs and other components for improved functionality and UI consistency.
2025-12-01 16:19:05 +00:00
GitHub Actions eb60530cec chore: import handler transient error messages 2025-12-01 16:19:05 +00:00
CI 5cea5755a0 feat: add external notification templates management
- Introduced NotificationTemplate model for reusable external notification templates.
- Implemented CRUD operations for external templates in NotificationService.
- Added routes for managing external templates in the API.
- Created frontend API methods for external templates.
- Enhanced Notifications page to manage external templates with a form and list view.
- Updated layout and login pages to improve UI consistency.
- Added integration tests for proxy host management with improved error handling.
2025-11-29 20:51:46 +00:00
CI fdab765cbd chore: update internal files for consistency and maintainability 2025-11-29 15:52:27 +00:00
CI fcc273262c test(caddy): cover invalid path branches; ci: handle go test non-zero when coverage file exists 2025-11-29 08:55:25 +00:00
CI ce8a51e6c7 fix(workflows): replace invalid semantic-version action with fallback script 2025-11-29 02:49:21 +00:00
Wikid82 a4cff3c194 feat: Add security presets and related tests
- Implemented new security presets for access control lists, including geo-blacklist and known botnet IPs.
- Added tests for security presets functionality, including validation of preset structure and category/type checks.
- Created hooks for Docker and domains with comprehensive tests for fetching, creating, and deleting domains.
- Removed unused HealthStatus component.
- Updated ProxyHosts bulk delete tests to reflect changes in selection logic.
- Introduced integration test script for automated testing of proxy host creation and validation.
2025-11-28 02:54:44 +00:00
Wikid82 72fd121bdb fix: resolve race conditions and update golangci-lint config
- Fix TestCertificateHandler_Delete race condition:
  - Add WAL mode and busy_timeout to SQLite connection
  - Add sleep to allow background sync goroutine to complete
- Fix TestNotificationService_SendExternal_EdgeCases race condition:
  - Use atomic.Value for cross-goroutine string access
- Update .golangci.yml for version 2:
  - Add version field
  - Move linters-settings under linters.settings
  - Remove deprecated typecheck and gosimple linters
  - Update govet shadow check syntax
2025-11-28 00:54:47 +00:00
Wikid82 fc27b5c42e feat: add security presets and block list recommendations for ACLs
- Add security preset system with curated threat intelligence
  - High-Risk Countries preset (RU, CN, KP, IR, etc.) ~800M IPs
  - Expanded Threat List preset ~1.2B IPs
  - Cloud Scanner IPs preset (Shodan, Censys) ~3K IPs
  - Tor Exit Nodes preset ~1.2K IPs (changes daily)
- Add tooltips linking to data sources (SANS ISC, Spamhaus, Tor Project)
- Add 'Get My IP' button to quickly add current IP to allowlist
- Add IP range calculator showing total IPs covered by rules
- Emphasize block lists over allow lists in UI
  - Renamed UI labels to show 'Recommended' for block lists
  - Added info box explaining why block lists are safer
- Add /system/my-ip API endpoint to fetch user's public IP
  - Handles X-Forwarded-For, X-Real-IP, CF-Connecting-IP headers
  - Returns IP and source (direct, proxy, Cloudflare, etc.)
- Add ARIA attributes to ProxyHosts checkboxes for accessibility

Block lists prevent lockouts while maintaining security by blocking
known threats instead of requiring explicit allow lists that can
inadvertently block legitimate users (especially CGNAT/mobile users).

Note: Bulk delete tests need refinement (event simulation) - tracked
separately.
2025-11-28 00:05:11 +00:00
Wikid82 05321e3a59 feat: implement bulk ACL application feature for proxy hosts 2025-11-27 14:55:00 +00:00
Wikid82 429de10f0f feat: implement access list management with CRUD operations and IP testing
- Added API integration for access lists including listing, creating, updating, deleting, and testing IPs against access lists.
- Created AccessListForm component for creating and editing access lists with validation.
- Developed AccessListSelector component for selecting access lists with detailed display of selected ACL.
- Implemented hooks for managing access lists and handling API interactions.
- Added tests for AccessListSelector and useAccessLists hooks to ensure functionality.
- Enhanced AccessLists page with UI for managing access lists, including create, edit, delete, and test IP features.
2025-11-27 08:55:29 +00:00
Wikid82 51664416b6 feat: Enhance ProxyHost configuration with application presets and internal IP support 2025-11-27 03:54:41 +00:00
Wikid82 58edf44f3c feat: update security configuration and documentation for new service modes 2025-11-26 18:47:31 +00:00
Wikid82 c8a452f1a0 feat: implement modular security services with CrowdSec and WAF integration 2025-11-26 18:35:14 +00:00
Wikid82 56903b0e06 chore: clean up unused files and empty code blocks 2025-11-26 01:12:52 +00:00
Wikid82 4f03021c9c refactor: remove security-related hooks and pages
- Deleted `useSecurity.ts` hook which managed authentication users, providers, and policies.
- Removed `Policies.tsx`, `Providers.tsx`, and `Users.tsx` pages that utilized the above hook.
- Cleaned up the `index.tsx` file in the Security section to remove references to the deleted pages.
- Updated mock data by removing unused properties related to forward authentication.
2025-11-26 00:02:15 +00:00
Wikid82 a3c164a394 refactor: update error handling to use unknown type for better type safety 2025-11-25 22:08:54 +00:00
Wikid82 8c36a8dee4 feat: add support for additional emails in user management and update related configurations 2025-11-25 18:30:16 +00:00
Wikid82 07be2155be Refactor Security Management: Split Security page into Users, Providers, and Policies components; remove deprecated Security component; implement CRUD functionality for users, providers, and policies; enhance Uptime page with monitor editing capabilities. 2025-11-25 14:53:06 +00:00
Wikid82 7a1f577771 feat: add forward authentication configuration and UI
- Introduced ForwardAuthConfig model to store global forward authentication settings.
- Updated Manager to fetch and apply forward authentication configuration.
- Added ForwardAuthHandler to create a reverse proxy handler for authentication.
- Enhanced ProxyHost model to include forward authentication options.
- Created Security page and ForwardAuthSettings component for managing authentication settings.
- Implemented API endpoints for fetching and updating forward authentication configuration.
- Added tests for new functionality including validation and error handling.
- Updated frontend components to support forward authentication settings.
2025-11-25 13:25:05 +00:00
Wikid82 78b782974e feat: add custom name handling for proxy hosts and enhance import functionality 2025-11-25 03:50:23 +00:00
Wikid82 0415f5da77 feat: enhance import handling with overwrite support and detailed conflict resolution
feat: add subroute handler extraction for improved Caddyfile parsing
test: add tests for subroute handler extraction functionality
fix: update UI to display staging certificate status and improve dashboard metrics
docs: clarify staging certificate deletion process in ACME documentation
2025-11-25 00:35:42 +00:00
Wikid82 897959a621 feat: enhance import handling with detailed conflict resolution and UI updates 2025-11-24 23:48:25 +00:00
Wikid82 e4b737710c feat: implement ACME staging support for Let's Encrypt to avoid rate limits during development and testing 2025-11-24 23:10:07 +00:00
Wikid82 931e35b5f3 Refactor code structure for improved readability and maintainability 2025-11-24 20:33:01 +00:00
Wikid82 ad98d9fea2 feat: add multi-file upload and import detection endpoints to ImportHandler 2025-11-24 18:55:53 +00:00
Wikid82 5de6f9b714 feat: add Docker management tasks and update import handler for transient preview 2025-11-24 18:40:38 +00:00
Wikid82 6feff3e8ce chore: remove cashed 2025-11-24 18:22:01 +00:00
Wikid82 9c842e7eab chore: remove cached 2025-11-24 18:21:11 +00:00
Wikid82 af5a0b4ef8 feat: add transient import preview and commit functionality with tests 2025-11-24 18:14:59 +00:00
Wikid82 8babd2f430 feat: Enhance import handler to support mounted Caddyfile and improve conflict reporting 2025-11-24 17:32:56 +00:00
Wikid82 9f54438955 Add tests for error handling in backup, notification, and proxy host handlers; enhance certificate service with persistence tests; refactor backup service for scheduled backups; improve frontend form handling and add API tests for certificates, domains, and proxy hosts; implement frontend test coverage script. 2025-11-24 03:52:37 +00:00
Wikid82 527c54582f feat: Add notification test button and fix Discord webhook URL support
- Frontend: Add Test button to Notification Provider form with visual feedback
- Backend: Normalize Discord HTTPS webhook URLs to Shoutrrr format (discord://)
- Backend: Create system notification on test failure for better visibility
2025-11-23 22:58:07 +00:00
Wikid82 1b12dbaf8b feat: Update frontend deps, improve backend coverage, add notification/uptime features
- Upgrade frontend to Node v20
- Fix frontend tests
- Improve backend test coverage to >80%
- Add Notification Provider and Uptime monitoring features
- Fix SQLite locking issues in tests
2025-11-23 20:42:18 +00:00