fix(security): redact secrets in login and tenant KV update responses

Apply the same tenant/integration secret policy to auth login, OIDC
callback, switch-tenant, and invite-register payloads, and return masked
config objects from Admin-only tenant KV PUT handlers.
This commit is contained in:
wizardchen
2026-07-02 12:34:33 +08:00
committed by lyingbug
parent 0b73080bb8
commit 512d2e5c25
6 changed files with 166 additions and 28 deletions
+3 -3
View File
@@ -1099,7 +1099,7 @@ func (h *TenantHandler) updateTenantWebSearchConfigInternal(c *gin.Context) {
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"data": types.EffectiveWebSearchConfig(updatedTenant.WebSearchConfig),
"data": types.WebSearchConfigForResponse(updatedTenant.WebSearchConfig, true),
"message": "Web search configuration updated successfully",
})
}
@@ -1180,7 +1180,7 @@ func (h *TenantHandler) updateTenantParserEngineConfigInternal(c *gin.Context) {
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"data": updatedTenant.ParserEngineConfig,
"data": types.ParserEngineConfigForResponse(updatedTenant.ParserEngineConfig, true),
"message": "解析引擎配置已更新",
})
}
@@ -1245,7 +1245,7 @@ func (h *TenantHandler) updateTenantStorageEngineConfigInternal(c *gin.Context)
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"data": updatedTenant.StorageEngineConfig,
"data": types.StorageEngineConfigForResponse(updatedTenant.StorageEngineConfig, true),
"message": "存储引擎配置已更新",
})
}