- 30 Mar, 2025 2 commits
-
-
qiuqunfeng authored
- Add calculateCrdWafRules method to compute WAF rules based on enabled categories. - Introduce updateRulesForCrd method to update WAF service rules in the cluster. - Modify UpdateRule method to include rules update after fetching the WAF service record. - Remove commented-out GetRuleCategories method for code clarity.
-
qiuqunfeng authored
- Modify the ListRules method in the WAF service to allow filtering of rule categories based on the specified language and name. - Implement dynamic query construction to support localization for both Chinese and English categories.
-
- 29 Mar, 2025 1 commit
-
-
qiuqunfeng authored
- Simplify the update process for WAF service attack numbers by directly incrementing the attack_num field in the database. - Remove redundant queries and error handling for improved code clarity and efficiency. - Update attack log filter to clarify the purpose of the AttackApp field as the gateway name. - Adjust the WAF service to correctly reference the gateway name in workload creation and modify attack log queries for consistency.
-
- 28 Mar, 2025 3 commits
-
-
qiuqunfeng authored
- Introduce a new GET endpoint for listing attack classes in the WAF router. - Implement AttackClassesList method in WafController to handle requests and return attack class data based on the specified language. - Enhance the WAF service with ListAttackClasses method to retrieve attack classes and support localization for descriptions. - Define AttackClasses struct to standardize the response format for attack class data.
-
qiuqunfeng authored
-
qiuqunfeng authored
- Update the ListListenerHistory method to allow querying by multiple fields using LIKE conditions, specifically for 'name', 'listener_name', and 'gateway_name'.
-
- 21 Mar, 2025 1 commit
-
-
qiuqunfeng authored
- Change operation constants for creation and deletion from English to Chinese ("新建" and "删除"). - Update the addListenerHistory method to accept the Operation type instead of a string for better type safety and clarity in logging operations.
-
- 20 Mar, 2025 3 commits
-
-
qiuqunfeng authored
- Introduce a new GET endpoint for listing listener history in the WAF router. - Implement ListListenerHistory method in the WafController to handle requests and return paginated results based on query parameters. - Enhance the WAF service to log listener creation and deletion events, capturing relevant details for auditing purposes. - Update the WafListenerHistory model and service methods to support querying and storing listener history data effectively.
-
qiuqunfeng authored
- Update the GetBlackWhiteLists method in both the service and controller layers to return the total number of items alongside the list of MatcherExpr. - Modify response structure in the controller to include total items for improved client-side handling. - Ensure proper error handling and maintain existing functionality while enhancing data retrieval capabilities.
-
qiuqunfeng authored
- Update the database operation in the EnableBlackWhiteList method to use Model and Where clauses for a more precise status update. - Improve the clarity and efficiency of the database interaction within the WAF service.
-
- 19 Mar, 2025 5 commits
-
-
qiuqunfeng authored
- Introduce a condition to prevent unnecessary operations if the requested status matches the current status in the EnableBlackWhiteList method. - Enhance the efficiency of the WAF service by avoiding redundant updates.
-
qiuqunfeng authored
- Modify the updateConfigMap method to replace the scope with gateway names instead of IDs - Enhance the handling of WAF service configurations for improved clarity and functionality
-
qiuqunfeng authored
- Add UpdateBlackWhiteList method in WafController to handle updates to black/white list entries - Introduce EnableBlackWhiteList method in WafController for enabling/disabling black/white lists - Enhance WafService with logic to update and manage configuration maps for black/white lists - Ensure proper error handling and response assembly for both methods
-
qiuqunfeng authored
-
qiuqunfeng authored
-
- 18 Mar, 2025 2 commits
-
-
qiuqunfeng authored
- Introduce ListWafs method in WafController to retrieve a list of WAF services - Update WAF router to include new GET routes for listing WAFs - Implement ListWafs method in the service layer to fetch WAF data from the database - Enhance the MatcherExpr and WafService structures to support new functionality
-
qiuqunfeng authored
- Introduce a label to the ConfigMap for black/white list to enhance identification and management - Add logging for the ConfigMap name to improve visibility during configuration creation
-
- 17 Mar, 2025 2 commits
-
-
qiuqunfeng authored
- Introduce logging of svcMap to provide better visibility into service mapping during Black/White List creation - Enhance debugging capabilities for the WAF service operations
-
qiuqunfeng authored
- Implement Create, Update, Enable, Delete, and Get methods for managing Black/White Lists - Introduce new routes in the WAF router for handling Black/White List operations - Update service and model layers to support new functionality - Refactor cluster client management to accommodate new Kubernetes client structure
-
- 14 Mar, 2025 4 commits
-
-
qiuqunfeng authored
- Correct the field name from 'Catagory' to 'Category' in WafRuleCategory struct - Update references in SaveRuleCategoryToDB method to reflect the corrected field name - Ensure consistency in category naming across the WAF service
-
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 4 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
-
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
- 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 2 commits
-
-
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 3 commits
-
-
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 6 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
- 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
-