Skip to content

chat chmod: chat.message:send 缺少服务端参数化授权规则 #765

Description

@HenryQin818

问题

DWS v1.0.54 的参数化授权命令能够正确构造请求,但服务端 im/chat_permission_grant 返回:

INVALID_PARAM: scope未配置授权规则 chat.message:send

脱敏复现命令:

dws chat chmod chat.message:send \
  --agentCode wukong \
  --grant-type timed \
  --ttl 1h \
  --open-dingtalk-id "<EXACT_TARGET_OPEN_DINGTALK_ID>" \
  --permParam msgType=file

CLI 提交的核心参数为:

{
  "scope": "chat.message:send",
  "grantType": "timed",
  "ttl": "1h",
  "grantParams": "{\"openDingTalkId\":\"<EXACT_TARGET_OPEN_DINGTALK_ID>\",\"msgType\":\"file\"}"
}

期望

请在授权规则维护侧注册并启用 chat.message:send 的参数化规则,至少同时校验:

  • 精确单聊目标 openDingTalkId
  • 消息类型 msgType=file
  • grantType=timedttl=1h

如果服务端已有语义等价 scope,请提供已注册 scope 名称,并确认它能够同时约束上述三个维度。不能用不支持参数约束或 1 小时 TTL 的通用 PAT scope 替代。

安全说明

  • 未在 issue 中披露真实接收人标识或任何凭据。
  • 复现失败后未重试授权、上传或发送。
  • 规则生效前不建议扩大授权或改用 permanent/session 授权绕过。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions