- 17 Jun, 2025 3 commits
-
-
qunfeng qiu authored
-
qiuqunfeng authored
This update enhances the genWafDetectionEvent function by including RuleKeys with version, name, and category details for improved event context. Additionally, an informational log statement has been added to track WAF events during processing.
-
qiuqunfeng authored
Enhance WAF detection event handling in LogConsumerService by adding attack URL and action details to the event context. The genWafDetectionEvent function now processes attacked logs more comprehensively, improving the overall event generation logic and error handling.
-
- 16 Jun, 2025 2 commits
-
-
qiuqunfeng authored
Enhance WAF detection event generation in LogConsumerService by adding attacked log details. The genWafDetectionEvent function now accepts an additional parameter for attacked logs, allowing for more comprehensive event context, including attack IP, time, application, and payload information.
-
qiuqunfeng authored
Refactor WAF service listener deletion logic to include namespace and region code in the query, enhancing specificity and accuracy in service management. Additionally, remove redundant action check in WAF detection generation to simplify error handling.
-
- 12 Jun, 2025 3 commits
-
-
qiuqunfeng authored
Comment out WAF detection and event generation logic in LogConsumerService to simplify handling and improve readability. This change prepares the code for future enhancements while maintaining the current functionality.
-
qiuqunfeng authored
This update replaces direct assignment of WAF detection properties with a new method for generating WAF detections and events, enhancing code clarity and maintainability. Additionally, error handling has been improved to log failures during the generation process, ensuring better visibility into issues that may arise.
-
qiuqunfeng authored
Refactor API router and WAF handling to support additional parameters and improve configuration management This update modifies the SetRouters and SetWafRouter functions to accept new parameters, including a debug flag and a region URL map, enhancing the flexibility of the API routing. Additionally, a new SetApiRouters function is introduced for better organization of API routes. The configuration management has been streamlined by moving configuration imports to the internal package, ensuring a more consistent structure across the application.
-
- 01 Jun, 2025 1 commit
-
-
qiuqunfeng authored
This update introduces the ability to set the log level dynamically based on the LOG_LEVEL environment variable, allowing for better control over logging verbosity. Additionally, the Elasticsearch client creation has been refactored to utilize configuration settings from a JSON file, enhancing the application's configurability. The previous LoadConfig function has been replaced with a more structured approach, and unnecessary code has been removed to streamline the log consumer service.
-
- 28 Apr, 2025 1 commit
-
-
qiuqunfeng authored
-
- 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 4 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.
-
qiuqunfeng authored
Enhance WafService and ListWafsV2 response by adding ID field to improve data representation and clarity in WAF listings.
-
- 31 Mar, 2025 10 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
- 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 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.
-