Feat/feishu: group chat allowlist - #29709
Conversation
cef712e to
9e9a49e
Compare
|
@teknium1 hello, pls review this mr |
|
Thanks for pointing out the overlap with #33715. I updated this PR to consolidate the useful additions from that PR here:
Focused test run: |
…hat-allowlist # Conflicts: # website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md # website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/feishu.md
|
Follow-up: I also added the zh-Hans documentation coverage from #33715 and merged current Additional coverage now includes:
Re-ran the focused test after the merge: |
|
Thanks for the focused implementation, regression coverage, and the consolidation of the related #33715 documentation work. This automated hermes-sweeper review is closing the PR because its user-facing configuration mechanism conflicts with a standing policy.
Closed as not-planned per standing maintainer policy ( Closed as not-planned per standing maintainer policy ( |
What does this PR do?
Adds Feishu support for chat-scoped group authorization via
FEISHU_GROUP_ALLOWED_CHATS.Previously, Feishu group messages could pass the Feishu adapter's group policy, but could still be rejected by the gateway's global user authorization layer unless the sender was individually authorized through pairing or
FEISHU_ALLOWED_USERS.That made it hard to support this deployment mode:
FEISHU_ALLOW_ALL_USERS=true, which would open access globallyThis PR wires
FEISHU_GROUP_ALLOWED_CHATSinto the gateway authorization checks for Feishu, matching the existing chat-scoped authorization pattern used by other platforms.Related Issue
No existing issue.
Type of Change
Changes Made
gateway/run.pyFEISHU_GROUP_ALLOWED_CHATSto pass authorization without requiring every sender to be individually paired.tests/gateway/test_feishu_bot_auth_bypass.pyFEISHU_GROUP_ALLOWED_CHATS.website/docs/user-guide/messaging/feishu.mdFEISHU_GROUP_ALLOWED_CHATS.FEISHU_ALLOW_ALL_USERS=false.How to Test
Run the focused gateway test:
venv/bin/python -m pytest tests/gateway/test_feishu_bot_auth_bypass.py -q -o 'addopts='Confirm the test passes:
Optional manual verification with Feishu gateway configuration:
Expected behavior:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Focused test run: