- 14 Mar, 2025 3 commits
-
-
qiuqunfeng authored
- Extend ListRules method to handle English and Chinese categories - Append appropriate category names and descriptions based on selected language - Ensure consistent response structure for rule group responses
-
qiuqunfeng authored
- Update condition to check for nil RuleCategoryStatus before accessing Status - Ensure safe handling of WAF service rule categories
-
qiuqunfeng authored
- Set the global configuration variable Conf to enable Debug mode - Include UUID in the attack log structure for better identification of WAF detections
-
- 11 Mar, 2025 1 commit
-
-
qiuqunfeng authored
- Extend CreateWafReq struct with ServiceID field - Update CreateWaf method to include ServiceID in WAF configuration - Implement getServiceID method to retrieve or create WAF service - Modify EnableListenerWaf to handle ServiceID retrieval and creation - Ensure consistent WAF service tracking across different operations
-
- 07 Mar, 2025 9 commits
-
-
qiuqunfeng authored
- Adjust time range filtering to use strictly positive time values - Rename Elasticsearch query result variable for improved readability - Maintain existing logging and error handling for WAF attack log retrieval
-
qiuqunfeng authored
- Add console writer to log output for improved readability - Maintain debug log level configuration
-
qiuqunfeng authored
- Change zerolog global log level from Info to Debug - Improve visibility into application startup and runtime behavior
-
qiuqunfeng authored
- Add number decoder to Elasticsearch client configuration - Ensure proper parsing of numeric fields in Elasticsearch responses
-
qiuqunfeng authored
-
qiuqunfeng authored
-
qiuqunfeng authored
- Add log statements to track Elasticsearch query hits and source data - Improve visibility into WAF attack log retrieval process - Log raw Elasticsearch response and individual hit sources for debugging
-
qiuqunfeng authored
- Remove leading slash from v2 WAF API route paths - Ensure consistent route path formatting
-
qiuqunfeng authored
- Update log level for WAF detection query source logging - Improve visibility of Elasticsearch query source information
-
- 06 Mar, 2025 1 commit
-
-
qiuqunfeng authored
- Integrate Elasticsearch client for querying WAF attack logs - Add new API endpoints for listing attack logs and WAF rules - Implement pagination and filtering for attack log retrieval - Support language-based rule category display - Update service and controller layers to support new functionality
-
- 05 Mar, 2025 7 commits
-
-
qiuqunfeng authored
- Modify HTTP request method in AuthMiddleware from POST to GET - Ensure compatibility with SSO service authentication endpoint
-
qiuqunfeng authored
- Log specific SSO authentication error code and message - Improve error traceability and debugging for authentication middleware
-
qiuqunfeng authored
- Add timeout and TLS configuration to HTTP client in AuthMiddleware - Enable insecure TLS connection for SSO service requests - Log errors for failed SSO authentication requests - Improve error handling and network resilience in authentication process
-
qiuqunfeng authored
- Integrate zerolog for detailed error logging in AuthMiddleware - Log errors when reading SSO response body or unmarshaling response - Improve error traceability during authentication process
-
qiuqunfeng authored
- Uncomment and activate AuthMiddleware in router configuration - Add conditional skip for ping endpoint in authentication middleware - Restore authentication checks for both release and debug modes
-
qiuqunfeng authored
- Include informative log message when starting Kafka message consumption - Enhance observability of log consumer service startup process
-
qiuqunfeng authored
- Implement dynamic Kafka authentication mechanism (PLAIN/SCRAM) - Add environment variable-based Kafka broker and authentication configuration - Modify log consumer service to support flexible Kafka connection setup - Update Elasticsearch store initialization with new index template - Extend WAF service types to support listener name and hosts
-
- 04 Mar, 2025 8 commits
-
-
qiuqunfeng authored
- Modify WAF route to use empty string for root path - Remove commented-out route for gateway endpoint - Simplify route configuration in `SetWafRouter`
-
qiuqunfeng authored
- Remove path parameters from route configuration - Align with previous changes to use query-based parameter retrieval
-
qiuqunfeng authored
- Update `Waf` method in WafController to retrieve gateway details using query parameters - Modify parameter extraction from `ctx.Param()` to `ctx.Query()` - Maintain consistent method signature and service call logic
-
qiuqunfeng authored
- Add `Code`, `Message`, and `StatusCode` fields to `SuccessResponse` and `FailResponse` - Remove `RespErr` struct and directly include error details in `FailResponse` - Modify `AssembleResponse` to use new response structure with standardized fields
-
qiuqunfeng authored
- Update WAF router configuration to use POST method for enabling multiple listeners - Maintain consistency with other WAF-related API endpoint HTTP methods
-
qiuqunfeng authored
- Extend CreateWafReq and EnableListenerWafReq structs with Mode field - Update CreateWaf method to use requested WAF mode - Modify EnableListenerWafs to retrieve and apply WAF mode from existing service - Ensure mode is consistently passed through WAF service operations
-
qiuqunfeng authored
- Add direct mode assignment to listener specification - Ensure listener mode is updated during concurrent processing - Simplify mode update logic in UpdateMode method
-
qiuqunfeng authored
- Add synchronization mechanism using sync.WaitGroup - Implement concurrent goroutine updates for WAF service listeners - Ensure all listener updates complete before returning - Create local listener variable to prevent goroutine closure issues
-
- 03 Mar, 2025 7 commits
-
-
qiuqunfeng authored
- Implement concurrent listener mode updates for WAF services - Add client retrieval and listing of listeners by gateway name - Return updated WAF service metadata after mode modification - Improve error handling for client and listener operations
-
qiuqunfeng authored
- Update region configuration with new API server and cluster details - Modify database configuration to use Kubernetes service endpoint - Change WAF rule categories table migration to use BIGINT with AUTO_INCREMENT - Standardize JSON configuration formatting
-
qiuqunfeng authored
- Add error logging for listener list retrieval - Modify host extraction to use substring before port separator - Improve error handling and logging in WAF service method
-
qiuqunfeng authored
- Commented out database operations in `EnableListenerWaf` method - Simplified WAF creation and deletion logic using request parameters - Removed `host` column from `waf_services` table migration - Updated logging to use request parameters instead of listener object
-
qiuqunfeng authored
- Modify `WafService` struct to include listener information - Update `GetWaf` method to retrieve and format listener details - Enhance `ListListenerWafStatus` to return hosts for each listener - Remove commented-out code and unused port list logic
-
qiuqunfeng authored
- Modify comment to clarify port extraction from `HostsAndPort` field - Improve code readability by updating inline documentation
-
qiuqunfeng authored
- Modify `ListenerWaf` struct to use single `HostsAndPort` field instead of separate `Hosts` and `Port` - Update `EnableListenerWafsReq` to use `ListenerWaf` slice for listeners - Change `waf_services` table migration to use `BIGINT` and `AUTO_INCREMENT` - Adjust `EnableListenerWafs` method to parse new listener format - Add logging for listener name during WAF configuration
-
- 01 Mar, 2025 3 commits
-
-
qiuqunfeng authored
- Improve CreateWaf method by adding validation for rule count - Update error messages in cluster client retrieval - Return WafService struct with basic metadata on successful creation - Remove commented-out legacy code - Enhance error handling in DeleteListenerWaf and CreateWaf methods
-
qiuqunfeng authored
- Add log consumer service to process WAF detection messages - Implement message handling with JSON unmarshaling - Save WAF detection logs to Elasticsearch - Update WAF service attack number in database - Modify ESStore to support bulk indexing with channel-based approach - Add constants for Kafka topics and Elasticsearch indices
-
qiuqunfeng authored
- Added `Name` field to `ListenerWaf` struct in `internal/service/types.go` - Updated Go module dependencies, adding Elasticsearch client library - Removed `CreateListener` method from `waf.go` service
-
- 28 Feb, 2025 1 commit
-
-
qiuqunfeng authored
- Changed struct tags in `cmd/app/config.go` from `yaml` to `json` - Maintains existing configuration structure while switching serialization format
-