Repository navigation
fix(channels): declare verified sender identity for Nostr, Buzz, Twitch and ClickClack - #205184
Merged
Merged
Conversation
…ch and ClickClack Each plugin's identity declaration moves into its own ingress-identity.ts, used by the transport, and declares `verified`: Nostr and Buzz drop events whose signature does not verify against the sender pubkey, Twitch sets the user-id tag on the authenticated chat connection, and ClickClack reads the author from the server's copy of the message. Owner cells added. Co-authored-by: obviyus <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Collaborator
Author
|
Pre-push on
|
Collaborator
Author
|
Head
|
Collaborator
Author
|
Landed as cc4a167. Owners listed in |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 26, 2026
…ch and ClickClack (openclaw#205184) ## Problem Follow-up to openclaw#205155 (OA2 D23). Since openclaw#204904, a sender listed in `commands.ownerAllowFrom` on a channel that declares its sender id `verified` is the Gateway owner, with the same grant as the owner's Control UI turn (operator tools, `github_publish`, PR actions). Nostr, Buzz, Twitch and ClickClack prove the sender, but still used the default `asserted`. An owner on those channels kept owner-only tools but got no operator grant, so `github_publish` told them "This channel cannot confirm who you are … use Control UI, Discord or Telegram". openclaw#205155 left them out only because their declarations sat inside transport loops, where an owner cell could not run them without a test-only export. ## Fix Each plugin's identity declaration moves, unchanged, into its own `src/ingress-identity.ts`, which the transport imports, and declares `authentication: "verified"`. No core change. | Channel | Why the sender id is proven (checked in the transport) | |---|---| | Nostr | `nostr-bus.ts` runs `verifyEvent` (canonical hash + Schnorr signature against `event.pubkey`) on every DM before sender policy and decryption; invalid signatures are dropped as permanent errors. The sender id is `event.pubkey`. | | Buzz | The relay client is `nostr-tools` `Relay`, which runs `verifyEvent` on every `EVENT` before `onevent` (`relay.js` in 2.25.4, the pinned version); failing events go to `oninvalidevent`. The connection is NIP-42 authenticated and messages are admitted only from room members. The sender id is `event.pubkey`. | | Twitch | `twitch-client.ts` reads `msg.userInfo.userId`, the `user-id` tag Twitch's server sets on each message delivered over the OAuth-authenticated chat connection; clients cannot set server tags. Both the allowlist and the role identity use it as the primary id; role aliases stay `asserted` (roles are not a person). | | ClickClack | `gateway.ts` treats the pushed event as a routing hint and re-fetches the message from the server API with the bot token; `author_id` comes from the server's own copy. | Files: `extensions/{nostr,buzz,twitch,clickclack}/src/ingress-identity.ts` (new, holds the moved declaration and its normalizers); the transports import it; each plugin gets a one-line `test-api.ts` (same pattern as openclaw#205155). Docs: `gateway/config-channels/commands.md` adds the four channels to the list that proves the sender. ## Decisions (recorded, not asked) - **Production lines are not net negative** (+16: four `authentication` lines, their reasons, and the new modules' imports/exports). The declarations themselves move unchanged; the behavior is the requested one, and there is nothing in these paths to cut. - **Relay trust for Nostr/Buzz is cryptographic**, not transport-level: a relay cannot forge a signature for another pubkey. Accepted edge, no code: a Twitch or ClickClack server the operator points the plugin at is trusted to report the sender, the same as Telegram's API root in openclaw#205155. ## User impact - An owner on Nostr, Buzz, Twitch or ClickClack gets the same permissions as in the Control UI (operator tools, `github_publish`, PR actions), with no Control UI step. - A linked person on those channels gets their profile's Control UI grant (same rule as the other verified channels). - Other senders: no change. Allowlists, pairing and role policy are untouched. ## Evidence - **Owner cells** in `test/channel-verified-owner.integration.test.ts`: Nostr, Buzz, Twitch (allowlist policy), Twitch (role policy), ClickClack. Each runs the plugin's real declaration through the real host ingress and context builder with the real plugin registered, and asserts the owner profile with `operator.admin`. Head: 14/14. **With the four declarations set back to `asserted`: the 5 new cells fail** (`expected undefined to be 'gateway-owner'`), the 9 existing cells pass. - Pre-push, E2E and CI: comments below. Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot
added a commit
that referenced
this pull request
Nov 30, 2026
Release adaptation: Select the existing turn authority as the requester source; retain stable invocation, workflow, and data fences. Companions: #205082 and #205173 affect automations, #205155 and #205184 affect channel trust, and #205232 affects reply dispatch; none is a prerequisite to selecting the already-admitted requester. (cherry picked from commit ddc8340) Co-authored-by: RomneyDa <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow-up to #205155 (OA2 D23). Since #204904, a sender listed in
commands.ownerAllowFromon a channel that declares its sender idverifiedis the Gateway owner, with the same grant as the owner's Control UI turn (operator tools,github_publish, PR actions).Nostr, Buzz, Twitch and ClickClack prove the sender, but still used the default
asserted. An owner on those channels kept owner-only tools but got no operator grant, sogithub_publishtold them "This channel cannot confirm who you are … use Control UI, Discord or Telegram". #205155 left them out only because their declarations sat inside transport loops, where an owner cell could not run them without a test-only export.Fix
Each plugin's identity declaration moves, unchanged, into its own
src/ingress-identity.ts, which the transport imports, and declaresauthentication: "verified". No core change.nostr-bus.tsrunsverifyEvent(canonical hash + Schnorr signature againstevent.pubkey) on every DM before sender policy and decryption; invalid signatures are dropped as permanent errors. The sender id isevent.pubkey.nostr-toolsRelay, which runsverifyEventon everyEVENTbeforeonevent(relay.jsin 2.25.4, the pinned version); failing events go tooninvalidevent. The connection is NIP-42 authenticated and messages are admitted only from room members. The sender id isevent.pubkey.twitch-client.tsreadsmsg.userInfo.userId, theuser-idtag Twitch's server sets on each message delivered over the OAuth-authenticated chat connection; clients cannot set server tags. Both the allowlist and the role identity use it as the primary id; role aliases stayasserted(roles are not a person).gateway.tstreats the pushed event as a routing hint and re-fetches the message from the server API with the bot token;author_idcomes from the server's own copy.Files:
extensions/{nostr,buzz,twitch,clickclack}/src/ingress-identity.ts(new, holds the moved declaration and its normalizers); the transports import it; each plugin gets a one-linetest-api.ts(same pattern as #205155).Docs:
gateway/config-channels/commands.mdadds the four channels to the list that proves the sender.Decisions (recorded, not asked)
authenticationlines, their reasons, and the new modules' imports/exports). The declarations themselves move unchanged; the behavior is the requested one, and there is nothing in these paths to cut.User impact
github_publish, PR actions), with no Control UI step.Evidence
test/channel-verified-owner.integration.test.ts: Nostr, Buzz, Twitch (allowlist policy), Twitch (role policy), ClickClack. Each runs the plugin's real declaration through the real host ingress and context builder with the real plugin registered, and asserts the owner profile withoperator.admin. Head: 14/14. With the four declarations set back toasserted: the 5 new cells fail (expected undefined to be 'gateway-owner'), the 9 existing cells pass.