Skip to content

Commit f64b660

Browse files
committed
docs: document access groups
1 parent 20945b8 commit f64b660

7 files changed

Lines changed: 197 additions & 8 deletions

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Telegraph style. Root rules only. Read scoped `AGENTS.md` before subtree work.
144144
- Docs change with behavior/API. Use docs list/read_when hints; docs links per `docs/AGENTS.md`.
145145
- Docs final answers: when doc files changed, end with the relevant full `https://docs.openclaw.ai/...` URL(s).
146146
- Changelog user-facing only; fixing an issue or landing/merging a PR needs one unless pure test/internal.
147-
- Changelog placement: active version `### Changes`/`### Fixes`; every added entry must include at least one `Thanks @author` attribution, using credited GitHub username(s). Never add `Thanks @codex`, `Thanks @openclaw`, or `Thanks @steipete`.
147+
- Changelog placement: active version `### Changes`/`### Fixes`; contributor-facing added entries should include at least one `Thanks @author` attribution, using credited human GitHub username(s). Never add `Thanks @codex`, `Thanks @openclaw`, `Thanks @clawsweeper`, or `Thanks @steipete`; for maintainer-owned or automation-only changes, omit the thanks instead of inventing credit.
148148
- Changelog bullets are always single-line. No wrapping/continuation across multiple lines. Long entries stay on one long line so dedupe, PR-ref, and credit-audit tooling work and so the visual style stays uniform.
149149

150150
## Git

‎CHANGELOG.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Docs: https://docs.openclaw.ai
88

