Commit 1c07b18e authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Enhance WAF detection event structure in LogConsumerService by adding action...

Enhance WAF detection event structure in LogConsumerService by adding action and request details in a nested format. This refactor improves clarity and context for generated events, facilitating better analysis of detected attacks.
parent 78b112b7
package api
import (
"github.com/gin-gonic/gin"
"github.com/olivere/elastic/v7"
"gitlab.com/tensorsecurity-rd/waf-console/internal/controller"
"gitlab.com/tensorsecurity-rd/waf-console/internal/utils"
"gorm.io/gorm"
)
func SetWafApiServerRouter(e *gin.Engine, clusterClientManager *utils.ClusterClientManager, db *gorm.DB, gatewayUrl string, elasticClient *elastic.Client) {
wafController := controller.NewWafController(clusterClientManager, db, gatewayUrl, elasticClient)
v2 := e.Group("api/v2/containerSec/waf")
v2.GET("attack/log/list", wafController.ListAttackLogs)
v2.GET("attack/log/details", wafController.GetAttackLogDetails)
v2.GET("attack/log/rspPkg", wafController.GetAttackLogRsp)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment