开发者社区 问答 正文

如何查看鉴权规则?



移动推送 API 发生子账号访问主账号资源时的鉴权规则


当子账号通过 移动推送 Open API 对主账号的 APP 资源进行访问时,移动推送后台向 RAM 进行权限检查,以确保资源拥有者的确将相关资源的相关权限授予了调用者。
每个不同的 移动推送 API 会根据涉及到的资源以及 API 的语义来确定需要检查哪些资源的权限。具体地,每个 API 的鉴权规则见下表
APP相关

Action鉴权规则
mpush:ListSummaryAppsacs:mhub:*:$accountid:app/*

推送相关
Action鉴权规则
mpush:Pushacs:mhub:*:$accountid:app/$AppKey
mpush:PushMessageToAndroidacs:mhub:*:$accountid:app/$AppKey
mpush:PushMessageToiOSacs:mhub:*:$accountid:app/$AppKey
mpush:PushNoticeToAndroidacs:mhub:*:$accountid:app/$AppKey
mpush:PushNoticeToiOSacs:mhub:*:$accountid:app/$AppKey
mpush:CancelPushacs:mhub:*:$accountid:app/$AppKey

设备绑定
Action鉴权规则
mpush:QueryAliasesacs:mhub:*:$accountid:app/$AppKey
mpush:BindAliasacs:mhub:*:$accountid:app/$AppKey
mpush:UnbindAliasacs:mhub:*:$accountid:app/$AppKey
mpush:QueryTagsacs:mhub:*:$accountid:app/$AppKey
mpush:ListTagsacs:mhub:*:$accountid:app/$AppKey
mpush:BindTagacs:mhub:*:$accountid:app/$AppKey
mpush:UnbindTagacs:mhub:*:$accountid:app/$AppKey

查询与统计
Action鉴权规则
mpush:QueryUniqueDeviceStatacs:mhub:*:$accountid:app/$AppKey
mpush:QueryPushStatByAppacs:mhub:*:$accountid:app/$AppKey
mpush:QueryDeviceStatacs:mhub:*:$accountid:app/$AppKey
mpush:ListPushRecordsacs:mhub:*:$accountid:app/$AppKey
mpush:QueryPushStatByMsgacs:mhub:*:$accountid:app/$AppKey
mpush:CheckDevicesacs:mhub:*:$accountid:app/$AppKey
mpush:QueryDeviceInfoacs:mhub:*:$accountid:app/$AppKey

展开
收起
猫饭先生 2017-10-23 10:45:04 1470 分享 版权
阿里云 AI 助理回答

当子账号通过移动推送 Open API 访问主账号的 APP 资源时,鉴权规则具体如下:

APP相关操作

  • 查询应用摘要
    • Action: mpush:ListSummaryApps
    • 鉴权规则: acs:mhub::$accountid:app/

推送相关操作

  • 推送消息
    • Action: mpush:Push
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 向Android设备推送消息
    • Action: mpush:PushMessageToAndroid
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 向iOS设备推送消息
    • Action: mpush:PushMessageToiOS
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 向Android设备推送通知
    • Action: mpush:PushNoticeToAndroid
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 向iOS设备推送通知
    • Action: mpush:PushNoticeToiOS
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 取消推送
    • Action: mpush:CancelPush
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey

设备绑定操作

  • 查询别名
    • Action: mpush:QueryAliases
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 绑定别名
    • Action: mpush:BindAlias
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 解绑别名
    • Action: mpush:UnbindAlias
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 查询标签
    • Action: mpush:QueryTags
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 列出标签
    • Action: mpush:ListTags
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 绑定标签
    • Action: mpush:BindTag
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 解绑标签
    • Action: mpush:UnbindTag
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey

查询与统计操作

  • 查询唯一设备状态
    • Action: mpush:QueryUniqueDeviceStat
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 按应用查询推送统计
    • Action: mpush:QueryPushStatByApp
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 查询设备状态
    • Action: mpush:QueryDeviceStat
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 列出推送记录
    • Action: mpush:ListPushRecords
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 按消息查询推送统计
    • Action: mpush:QueryPushStatByMsg
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 检查设备
    • Action: mpush:CheckDevices
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey
  • 查询设备信息
    • Action: mpush:QueryDeviceInfo
    • 鉴权规则: acs:mhub:*:$accountid:app/$AppKey

确保在配置阿里云RAM权限策略时,遵循最小权限原则,仅授予子账号完成其任务所需的最小权限集。同时,请替换$accountid$AppKey为实际的账号ID和应用Key以确保鉴权有效。

有帮助
无帮助
AI 助理回答生成答案可能存在不准确,仅供参考
0 条回答
写回答
取消 提交回答
问答分类:
问答地址: