Record missing audit events for 13 authorization lifecycle transitions
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 43/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start with server/src/plugins/route-groups/connections.ts, the plugin store writes, and the historical ledger server/tests/pending-authorization-audit-ledger.test.ts at the linked commit; then inspect current behavior tests for each transition. Add persisted audit assertions for the 13 listed gaps, checking actor, attempt correlation, and safe payload while avoiding secret identifiers and duplicate ending events. Done means every transition has a behavior test that verifies its persisted audit event.
由索引模型根据 Issue 内容生成。
描述
PR #872 removes a source-scanning audit ledger that recorded known gaps but did not prove events fired. This issue preserves its 13 debt entries, as requested in review. These are existing gaps, not new regressions from the test cleanup.
Source ledger: pending-authorization-audit-ledger.test.ts at c19d0653. Most transitions are in server/src/plugins/route-groups/connections.ts; store writes are in server/src/plugins/plugin-store.
Dusty confirmed all 13 gaps are still current. The three items marked Priority below should be addressed first: consent can remain live at the vendor with only a console line as the record.
Missing lifecycle audit coverage
- Claim (
claimAuthorizationAttempt, B5e): record who started which consent attempt. - Expiry overwrite/re-claim (same call, B5e): record the previous attempt's ending before ON CONFLICT replaces it.
- Discard after vendor mint refusal (
arcade-refused-attempt-not-cleared, B5e): record the refusal/ending, not only cleanup-failure logging. - Priority — Discard after successful mint cannot be recorded (
arcade-mint-not-recorded, B5e): record that a consent flow may remain live at the vendor. - Mint recorded (
recordAuthorizationMint,authId: minted.authorizationId, B5e): audit the attempt being bound to a vendor authorization without exposing its secret identifiers. - Vendor reports failed consent (
failAuthorizationAttempt,settled.status === "failed", B5e): record the terminal verdict. - Completed consent has the wrong identity (
failAuthorizationAttempt,settled.userId !== attempt.vendorUserId, B5e): record the attribution refusal. - Context changed and vendor withdrew retired grant (
markAuthorizationWithdrawn, B5e): audit the attempt's verdict; account-disconnection rows alone do not describe it. - Priority — Person no longer permitted to act; grant not withdrawn (
markAuthorizationUnreconciled,arcade-completion-not-permitted, B5e): record the closed attempt and potentially live vendor consent. - Priority — Context changed and withdrawal unconfirmed (
markAuthorizationUnreconciled, B5e): record the unresolved grant rather than only a console line. - App/server removal cascade (
pending_authorizations_server_id_mcp_servers_id_fk, B5e): identify affected in-flight attempts; configuration-change rows currently describe released grants only. - Actor removal cascade (
pending_authorizations_actor_id_users_id_fk, B5e): identify attempts that die with the actor, including potentially live vendor consent. - Cancel loses race to completion (
That authorization finished before it could be cancelled, B2c): audit the refused cancellation (409) even though no pending row is deleted.
Acceptance
Exercise each transition through behavior tests and assert the persisted audit event, actor, attempt correlation, and safe payload. Do not log bearer consent URLs or live authorization IDs. Keep the existing successful completion and cancellation events; avoid duplicate attempt-ending events when a cancelled attempt is encountered by a late mint/completion. The original ledger waived those two late-return branches because cancellation had already been audited.
Re-check each gap against current code when implementing; the list preserves the historical findings rather than claiming a new runtime reproduction of all 13.
- 主要语言
- TypeScript
- 星标
- 7.1k
- 派生
- 962
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 143
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CopilotKit/OpenBot 的其他 Issue
-
Composio plugin sends x-api-key, but connect.composio.dev/mcp requires x-consumer-api-key可能已有人在做 @azmi2409 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
CopilotKit/OpenBot#817 · 2 条评论 ·
维护者通常 1 天内回复
-
Wrong key location at startup可能已有人在做 @charan-rathore 于 12 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 68/100
CopilotKit/OpenBot#800 ·
维护者通常 1 天内回复
-
setup-learning.ts fails on Windows with "spawn npx.cmd EINVAL"可能已有人在做 @Caldas 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
CopilotKit/OpenBot#792 ·
维护者通常 1 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 56/100
CopilotKit/OpenBot#891 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
CopilotKit/OpenBot#890 · 2 条评论 ·
维护者通常 1 天内回复
查看 CopilotKit/OpenBot 的全部 Issue
相似的 Issue
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 67/100
anthropics/claude-code#106183 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
feature:App-Tour feature:Chat ready Web
难度 2/5 1-3 小时 新手友好度 62/100
digitalfabrik/integreat-app#4523 · 2 个 reaction ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Required Lexical field accepts two empty paragraphs可能已有人在做 @lazerg 今天认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 76/100
payloadcms/payload#19222 ·
维护者通常 1 天内回复