Skip to content

fix(gateway): add Signal to platform_group_user_env_map for group message auth - #58187

Open
tilllt wants to merge 1 commit into
NousResearch:mainfrom
tilllt:fix/add-signal-group-user-allowlist
Open

fix(gateway): add Signal to platform_group_user_env_map for group message auth#58187
tilllt wants to merge 1 commit into
NousResearch:mainfrom
tilllt:fix/add-signal-group-user-allowlist

Conversation

@tilllt

@tilllt tilllt commented Jul 4, 2026

Copy link
Copy Markdown

What

Adds Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS" to platform_group_user_env_map in gateway/authz_mixin.py.

Why

Signal group messages that pass the adapter-level filter (group allowlist + mention check) are rejected by _is_user_authorized() because Platform.SIGNAL is missing from platform_group_user_env_map. When SIGNAL_ALLOWED_USERS is set (e.g. to restrict DM access), the auth layer only checks the sender against SIGNAL_ALLOWED_USERS and 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's TELEGRAM_GROUP_ALLOWED_USERS handling. Users can then add sender phone numbers to SIGNAL_GROUP_ALLOWED_USERS alongside the group IDs already there.

How to test

  1. Set SIGNAL_GROUP_ALLOWED_USERS=<group_id>,<sender_number> in .env
  2. Have a known sender mention the bot in the group
  3. The message should now be authorized instead of being silently dropped

Related

Fixes #58175

Platforms tested

  • Linux (Debian) — code change is a one-line dict entry, no platform-specific behavior

…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
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/signal Signal CLI adapter area/auth Authentication, OAuth, credential pools P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #44706 (earliest open canonical) — both add the same Platform.SIGNAL: "SIGNAL_GROUP_ALLOWED_USERS" entry to platform_group_user_env_map in gateway/authz_mixin.py to authorize Signal group senders. Same one-line mechanism as #52240 (also a duplicate of #44706). All three fix #58175; a maintainer should pick one. Related: #58175, #52240.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@teknium1 teknium1 added sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists platform/signal Signal CLI adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signal group messages rejected by _is_user_authorized despite passing adapter-level filter

4 participants