feat(api): A5 审计采集、检索与导出
AuditInterceptor 成功 / 失败双写 audit_logs(响应前 await、脱敏、sink 缺失退化 Pino);登录 / 权限 / 客户 / 字典 / 配置等既有动作补审计;审计列表 / 详情 / 动作目录 / 异步 CSV 导出 / HMAC 签名下载;分区维护与保留归档占位;OpenAPI 快照更新。
This commit is contained in:
1 parent
6215f204ce
commit
6bdda6ec62
44 files changed
+3845
-127
No files matched your search
+156
-16
@@ -1094,6 +1094,32 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
"get": {
|
||||
"description": "真实检查 PostgreSQL 与 Redis;任一不可用返回 503 与统一错误体。",
|
||||
"operationId": "HealthController_check",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "全部依赖健康",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HealthResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "依赖不可用(错误码 50002),details 内附各依赖检查结果"
|
||||
}
|
||||
},
|
||||
"summary": "健康检查",
|
||||
"tags": [
|
||||
"platform"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/system/configs": {
|
||||
"get": {
|
||||
"operationId": "SystemConfigController_list",
|
||||
@@ -1172,29 +1198,143 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
"/api/v1/audit-logs": {
|
||||
"get": {
|
||||
"description": "真实检查 PostgreSQL 与 Redis;任一不可用返回 503 与统一错误体。",
|
||||
"operationId": "HealthController_check",
|
||||
"operationId": "AuditController_list",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "全部依赖健康",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HealthResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "依赖不可用(错误码 50002),details 内附各依赖检查结果"
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"summary": "健康检查",
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "审计日志列表(多条件筛选 + 游标分页,稳定排序 occurred_at DESC, id DESC)",
|
||||
"tags": [
|
||||
"platform"
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/audit-logs/actions": {
|
||||
"get": {
|
||||
"operationId": "AuditController_actions",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "审计动作目录(中文名 / 分类 / 对象类型,供筛选下拉)",
|
||||
"tags": [
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/audit-logs/export": {
|
||||
"post": {
|
||||
"operationId": "AuditController_createExport",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "创建审计导出任务(异步,立即返回 queued;导出本身写审计)",
|
||||
"tags": [
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/audit-logs/exports": {
|
||||
"get": {
|
||||
"operationId": "AuditController_listExports",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "我的审计导出任务(按发起时间倒序)",
|
||||
"tags": [
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/audit-logs/exports/{id}": {
|
||||
"get": {
|
||||
"operationId": "AuditController_getExport",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "导出任务进度(status / progress / rowCount / fileSize / expiresAt)",
|
||||
"tags": [
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/audit-logs/exports/{id}/download": {
|
||||
"get": {
|
||||
"operationId": "AuditController_download",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "下载审计导出 CSV(短时效 HMAC 签名链接,无需登录)",
|
||||
"tags": [
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/audit-logs/{id}": {
|
||||
"get": {
|
||||
"operationId": "AuditController_detail",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "审计日志详情(before / after / changes / diff / trace / ip / ua)",
|
||||
"tags": [
|
||||
"platform-audit"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user