You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makes Feishu's existing config.yamlgroup_rules access policy authoritative at the gateway layer.
An exact group_rules.<chat_id> entry is a chat-scoped allowlist. In particular, policy: open allows everyone in that named group without granting DM access or access from other groups.
Supersedes #61376, which introduced a new environment variable for the same behavior.
Details
Declares that the Feishu adapter enforces its config-driven group policy at intake.
Lets gateway authorization trust only exact, active group_rules entries that already passed adapter policy.
Supports existing open, allowlist, blacklist, and admin_only rules.
Does not trust disabled rules.
Does not treat top-level/default group_policy: open as authorization.
Preserves existing DM, pairing, global allowlist, and profile-isolation behavior.
Documents the chat-scoped authorization semantics.
No new environment variable or configuration surface is introduced.
Thanks for the focused config-driven authorization fix. Current main still has the reported gap: Feishu applies an exact group_rules policy before dispatch (plugins/platforms/feishu/adapter.py:4270-4275, :4301-4325), but gateway authorization only trusts adapters declaring enforces_own_access_policy (gateway/authz_mixin.py:491-512); Feishu has no override and the base default is false (gateway/platforms/base.py:2412-2437). The no-environment-allowlist path consequently reaches default deny (gateway/authz_mixin.py:513-514).
The proposed exact active-rule check preserves the existing distinction between an operator-named chat rule and broad/default group_policy: open, and the added tests cover the key boundary cases.
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
area/authAuthentication, OAuth, credential poolscomp/gatewayGateway runner, session dispatch, deliveryP2Medium — degraded but workaround existsplatform/feishuFeishu / Lark adaptersweeper:blast-moderateSweeper blast radius: moderate — a subsystem or single platformsweeper:risk-security-boundarySweeper risk: may affect sandboxing, auth, credentials, or sensitive datatype/bugSomething isn't working
3 participants
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.
Summary
Makes Feishu's existing
config.yamlgroup_rulesaccess policy authoritative at the gateway layer.An exact
group_rules.<chat_id>entry is a chat-scoped allowlist. In particular,policy: openallows everyone in that named group without granting DM access or access from other groups.Supersedes #61376, which introduced a new environment variable for the same behavior.
Details
group_rulesentries that already passed adapter policy.open,allowlist,blacklist, andadmin_onlyrules.disabledrules.group_policy: openas authorization.No new environment variable or configuration surface is introduced.
Validation
scripts/run_tests.sh tests/gateway/test_feishu_bot_auth_bypass.py tests/gateway/test_config_driven_access_policy.py tests/gateway/test_feishu.py tests/gateway/test_multiplex_profile_authz.py -qruff checkon changed Python filesgit diff --check