1. 05 Mar, 2025 7 commits
  2. 04 Mar, 2025 5 commits
    • qiuqunfeng's avatar
      Change WAF endpoint to use query parameters instead of path parameters · 8fe0bf9c
      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
      8fe0bf9c
    • qiuqunfeng's avatar
      Update response types and utility functions · 2840d98a
      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
      2840d98a
    • qiuqunfeng's avatar
      Add WAF mode to CreateWaf and EnableListenerWaf requests · bb958705
      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
      bb958705
    • qiuqunfeng's avatar
      Update WAF service mode update to set listener mode · a1ed13b0
      qiuqunfeng authored
      - Add direct mode assignment to listener specification
      - Ensure listener mode is updated during concurrent processing
      - Simplify mode update logic in UpdateMode method
      a1ed13b0
    • qiuqunfeng's avatar
      Improve WAF service mode update with concurrent listener processing · 1d95943f
      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
      1d95943f
  3. 03 Mar, 2025 6 commits
    • qiuqunfeng's avatar
      Enhance WAF service mode update with listener synchronization · 0fabf210
      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
      0fabf210
    • qiuqunfeng's avatar
      Fix listener host parsing in EnableListenerWafs method · bf474a69
      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
      bf474a69
    • qiuqunfeng's avatar
      Refactor EnableListenerWaf method and remove host column from WAF services table · 4bb0b53d
      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
      4bb0b53d
    • qiuqunfeng's avatar
      Add listener details to WAF service response · 75afb8d4
      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
      75afb8d4
    • qiuqunfeng's avatar
      Update listener port parsing in WAF service · 286f81ee
      qiuqunfeng authored
      - Modify comment to clarify port extraction from `HostsAndPort` field
      - Improve code readability by updating inline documentation
      286f81ee
    • qiuqunfeng's avatar
      Update WAF service types and migration for listener configuration · 055b870b
      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
      055b870b
  4. 01 Mar, 2025 3 commits
    • qiuqunfeng's avatar
      Refactor WAF service creation and error handling · 7ba7c191
      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
      7ba7c191
    • qiuqunfeng's avatar
      Implement Kafka log consumer with Elasticsearch and database integration · 22159493
      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
      22159493
    • qiuqunfeng's avatar
      Add name field to ListenerWaf struct and update dependencies · 6f4bd708
      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
      6f4bd708
  5. 28 Feb, 2025 2 commits
    • qiuqunfeng's avatar
      Switch from YAML to JSON configuration and rule files · ea21cd21
      qiuqunfeng authored
      - Updated config loading in `cmd/app/config.go` to use JSON instead of YAML
      - Modified `internal/service/waf.go` to read WAF rules from JSON file
      - Removed YAML library imports and replaced with JSON unmarshaling
      - Updated file extensions from `.yaml` to `.json` in file reading logic
      ea21cd21
    • qiuqunfeng's avatar
      Refactor EnableListenerWafs to support new listener format · 59201340
      qiuqunfeng authored
      - Updated `EnableListenerWafsReq` struct to use string slice for listeners
      - Modified WAF service method to parse listener string into hosts and port
      - Simplified listener WAF configuration logic to work with new listener representation
      - Added error handling for port parsing and listener format validation
      59201340
  6. 26 Feb, 2025 1 commit
    • qiuqunfeng's avatar
      Add support for bulk listener WAF configuration · 20c5b6e6
      qiuqunfeng authored
      - Introduced new API endpoint and service method to enable/disable WAF for multiple listeners
      - Updated router, controller, and service to support bulk listener WAF operations
      - Added new request type `EnableListenerWafsReq` to handle multiple listener configurations
      - Implemented logic to add or remove WAF configurations for specific listeners based on input
      20c5b6e6
  7. 18 Feb, 2025 5 commits
  8. 17 Feb, 2025 7 commits
  9. 15 Feb, 2025 2 commits
  10. 06 Feb, 2025 2 commits