Commit Graph

204 Commits

Author SHA1 Message Date
GitHub Actions
336000ca5b feat: Add validation and error handling for notification templates and uptime handlers
- Implement tests for invalid JSON input in notification template creation, update, and preview endpoints.
- Enhance uptime handler tests to cover sync success and error scenarios for delete and list operations.
- Update routes to include backup service in certificate handler initialization.
- Introduce certificate usage check before deletion in the certificate service, preventing deletion of certificates in use.
- Update certificate service tests to validate new behavior regarding certificate deletion.
- Add new tests for security service to verify break glass token generation and validation.
- Enhance frontend certificate list component to prevent deletion of certificates in use and ensure proper backup creation.
- Create unit tests for the CertificateList component to validate deletion logic and error handling.
2025-12-03 04:55:29 +00:00
GitHub Actions
8ea50e37e0 feat: Remove deprecated security handler test file to streamline test suite 2025-12-03 02:23:22 +00:00
GitHub Actions
078b5803e6 feat: Add CheckMonitor functionality to trigger immediate health checks for uptime monitors 2025-12-02 22:08:58 +00:00
GitHub Actions
bb7b6a7f9e feat: Implement partial update for ProxyHostHandler
- Added a new test case to ensure that partial updates do not wipe existing fields in the ProxyHost model.
- Modified the Update method in ProxyHostHandler to handle partial updates by only mutating fields present in the JSON payload.
- Enhanced the handling of nullable foreign keys and locations during updates.
- Removed the requirement for 100% coverage checks for critical backend modules in the CI pipeline.
2025-12-02 21:06:15 +00:00
GitHub Actions
62ae91d0c3 fix(tests): add Notification model migrations to all handler tests using NotificationService 2025-12-02 04:34:37 +00:00
GitHub Actions
d285014358 fix(tests): add missing Notification models to handler test migrations 2025-12-02 04:19:25 +00:00
GitHub Actions
33dc664425 feat(waf): update WAF middleware to evaluate and log suspicious payloads without blocking in monitor mode 2025-12-02 03:53:12 +00:00
GitHub Actions
8d26a631d4 feat(tests): add integration test for WAF middleware behavior and metrics exposure 2025-12-02 03:36:58 +00:00
GitHub Actions
34347b1ff5 Refactor uptime service and tests; add WAF configuration UI and e2e tests
- Refactored `SyncMonitors` method in `uptime_service.go` for better readability.
- Updated unit tests for `UptimeService` to ensure proper functionality.
- Introduced Playwright configuration for end-to-end testing.
- Added e2e tests for WAF blocking and monitoring functionality.
- Enhanced the Security page to include WAF mode and rule set selection.
- Implemented tests for WAF configuration changes and validation.
- Created a `.last-run.json` file to store test results.
2025-12-02 02:51:50 +00:00
GitHub Actions
b78d79516e feat(workflow): add WAF integration testing workflow with Docker setup and reporting 2025-12-02 02:10:35 +00:00
GitHub Actions
a08edf1895 Refactor WAF handler configuration to use 'include' array instead of 'rules_file'
- Updated the GenerateConfig function to replace 'rules_file' with 'include' for WAF handlers, aligning with the coraza-caddy plugin requirements.
- Modified related tests to check for the presence of 'include' instead of 'rules_file'.
- Enhanced the ApplyConfig method to prepend necessary Coraza directives to ruleset files if not already present.
- Added tests to verify that the SecRuleEngine directives are correctly prepended and that existing directives are not duplicated.
- Implemented debug logging for generated config size and content.
2025-12-02 01:32:47 +00:00
GitHub Actions
4e975421de feat(integration): add integration test for Coraza WAF script execution 2025-12-02 00:32:40 +00:00
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
1df5999635 feat: enhance ACL handler to properly block access based on geographic restrictions 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
486987cc96 feat: remove IP-based presets from ACL templates for improved security management 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
927bec9374 feat: add trace package with ContextKey type and RequestIDKey constant 2025-12-01 16:22:21 +00:00
GitHub Actions
3403633181 feat: update request ID handling to use trace package constants in notification service 2025-12-01 16:22:21 +00:00
GitHub Actions
22a29955c8 feat: update request ID handling to use trace package constants 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
7cf55c2c39 feat: replace standard logging with structured logging in seed application 2025-12-01 16:22:21 +00:00
GitHub Actions
891a8a3a0f feat: replace log package with structured logging in main application 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
fe1e62a360 feat: add request ID propagation to context in middleware 2025-12-01 16:22:21 +00:00
GitHub Actions
8f566653ef feat: enhance logging in config and manager with structured logging 2025-12-01 16:22:21 +00:00
GitHub Actions
d72b7689b1 feat: integrate structured logging and request ID middleware in main application 2025-12-01 16:22:21 +00:00
GitHub Actions
150a612cbb feat: replace log package with structured logging using logger in UptimeService 2025-12-01 16:22:21 +00:00
GitHub Actions
9494231f86 feat: replace fmt logging with structured logging using logger package 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
9397943f99 feat: implement request ID middleware and enhance recovery logging with structured logging 2025-12-01 16:22:21 +00:00
GitHub Actions
5ca074278c feat: implement logger package with logrus for structured logging 2025-12-01 16:22:21 +00:00
GitHub Actions
3c83e4ac80 feat: add logrus dependency for enhanced logging capabilities 2025-12-01 16:22:21 +00:00
GitHub Actions
626504e907 feat: add Debug configuration option to support runtime debugging 2025-12-01 16:22:21 +00:00
GitHub Actions
48fbca2eee feat: add Recovery middleware for panic handling with verbose 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
renovate[bot]
d05bf75927 fix(deps): update module github.com/gin-gonic/gin to v1.11.0 2025-12-01 02:34:38 +00:00
CI
910e338d30 chore: pin Caddy major to v2 and document SSRF mitigations in notification service 2025-11-29 21:08:52 +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