- 16 Apr, 2025 1 commit
-
-
qiuqunfeng authored
-
- 15 Apr, 2025 1 commit
-
-
qiuqunfeng authored
Refactor UpdateRule method to improve handling of rule category status. The update now correctly manages the addition and removal of category IDs based on the request status, enhancing the accuracy of rule updates in the WAF service.
-
- 03 Apr, 2025 1 commit
-
-
qiuqunfeng authored
This update introduces functionality to count attack logs for the current day within the GetWaf method. It utilizes a boolean query to filter logs based on the service ID and the attack time range, enhancing the WAF service's ability to track and report attack activity accurately.
-
- 02 Apr, 2025 3 commits
-
-
qiuqunfeng authored
Enhance DeleteGatewayWaf method to improve error handling and logging. Added deferred function to log gateway deletion history with error messages and status. This change ensures better tracking of deletion operations and improves clarity in error reporting.
-
qiuqunfeng authored
Update AttackListener filter in ListAttackLogs method to use 'attacked_app' field for improved query accuracy. This change enhances the precision of attack log filtering based on the specified listener.
-
qiuqunfeng authored
This update introduces a new filter for AttackListener in the ListAttackLogs method, allowing for more precise querying of attack logs based on the specified listener. This change improves the flexibility and usability of the WAF service's logging functionality.
-
- 01 Apr, 2025 3 commits
-
-
qiuqunfeng authored
Add getScopeName function to retrieve gateway names from WAF services and integrate it into GetBlackWhiteLists response This new function fetches gateway names based on the provided scope and enhances the GetBlackWhiteLists method by including the ScopeName field in the response. This change improves data representation and clarity in WAF listings.
-
qiuqunfeng authored
The getEnabledRuleNum function now returns an error for better error handling. It calculates the number of enabled WAF rule categories based on the WAF service's rule category status, ensuring accurate counts in the GetWaf method. This change enhances the robustness of the WAF service response.
-
qiuqunfeng authored
This new function retrieves the number of enabled WAF rule categories and adjusts the count based on the WAF service's rule category status. The RuleNum field in the GetWaf method is updated to use this new function, enhancing the accuracy of the WAF service response.
-
- 31 Mar, 2025 9 commits
-
-
qiuqunfeng authored
-
qiuqunfeng authored
-
qiuqunfeng authored
Refactor DeleteListenerWaf method to improve logging by including listenerName in the deferred function. This change enhances clarity in history logging while maintaining existing functionality.
-
qiuqunfeng authored
Update DeleteListenerWaf method to use listenerName variable for improved clarity in history logging. This change enhances code readability while maintaining existing functionality.
-
qiuqunfeng authored
Refactor DeleteListenerWaf method to store listener name in a variable for improved clarity and maintainability. This change enhances the readability of the code while preserving existing functionality.
-
qiuqunfeng authored
Enhance DeleteListenerWaf method to include service retrieval and update listener name. Add error handling for service fetch failure to improve robustness and clarity in WAF service operations.
-
qiuqunfeng authored
Fix status handling in CreateWaf and DeleteListenerWaf methods to correctly reflect success and failure states. Update default status values and error handling logic for improved clarity and accuracy.
-
qiuqunfeng authored
- Include the AttackedApp field in the response structure of the GetAttackLogDetails method to provide additional context about the attacked application in the attack log details.
-
qiuqunfeng authored
- Update GetAttackLogDetails and GetAttackLogRsp methods in the WafController and wafService to accept UUID as a string parameter instead of a uint32 ID. - Modify corresponding service interface to reflect the change in parameter type for improved clarity and consistency in handling attack logs.
-
- 30 Mar, 2025 5 commits
-
-
qiuqunfeng authored
- Introduce new API routes for fetching attack log details and response packages. - Implement corresponding methods in the WafController and wafService to handle the new functionality. - Update service interface and types to support the new data structures for attack logs and responses.
-
qiuqunfeng authored
- Update the logic in getRulesForService and calculateCrdWafRules methods to simplify the process of enabling rule categories based on the RuleCategoryStatus. - Introduce a new helper method isCategoryEnabled to streamline category checks and enhance code readability.
-
qiuqunfeng authored
- Modify the UpdateRule method to assign the RuleCategoryStatus directly to the wafService before updating the database. - Enhance error handling for the database update operation to ensure clarity in failure cases.
-
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
-