Repository navigation
feat(channels): grade sender identifier authentication in the ingress kernel - #123782
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 27, 2026, 6:17 AM ET / 10:17 UTC. ClawSweeper reviewWhat this changesThe PR replaces binary mutable-identifier handling in channel ingress allowlists with graded sender-identifier authentication, then updates bundled-channel normalizers and admission receipts. Merge readinessKeep open: the new exact-field authentication policy can reject a valid strict-threshold match when multiple normalized fields share one configured entry ID. The PR is also maintainer-owned and protected by the Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherChannel plugins normalize configured sender entries and inbound identities before the shared ingress kernel decides whether to dispatch a message. That decision also supplies redacted evidence to admitted agent runs. flowchart LR
A[Inbound channel message] --> B[Channel identity adapter]
C[Configured allowlist] --> B
B --> D[Normalized entry and subject pairs]
D --> E[Authentication threshold]
E --> F[Ingress admission decision]
F --> G[Agent dispatch]
F --> H[Redacted admission receipt]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +473, Tests +607, Docs +50. Total +1130 across 26 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Preserve field-specific internal match identity through authentication filtering, add a regression for a shared custom entry ID with differing field strengths, and then land this kernel before the paired SDK migration in the same release. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a deterministic path: use a descriptor whose primary and alias normalize one entry, whose custom ID generator returns one ID per raw entry, and assign the two fields different strengths under a raised minimum. Is this the best way to solve the issue? No. The current filtering keys rejection solely by the diagnostic entry ID, rather than the exact normalized field/pair; preserving a field-specific internal identity is the narrow owner-boundary repair. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f9466af6f54. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer decision recorded (RFC 0027 accepted). As RFC/security owner I accept the four-level contract and, for this pair, I have reviewed and approve the six bundled transport classifications as stated in the conformance table (Discord gateway Decision detail and scope: openclaw/rfcs#51 (comment) Landing order: #123782 first, then #123793. The kernel does not ship alone. |
Move the Twitch role normalizers into the kernel branch and keep Discord name and tag entries on their corresponding identity fields. Repair the same mismatch for Slack name slugs and IRC nick@host entries. Add regressions at the channel authorization boundaries. Related: #123782 Co-authored-by: Omar Shahine <[email protected]>
Keep raw SDK inputs optional and carry required authentication through normalized kernel subjects, entries, and state. Resolve static claims at intake and floor omitted fields in a supplied per-message map to unverified. Remove the deprecated internal policy wrapper, downstream strength fallbacks, and unused type exports. Cover the partial-map floor, static claims, and mutable alias behavior, and document the map contract. Related: #123782
Preserve an authentication effect when other admission contributions were not evaluated. Prefer any affected result, then any evaluated result, before checking for uniformly unevaluated contributions. Cover the mixed case through the existing redacted receipt flow. Related: #123782
Make the ingress fixture drain accepted deliveries on stop, matching the real monitor lifecycle. Await those deliveries directly so prefix and reply assertions cannot race or leak completions into the next case. Related: #123782
6b3c6db to
132fc7c
Compare
|
Maintainer refresh 2026-08-27 (head
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
… kernel (openclaw#123782) * feat(channels): add identifier authentication kernel * fix(channels): preserve exact identity provenance * fix(channels): fail strict dynamic groups closed * fix(channels): bind plugin allowlists to exact identity fields Move the Twitch role normalizers into the kernel branch and keep Discord name and tag entries on their corresponding identity fields. Repair the same mismatch for Slack name slugs and IRC nick@host entries. Add regressions at the channel authorization boundaries. Related: openclaw#123782 Co-authored-by: Omar Shahine <[email protected]> * refactor(channels): resolve identifier authentication at intake Keep raw SDK inputs optional and carry required authentication through normalized kernel subjects, entries, and state. Resolve static claims at intake and floor omitted fields in a supplied per-message map to unverified. Remove the deprecated internal policy wrapper, downstream strength fallbacks, and unused type exports. Cover the partial-map floor, static claims, and mutable alias behavior, and document the map contract. Related: openclaw#123782 * fix(channels): retain affected admission contributions Preserve an authentication effect when other admission contributions were not evaluated. Prefer any affected result, then any evaluated result, before checking for uniformly unevaluated contributions. Cover the mixed case through the existing redacted receipt flow. Related: openclaw#123782 * test(twitch): await monitor delivery before resetting mocks Make the ingress fixture drain accepted deliveries on stop, matching the real monitor lifecycle. Await those deliveries directly so prefix and reply assertions cannot race or leak completions into the next case. Related: openclaw#123782 * fix(feishu): match ambiguous allow entries under both id fields --------- Co-authored-by: Omar Shahine <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Kernel PR of the accepted RFC (openclaw/rfcs#51, tracking #124218). Replaces the closed original #116281. Refreshed 2026-08-27 by maintainer review: rebased onto current
main, four review findings applied, and the exact-field compatibility repairs relocated into this PR so it lands green on its own. #123793 remains the inseparable SDK/migration follow-up; keep both in the same release.What Problem This Solves
Core models one axis of identifier trust:
dangerous(mutable) versus everything else. A session-authenticated Discord snowflake and an attacker-typed SMTPFrom:header are indistinguishable to the allowlist gate. This PR adds the RFC's ordered identifier-authentication scale (verified > asserted > unverified > mutable) evaluated asmin(entry, subject) >= minIdentifierAuthentication(defaultasserted— exactly today's behavior), with exact entry-to-subject match provenance, a per-message subject strength map, receipt integration, and theidentifier_authentication_too_weakreason code. Threat-model item T-ACCESS-002 / recommendation R-008.Why This Change Was Made
identityFieldKey); effective strength is computed per matched entry/subject pair. This resolves the RFC's per-kind-collapse question: a weak same-kind sibling can neither weaken nor borrow from a separately matched identifier.nick@hostentries, and Feishu ambiguous open_id/user_id entries (caught by exact-head CI's wider extension shard; the ambiguous entry now normalizes under both same-kind fields). Each repair is a bounded entry-normalization fix binding entries to their exact owning field, with a failing-before regression test.authenticationmap floors any omitted field key tounverified; an absent map keeps static field resolution. Without this, a per-message channel declaring averifiedceiling would fail open on any code path that forgot the map — the exact incident class the RFC closes. Channels with static strength omit the map entirely and are unaffected.applyMutableIdentifierPolicy(internal-only, not SDK surface) is renamed toapplyIdentifierAuthenticationPolicywith all callers migrated; no deprecated internal alias remains.affectedwhen any contribution's outcome was changed by the policy (previously required all).Shipped
dangerousandmutableIdentifierMatchingremain named deprecations with exact mappings (dangerous: true→mutable; enabled matching → minimummutable); defaults are unchanged for every existing deployment.IdentifierAuthenticationis channel-authorization policy input only — never execution-identity assurance.User Impact
No behavior change on any default path. Release-note context for plugin authors: (1)
IngressReasonCodegainsidentifier_authentication_too_weak— exhaustive switches over the union need a new arm; (2) same-kind allowlist matching is now bound to the exact identity field — an external channel plugin whose entry normalizers place entries under a different field than the subject's same-kind identifier must bind entries to the owning field (see the five bundled repairs in this PR for the pattern); previously such entries matched by kind.Evidence
c93dffd90c98on currentmain; original three commits preserve @omarshahine's authorship.pnpm test:extensionson the stack head green except one pre-existing order-dependent WhatsApp failure reproduced identically on cleanorigin/main(monitor-inbox.policy.test.ts, passes in isolation; unrelated, follow-up filed).check:changedfull plan passed (guards, typechecks, lint, doctor contracts);pnpm buildgreen including plugin-SDK export checks.channel-sender-allowlist— blocked observer produced no outbound, allowlisted driver received the exact marker. Verdict:{"scenarios":[{"name":"Channel sender allowlist block and override","status":"pass","steps":[{"name":"blocks observer and allows driver","status":"pass","details":"QA-ALLOWLIST-OVERRIDE-OK"}]}],"counts":{"total":1,"passed":1,"failed":0,"skipped":0}}