fix(security): redact integration secrets from viewer-accessible endpoints
Prevent low-privileged tenant members from reading raw API keys and infrastructure credentials via tenant profile, KV config, model/MCP/web search listings, and KB initialization config responses.
This commit is contained in:
@@ -118,7 +118,7 @@ func (h *ModelHandler) CreateModel(c *gin.Context) {
|
||||
|
||||
c.JSON(http.StatusCreated, gin.H{
|
||||
"success": true,
|
||||
"data": dto.NewModelResponse(model),
|
||||
"data": dto.NewModelResponse(ctx,model),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ func (h *ModelHandler) GetModel(c *gin.Context) {
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"data": dto.NewModelResponse(model),
|
||||
"data": dto.NewModelResponse(ctx,model),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ func (h *ModelHandler) ListModels(c *gin.Context) {
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"data": dto.NewModelResponses(models),
|
||||
"data": dto.NewModelResponses(ctx, models),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -634,7 +634,7 @@ func (h *ModelHandler) UpdateModel(c *gin.Context) {
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"data": dto.NewModelResponse(model),
|
||||
"data": dto.NewModelResponse(ctx,model),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user