- 01 Apr, 2025 2 commits
-
-
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.
-
qiuqunfeng authored
Enhance WafService and ListWafsV2 response by adding ID field to improve data representation and clarity in WAF listings.
-
- 31 Mar, 2025 12 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
-
qiuqunfeng authored
- Introduce ListWafsV2 method in WafController to enhance the WAF listing functionality with a new response structure. - Update the API route for listing WAFs to point to the new ListWafsV2 method, improving clarity and consistency in the API design.
-
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
- Rename RequestPkg field to req_pkg in the AttackLog struct to enhance clarity and maintain consistency with naming conventions across the codebase.
-
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 7 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.
-
-
qiuqunfeng authored
- Introduce a new field 'res_name' of type 'keyword' in the WAF detection index template to enhance data categorization and querying capabilities. - This addition aims to improve the structure and usability of the index for WAF-related data.
-
- 29 Mar, 2025 4 commits
-
-
-
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.
-
qiuqunfeng authored
- Set the default limit for listener history queries to 1,000,000 in the ListListenerHistory method. - Change the operation constant for creation from "新建" to "创建" for improved clarity in the WAF model.
-
qiuqunfeng authored
-
- 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 4 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 response format in the GetBlackWhiteLists method to utilize a new ListRespData structure, enhancing clarity and consistency in the returned data. - Maintain existing functionality while improving the organization of response data, including items and total count.
-
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 7 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
-
qiuqunfeng authored
-
qiuqunfeng authored
-