发布 0.1.0:通知渠道、告警规则、令牌版本与安全加固
This commit is contained in:
+303
-1
@@ -1,5 +1,26 @@
|
||||
basePath: /
|
||||
definitions:
|
||||
internal_api.alertRuleRequest:
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
eventTypes:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
ociConfigId:
|
||||
type: integer
|
||||
resourceMatch:
|
||||
type: string
|
||||
sourceIpMode:
|
||||
type: string
|
||||
sourceIps:
|
||||
type: string
|
||||
threshold:
|
||||
type: integer
|
||||
windowMinutes:
|
||||
type: integer
|
||||
type: object
|
||||
internal_api.attachBootVolumeRequest:
|
||||
properties:
|
||||
bootVolumeId:
|
||||
@@ -277,11 +298,15 @@ definitions:
|
||||
internal_api.loginRequest:
|
||||
properties:
|
||||
password:
|
||||
maxLength: 128
|
||||
type: string
|
||||
totpCode:
|
||||
description: 两步验证码;账号已启用 TOTP 时必填,缺失返回 428
|
||||
maxLength: 8
|
||||
type: string
|
||||
username:
|
||||
description: 字段长度上限防超长输入撑爆登录守卫与 bcrypt(S-03)
|
||||
maxLength: 64
|
||||
type: string
|
||||
required:
|
||||
- password
|
||||
@@ -328,6 +353,31 @@ definitions:
|
||||
description: 更换 shape,运行中实例会自动重启
|
||||
type: string
|
||||
type: object
|
||||
internal_api.updateNotifyChannelRequest:
|
||||
properties:
|
||||
bodyTemplate:
|
||||
type: string
|
||||
enabled:
|
||||
type: boolean
|
||||
from:
|
||||
type: string
|
||||
host:
|
||||
type: string
|
||||
port:
|
||||
type: integer
|
||||
secret:
|
||||
type: string
|
||||
server:
|
||||
type: string
|
||||
to:
|
||||
type: string
|
||||
topic:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
internal_api.updateSecurityListRequest:
|
||||
properties:
|
||||
displayName:
|
||||
@@ -1078,6 +1128,20 @@ paths:
|
||||
summary: 密码登录开关
|
||||
tags:
|
||||
- 认证
|
||||
/api/v1/auth/revoke-sessions:
|
||||
post:
|
||||
responses:
|
||||
"200":
|
||||
description: 新 token 与 expiresAt
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 撤销全部会话
|
||||
tags:
|
||||
- 认证
|
||||
/api/v1/auth/totp:
|
||||
get:
|
||||
responses:
|
||||
@@ -1203,6 +1267,78 @@ paths:
|
||||
summary: 回传日志事件列表
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
/api/v1/log-events/alert-rules:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 告警规则列表
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
post:
|
||||
parameters:
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.alertRuleRequest'
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 创建告警规则
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
/api/v1/log-events/alert-rules/{ruleId}:
|
||||
delete:
|
||||
parameters:
|
||||
- description: 规则 ID
|
||||
in: path
|
||||
name: ruleId
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"204":
|
||||
description: 无内容
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 删除告警规则
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
put:
|
||||
parameters:
|
||||
- description: 规则 ID
|
||||
in: path
|
||||
name: ruleId
|
||||
required: true
|
||||
type: integer
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.alertRuleRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 更新告警规则
|
||||
tags:
|
||||
- 任务与日志回传
|
||||
/api/v1/oci-configs:
|
||||
get:
|
||||
responses:
|
||||
@@ -1237,6 +1373,7 @@ paths:
|
||||
- 租户配置
|
||||
/api/v1/oci-configs/{id}:
|
||||
delete:
|
||||
description: 删除租户配置及其本地关联任务、快照、回传、告警和 AI 渠道数据,并撤销 Webhook 密钥;不删除 OCI 云端资源。
|
||||
parameters:
|
||||
- description: 配置 ID
|
||||
in: path
|
||||
@@ -1301,6 +1438,14 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 续查游标(上次响应原样带回)
|
||||
in: query
|
||||
name: cursor
|
||||
type: string
|
||||
- description: 单批目标条数,缺省 100,上限 200
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -1309,7 +1454,7 @@ paths:
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 实时查询租户 OCI 审计事件:hours 首查
|
||||
summary: 批式懒加载查询租户 OCI 审计事件
|
||||
tags:
|
||||
- 租户 IAM
|
||||
/api/v1/oci-configs/{id}/audit-events/detail:
|
||||
@@ -1560,6 +1705,25 @@ paths:
|
||||
summary: 配置成本快照
|
||||
tags:
|
||||
- 成本
|
||||
/api/v1/oci-configs/{id}/domains:
|
||||
get:
|
||||
parameters:
|
||||
- description: 配置 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 租户身份域列表
|
||||
tags:
|
||||
- 租户 IAM
|
||||
/api/v1/oci-configs/{id}/identity-providers:
|
||||
get:
|
||||
parameters:
|
||||
@@ -1568,6 +1732,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -1586,6 +1754,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
@@ -1611,6 +1783,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: idpId
|
||||
in: path
|
||||
name: idpId
|
||||
@@ -1632,6 +1808,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: idpId
|
||||
in: path
|
||||
name: idpId
|
||||
@@ -1662,6 +1842,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -1680,6 +1864,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: 请求体(见接口说明)
|
||||
in: body
|
||||
name: body
|
||||
@@ -2412,6 +2600,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -2430,6 +2622,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: 请求体(见接口说明)
|
||||
in: body
|
||||
name: body
|
||||
@@ -2455,6 +2651,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -2474,6 +2674,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: policyId
|
||||
in: path
|
||||
name: policyId
|
||||
@@ -2547,6 +2751,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -2701,6 +2909,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: 请求体(见接口说明)
|
||||
in: body
|
||||
name: body
|
||||
@@ -2726,6 +2938,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: ruleId
|
||||
in: path
|
||||
name: ruleId
|
||||
@@ -2747,6 +2963,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -2925,6 +3145,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@@ -2943,6 +3167,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
@@ -2968,6 +3196,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: userId
|
||||
in: path
|
||||
name: userId
|
||||
@@ -2988,6 +3220,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: userId
|
||||
in: path
|
||||
name: userId
|
||||
@@ -3011,6 +3247,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: userId
|
||||
in: path
|
||||
name: userId
|
||||
@@ -3065,6 +3305,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: userId
|
||||
in: path
|
||||
name: userId
|
||||
@@ -3089,6 +3333,10 @@ paths:
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 身份域 OCID(缺省 Default 域)
|
||||
in: query
|
||||
name: domainId
|
||||
type: string
|
||||
- description: userId
|
||||
in: path
|
||||
name: userId
|
||||
@@ -3498,6 +3746,60 @@ paths:
|
||||
summary: 返回本地维护的完整区域表
|
||||
tags:
|
||||
- 租户配置
|
||||
/api/v1/settings/notify-channels:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 返回全部通知渠道的脱敏视图
|
||||
tags:
|
||||
- 设置
|
||||
/api/v1/settings/notify-channels/{type}:
|
||||
put:
|
||||
parameters:
|
||||
- description: 渠道类型(webhook/ntfy/bark/smtp)
|
||||
in: path
|
||||
name: type
|
||||
required: true
|
||||
type: string
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.updateNotifyChannelRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 保存单渠道配置并返回全渠道最新视图
|
||||
tags:
|
||||
- 设置
|
||||
/api/v1/settings/notify-channels/{type}/test:
|
||||
post:
|
||||
parameters:
|
||||
- description: 渠道类型(webhook/ntfy/bark/smtp)
|
||||
in: path
|
||||
name: type
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
description: 无内容
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 向指定渠道发送测试消息
|
||||
tags:
|
||||
- 设置
|
||||
/api/v1/settings/notify-events:
|
||||
get:
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user