fix(gateway): add Signal to platform_group_user_env_map for group message auth - #58187
fix(gateway): add Signal to platform_group_user_env_map for group message auth#58187tilllt wants to merge 1 commit into
Conversation
…orization Signal group messages that pass the adapter-level filter (group allowlist + mention check) were being rejected by _is_user_authorized() because Platform.SIGNAL was missing from platform_group_user_env_map. When SIGNAL_ALLOWED_USERS was set, the auth layer skipped the adapter-policy path and checked the sender only against SIGNAL_ALLOWED_USERS (typically the bot's own number), ignoring the adapter's group-level filtering. Adding Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS" makes the authorization layer also check the group-specific sender allowlist for Signal group messages, consistent with Telegram's TELEGRAM_GROUP_ALLOWED_USERS handling. Fixes NousResearch#58175
Duplicate of #44706 (earliest open canonical) — both add the same |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM (token read-only; formal approval deferred to maintainer)
One-line fix: adds Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS" to platform_group_user_env_map in gateway/authz_mixin.py. Without this, Signal group messages that pass the adapter-level filter were rejected by _is_user_authorized() because Signal was missing from the group-user env map.
Looks Good
- Minimal, targeted change
- Clear root cause in PR description
Reviewed by Hermes Agent
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Comment (token read-only; formal approval not possible)
One-line fix: adds Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS" to platform_group_user_env_map so Signal group messages are authorized against the group-specific sender allowlist, consistent with Telegram.
- Clean single-file, single-line fix
- Well-documented root cause and behavior change
Reviewed by Hermes Agent
What
Adds
Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS"toplatform_group_user_env_mapingateway/authz_mixin.py.Why
Signal group messages that pass the adapter-level filter (group allowlist + mention check) are rejected by
_is_user_authorized()becausePlatform.SIGNALis missing fromplatform_group_user_env_map. WhenSIGNAL_ALLOWED_USERSis set (e.g. to restrict DM access), the auth layer only checks the sender againstSIGNAL_ALLOWED_USERSand skips the adapter-policy path — effectively blocking all group messages from known senders.Fix
Adding
Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS"makes the authorization layer also check the group-specific sender allowlist for Signal group messages, consistent with Telegram'sTELEGRAM_GROUP_ALLOWED_USERShandling. Users can then add sender phone numbers toSIGNAL_GROUP_ALLOWED_USERSalongside the group IDs already there.How to test
SIGNAL_GROUP_ALLOWED_USERS=<group_id>,<sender_number>in.envRelated
Fixes #58175
Platforms tested