99
- Providers/OpenAI: add `extraBody`/`extra_body` passthrough for OpenAI-compatible TTS endpoints, so custom speech servers can receive fields such as `lang` in `/audio/speech` requests. Fixes #39900. Thanks @R3NK0R.
1010
- Dependencies: refresh workspace dependency pins, including TypeBox 1.1.37, AWS SDK 3.1041.0, Microsoft Teams 2.0.9, and Marked 18.0.3. Thanks @mariozechner, @aws, and @microsoft.
11-
- Discord/channels: add reusable message-channel access groups plus Discord channel-audience DM authorization, so allowlists can reference `accessGroup:<name>` across channel auth paths. (#75813) Thanks @clawsweeper.
11+
- Discord/channels: add reusable message-channel access groups plus Discord channel-audience DM authorization, so allowlists can reference `accessGroup:<name>` across channel auth paths. (#75813)
1212

1313
### Fixes
1414

@@ -69,7 +69,7 @@ Docs: https://docs.openclaw.ai
6969
- Discord/voice: rerun configured voice auto-join after Discord gateway RESUMED events and ignore already-destroyed stale voice connections during reconnect cleanup, so health-monitor account restarts can rejoin configured channels. Fixes #40665. Thanks @liz709.
7070
- Plugins/CLI: reuse the cold manifest registry while building plugin status and inspect reports, so large configured plugin sets no longer rediscover the bundled/plugin registry once per inspect row. Thanks @vincentkoc.
7171
- Discord/voice: lengthen the default voice join Ready wait, add configurable `voice.connectTimeoutMs`/`voice.reconnectGraceMs`, and warn before destroying unrecovered disconnected sessions so slow Discord voice handshakes and reconnects no longer fail silently. Fixes #63098; refs #39825 and #65039. Thanks @darealgege, @kzicherman, and @ayochim.
72-
- Gateway/health: refresh cached health RPC snapshots when channel runtime state diverges, so Discord and other channel status reads no longer report stale running or connected values until the cache TTL expires. (#75423) Thanks @clawsweeper.
72+
- Gateway/health: refresh cached health RPC snapshots when channel runtime state diverges, so Discord and other channel status reads no longer report stale running or connected values until the cache TTL expires. (#75423)
7373
- Gateway/sessions: keep session-store reads from running stale prune and entry-count cap maintenance during startup, so oversized stores no longer block chat history readiness after updates while writes and `sessions cleanup --enforce` still preserve the cleanup safeguards. Fixes #70050. Thanks @tangda18.
7474
- Security/audit: keep plain `security audit` on the cold config/filesystem path and reserve plugin runtime security collectors for `--deep`, so large plugin installs cannot execute every plugin runtime during routine audits. Thanks @vincentkoc.
7575
- Discord/voice: merge configured media-understanding providers such as Deepgram into partial active provider registries, so follow-up voice turns keep transcribing after another media plugin is already active. Fixes #65687. Thanks @OneMintJulep.
@@ -266,7 +266,7 @@ Docs: https://docs.openclaw.ai
266266
- Gateway/models: serve the last successful model catalog while stale reloads refresh in the background, so Gateway control-plane and OpenAI-compatible requests no longer block behind model-provider rediscovery after model config changes. Refs #74135, #74630, and #74633. Thanks @DerFlash, @moltar-bot, and @Saboor711.
267267
- CLI/status: resolve read-only channel setup runtime fallback from the packaged OpenClaw dist root, so `status --all`, `status --deep`, channel, and doctor paths do not crash when an external channel plugin needs setup metadata. Fixes #74693. Thanks @giangthb.
268268
- SDK/events: keep per-run SDK event streams from surfacing duplicate raw chat projection frames, while normalizing chat-only projection frames and preserving raw access through `rawEvents`. Refs #74704. Thanks @BunsDev.
269-
- SDK: report Gateway terminal `agent.wait` timeout snapshots with lifecycle metadata as `timed_out` while keeping bare wait deadlines non-terminal. Thanks @clawsweeper.
269+
- SDK: report Gateway terminal `agent.wait` timeout snapshots with lifecycle metadata as `timed_out` while keeping bare wait deadlines non-terminal.
270270
- Google Meet: block managed Chrome intro/test speech until browser health proves the participant is in-call, and expose `speechReady` diagnostics so login, admission, permission, and audio-bridge blockers no longer look like successful speech. Refs #72478. Thanks @DougButdorf.
271271
- Slack/commands: keep native command argument menus on select controls for encoded choice values up to Slack's option limit and truncate fallback button labels to Slack's button-text limit, so long valid choices no longer render invalid Slack blocks. Thanks @slackapi.
272272
- Agents/Codex: flush accepted debounced steering messages before normal app-server turn cleanup, so inbound follow-ups acknowledged as queued are not dropped when the turn completes before the debounce fires. Thanks @vincentkoc.

‎docs/channels/access-groups.md‎

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
summary: "Reusable sender allowlists for message channels"
3+
read_when:
4+
- Configuring the same allowlist across multiple message channels
5+
- Sharing DM and group sender access rules
6+
- Reviewing message-channel access control
7+
title: "Access groups"
8+
---
9+
10+
Access groups are named sender lists you define once and reference from channel allowlists with `accessGroup:<name>`.
11+
12+
Use them when the same people should be allowed across several message channels, or when one trusted set should apply to both DMs and group sender authorization.
13+
14+
Access groups do not grant access by themselves. A group only matters when an allowlist field references it.
15+
16+
## Static message sender groups
17+
18+
Static sender groups use `type: "message.senders"`.
19+
20+
```json5
21+
{
22+
accessGroups: {
23+
operators: {
24+
type: "message.senders",
25+
members: {
26+
"*": ["global-owner-id"],
27+
discord: ["discord:123456789012345678"],
28+
telegram: ["987654321"],
29+
whatsapp: ["+15551234567"],
30+
},
31+
},
32+
},
33+
}
34+
```
35+
36+
Member lists are keyed by message-channel id:
37+
38+
| Key | Meaning |
39+
| ---------- | ----------------------------------------------------------------------- |
40+
| `"*"` | Shared entries checked for every message channel that references group. |
41+
| `discord` | Entries checked only for Discord allowlist matching. |
42+
| `telegram` | Entries checked only for Telegram allowlist matching. |
43+
| `whatsapp` | Entries checked only for WhatsApp allowlist matching. |
44+
45+
Entries are matched with the destination channel's normal `allowFrom` rules. OpenClaw does not translate sender ids between channels. If Alice has a Telegram id and a Discord id, list both ids under the appropriate keys.
46+
47+
## Reference groups from allowlists
48+
49+
Reference a group with `accessGroup:<name>` anywhere the message channel path supports sender allowlists.
50+
51+
DM allowlist example:
52+
53+
```json5
54+
{
55+
accessGroups: {
56+
operators: {
57+
type: "message.senders",
58+
members: {
59+
discord: ["discord:123456789012345678"],
60+
telegram: ["987654321"],
61+
},
62+
},
63+
},
64+
channels: {
65+
discord: {
66+
dmPolicy: "allowlist",
67+
allowFrom: ["accessGroup:operators"],
68+
},
69+
telegram: {
70+
dmPolicy: "allowlist",
71+
allowFrom: ["accessGroup:operators"],
72+
},
73+
},
74+
}
75+
```
76+
77+
Group sender allowlist example:
78+
79+
```json5
80+
{
81+
accessGroups: {
82+
oncall: {
83+
type: "message.senders",
84+
members: {
85+
whatsapp: ["+15551234567"],
86+
googlechat: ["users/1234567890"],
87+
},
88+
},
89+
},
90+
channels: {
91+
whatsapp: {
92+
groupPolicy: "allowlist",
93+
groupAllowFrom: ["accessGroup:oncall"],
94+
},
95+
googlechat: {
96+
spaces: {
97+
"spaces/AAA": {
98+
users: ["accessGroup:oncall"],
99+
},
100+
},
101+
},
102+
},
103+
}
104+
```
105+
106+
You can mix groups and direct entries:
107+
108+
```json5
109+
{
110+
channels: {
111+
discord: {
112+
dmPolicy: "allowlist",
113+
allowFrom: ["accessGroup:operators", "discord:123456789012345678"],
114+
},
115+
},
116+
}
117+
```
118+
119+
## Supported message-channel paths
120+
121+
Access groups are available in shared message-channel authorization paths, including:
122+
123+
- DM sender allowlists such as `channels.<channel>.allowFrom`
124+
- group sender allowlists such as `channels.<channel>.groupAllowFrom`
125+
- channel-specific per-room sender allowlists that use the same sender matching rules
126+
- command authorization paths that reuse message-channel sender allowlists
127+
128+
Channel support depends on whether that channel is wired through the shared OpenClaw sender-authorization helpers. Current bundled support includes Discord, Google Chat, Nostr, WhatsApp, Zalo, and Zalo Personal. Static `message.senders` groups are designed to be channel-agnostic, so new message channels should support them by using the shared plugin SDK helpers instead of custom allowlist expansion.
129+
130+
## Discord channel audiences
131+
132+
Discord also supports a dynamic access group type:
133+
134+
```json5
135+
{
136+
accessGroups: {
137+
maintainers: {
138+
type: "discord.channelAudience",
139+
guildId: "1456350064065904867",
140+
channelId: "1456744319972282449",
141+
membership: "canViewChannel",
142+
},
143+
},
144+
channels: {
145+
discord: {
146+
dmPolicy: "allowlist",
147+
allowFrom: ["accessGroup:maintainers"],
148+
},
149+
},
150+
}
151+
```
152+
153+
`discord.channelAudience` means "allow Discord DM senders who can currently view this guild channel." OpenClaw resolves the sender through Discord at authorization time and applies Discord `ViewChannel` permission rules.
154+
155+
Use this when a Discord channel is already the source of truth for a team, such as `#maintainers` or `#on-call`.
156+
157+
Requirements and failure behavior:
158+
159+
- The bot needs access to the guild and channel.
160+
- The bot needs the Discord Developer Portal **Server Members Intent**.
161+
- The access group fails closed when Discord returns `Missing Access`, the sender cannot be resolved as a guild member, or the channel belongs to another guild.
162+
163+
More Discord-specific examples: [Discord access control](/channels/discord#access-control-and-routing)
164+
165+
## Security notes
166+
167+
- Access groups are allowlist aliases, not roles. They do not create owners, approve pairing requests, or grant tool permissions by themselves.
168+
- `dmPolicy: "open"` still requires `"*"` in the effective DM allowlist. Referencing an access group is not the same as public access.
169+
- Missing group names fail closed. If `allowFrom` contains `accessGroup:operators` and `accessGroups.operators` is absent, that entry authorizes nobody.
170+
- Keep channel ids stable. Prefer numeric/user ids over display names when the channel supports both.
171+
172+
## Troubleshooting
173+
174+
If a sender should match but is blocked:
175+
176+
1. Confirm the allowlist field contains the exact `accessGroup:<name>` reference.
177+
2. Confirm `accessGroups.<name>.type` is correct.
178+
3. Confirm the sender id is listed under the matching channel key, or under `"*"`.
179+
4. Confirm the entry uses that channel's normal allowlist syntax.
180+
5. For Discord channel audiences, confirm the bot can see the guild channel and has Server Members Intent enabled.
181+
182+
Run `openclaw doctor` after editing access-control config. It catches many invalid allowlist and policy combinations before runtime.

‎docs/channels/discord.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ Example:
452452
<Tab title="DM access groups">
453453
Discord DMs can use dynamic `accessGroup:<name>` entries in `channels.discord.allowFrom`.
454454

455-
Access group names are shared across message channels. Use `type: "message.senders"` for a static group whose members are expressed in each channel's normal `allowFrom` syntax, or `type: "discord.channelAudience"` when a Discord channel's current `ViewChannel` audience should define membership dynamically.
455+
Access group names are shared across message channels. Use `type: "message.senders"` for a static group whose members are expressed in each channel's normal `allowFrom` syntax, or `type: "discord.channelAudience"` when a Discord channel's current `ViewChannel` audience should define membership dynamically. Shared access-group behavior is documented here: [Access groups](/channels/access-groups).
456456

457457
```json5
458458
{

‎docs/channels/groups.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ If you want...
115115
| Disable all group replies | `groupPolicy: "disabled"` |
116116
| Only specific groups | `groups: { "<group-id>": { ... } }` (no `"*"` key) |
117117
| Only you can trigger in groups | `groupPolicy: "allowlist"`, `groupAllowFrom: ["+1555..."]` |
118+
| Reuse one trusted sender set across channels | `groupAllowFrom: ["accessGroup:operators"]` |
119+
120+
For reusable sender allowlists, see [Access groups](/channels/access-groups).
118121

119122
## Session keys
120123

‎docs/channels/pairing.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,18 @@ Supported channels: `bluebubbles`, `discord`, `feishu`, `googlechat`, `imessage`
4949

5050
### Reusable sender groups
5151

52-
Use top-level `accessGroups` when the same trusted sender set should apply to multiple message channels or to both DM and group allowlists. Static sender groups use `type: "message.senders"` and list members in each channel's normal `allowFrom` syntax.
52+
Use top-level `accessGroups` when the same trusted sender set should apply to
53+
multiple message channels or to both DM and group allowlists.
54+
55+
Static groups use `type: "message.senders"` and are referenced with
56+
`accessGroup:<name>` from channel allowlists:
5357

5458
```json5
5559
{
5660
accessGroups: {
5761
operators: {
5862
type: "message.senders",
5963
members: {
60-
"*": ["global-owner-id"],
6164
discord: ["discord:123456789012345678"],
6265
telegram: ["987654321"],
6366
whatsapp: ["+15551234567"],
@@ -71,7 +74,7 @@ Use top-level `accessGroups` when the same trusted sender set should apply to mu
7174
}
7275
```
7376

74-
The `"*"` member list is shared by all message channels. Channel-specific lists are checked with that channel's own sender matching rules.
77+
Access groups are documented in detail here: [Access groups](/channels/access-groups)
7578

7679
### Where the state lives
7780

‎docs/docs.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@
10931093
"group": "Configuration",
10941094
"pages": [
10951095
"channels/pairing",
1096+
"channels/access-groups",
10961097
"channels/group-messages",
10971098
"channels/groups",
10981099
"channels/broadcast-groups",

0 commit comments

Comments
 (0)