接口详情
GET /v1/firewall-actions/policy
Read the desired, active, and last-known-good firewall action policy
- operationId
getFirewallActionPolicy- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:firewall.read
参数
getFirewallActionPolicy 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
target_scope_id | query | string(uuid) | 是 | — |
|---|
site_id | query | string(uuid) | 是 | — |
|---|
响应
getFirewallActionPolicy 响应| 状态码 | 说明 |
|---|
200 | Desired, active, and LKG state 字段:normal_action: string: disconnect / return_page escalated_action: string: nftables engage_threshold: integer recover_threshold: integer recovery_windows: integer block_networks: array<string> trusted_proxies: array<string> trusted_crawlers: array<TrustedCrawler> return_page: ReturnPage id: string(uuid) tenant_scope_id: string(uuid) site_id: string(uuid) revision: integer active_revision: integer lkg_revision: integer deployment_state: string: pending / active / failed host_escalation: string: owned / shared_unsupported document_sha256: string created_at: string(date-time) updated_at: string(date-time) |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
404 | Policy absent or outside actor scope |
|---|
失败时怎么办
401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。
↑ 回到列表
PUT /v1/firewall-actions/policy
Create the next immutable firewall action policy candidate
- operationId
putFirewallActionPolicy- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:firewall.manage
参数
putFirewallActionPolicy 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
target_scope_id | query | string(uuid) | 是 | — |
|---|
site_id | query | string(uuid) | 是 | — |
|---|
If-Match | header | string | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string(uuid) | 是 | — |
|---|
请求体
application/json · 必填:是
putFirewallActionPolicy 请求体| 名称 | 类型 | 必填 | 说明 |
|---|
normal_action | string: disconnect / return_page | 是 | — |
|---|
escalated_action | string: nftables | 是 | — |
|---|
engage_threshold | integer | 是 | — |
|---|
recover_threshold | integer | 是 | — |
|---|
recovery_windows | integer | 是 | — |
|---|
block_networks | array<string> | 是 | — |
|---|
trusted_proxies | array<string> | 是 | — |
|---|
trusted_crawlers | array<TrustedCrawler> | 是 | — |
|---|
return_page | ReturnPage | 是 | — |
|---|
响应
putFirewallActionPolicy 响应| 状态码 | 说明 |
|---|
200 | Immutable candidate accepted for publication 字段:normal_action: string: disconnect / return_page escalated_action: string: nftables engage_threshold: integer recover_threshold: integer recovery_windows: integer block_networks: array<string> trusted_proxies: array<string> trusted_crawlers: array<TrustedCrawler> return_page: ReturnPage id: string(uuid) tenant_scope_id: string(uuid) site_id: string(uuid) revision: integer active_revision: integer lkg_revision: integer deployment_state: string: pending / active / failed host_escalation: string: owned / shared_unsupported document_sha256: string created_at: string(date-time) updated_at: string(date-time) |
|---|
400 | Invalid policy or request metadata |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
409 | Revision, idempotency, or LKG conflict |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
↑ 回到列表
POST /v1/firewall-actions/policy/recover
Create a monotonic recovery candidate from the last-known-good policy
- operationId
recoverFirewallActionLKG- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:firewall.manage
说明(契约原文)
Creates a new monotonic candidate from the durable last-known-good document; it never rewinds revisions.
参数
recoverFirewallActionLKG 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
target_scope_id | query | string(uuid) | 是 | — |
|---|
site_id | query | string(uuid) | 是 | — |
|---|
If-Match | header | string | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string(uuid) | 是 | — |
|---|
请求体
application/json · 必填:是
响应
recoverFirewallActionLKG 响应| 状态码 | 说明 |
|---|
200 | LKG recovery candidate accepted 字段:normal_action: string: disconnect / return_page escalated_action: string: nftables engage_threshold: integer recover_threshold: integer recovery_windows: integer block_networks: array<string> trusted_proxies: array<string> trusted_crawlers: array<TrustedCrawler> return_page: ReturnPage id: string(uuid) tenant_scope_id: string(uuid) site_id: string(uuid) revision: integer active_revision: integer lkg_revision: integer deployment_state: string: pending / active / failed host_escalation: string: owned / shared_unsupported document_sha256: string created_at: string(date-time) updated_at: string(date-time) |
|---|
400 | Invalid policy or request metadata |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
409 | Revision, idempotency, or LKG conflict |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
↑ 回到列表