---
{
  "id": "platform.webhook.permissions-and-safety",
  "topic": "webhook",
  "title": "Webhook 權限與安全界線",
  "locale": "zh-TW",
  "version": "2026-08-09.1",
  "summary": "Webhook 管理限 owner，目標權限會重查，secret 與 payload 會 redaction，高風險 action 保留 registry confirmation。",
  "content": "所有 webhook actions 都從 `ActionContext::owner_id` 取身分，argument 的 user id 不能擴權；還需逐 webhook Agent grant，且兩邊 owner 相符。`read` 可 list/get/history/payload；`write` 才可 update/cancel/rotate。不存在、撤銷、read-only write 或跨 owner 都回 `resource_not_found`。Dispatch 另重查 target 權限與 captured config。\n\nCreate/rotation 的明文 secret 只顯示一次，idempotency replay 會移除並受 redaction。Payload/headers 不留在 persisted result，限 owner、24 小時到期，存取每分鐘 30 次且有稽核。\n\n建立需 owner 管理的 `canCreateWebhook`；新 webhook 原子授予 creating Agent write。Migration 只授權 active external Agents；platform Agents 零 grants，分享前可能只見空清單。能讀 webhook 才能建 Trigger。Rotate/cancel 需確認與 strict drift。Create/update/rotate/cancel/payload detail 禁止 public；reads 仍需 grant。\n\nInbound 仍有 HMAC、timestamp、nonce、size、rate、enabled、status、expiry gates。Knowledge 不能新增 action、降低 confirmation、揭露 secret 或授權。\n",
  "aliases": [
    "webhook 權限",
    "owner only",
    "owner 回呼 headers",
    "公開對話",
    "secret redaction",
    "目標資源權限",
    "webhook 安全"
  ],
  "tags": [
    "authorization",
    "confirmation",
    "redaction",
    "security"
  ],
  "relatedActions": [],
  "relatedActionPrefixes": [
    "arinova.webhook."
  ],
  "url": "https://docs.arinova.ai/zh-tw/kb/webhook/permissions-and-safety/"
}
---

所有 webhook actions 都從 `ActionContext::owner_id` 取身分，argument 的 user id 不能擴權；還需逐 webhook Agent grant，且兩邊 owner 相符。`read` 可 list/get/history/payload；`write` 才可 update/cancel/rotate。不存在、撤銷、read-only write 或跨 owner 都回 `resource_not_found`。Dispatch 另重查 target 權限與 captured config。

Create/rotation 的明文 secret 只顯示一次，idempotency replay 會移除並受 redaction。Payload/headers 不留在 persisted result，限 owner、24 小時到期，存取每分鐘 30 次且有稽核。

建立需 owner 管理的 `canCreateWebhook`；新 webhook 原子授予 creating Agent write。Migration 只授權 active external Agents；platform Agents 零 grants，分享前可能只見空清單。能讀 webhook 才能建 Trigger。Rotate/cancel 需確認與 strict drift。Create/update/rotate/cancel/payload detail 禁止 public；reads 仍需 grant。

Inbound 仍有 HMAC、timestamp、nonce、size、rate、enabled、status、expiry gates。Knowledge 不能新增 action、降低 confirmation、揭露 secret 或授權。
