gpt4 book ai didi

amazon-web-services - AWS 物联网策略 : subscribe vs receive actions

转载 作者:行者123 更新时间:2023-12-04 11:50:43 25 4
gpt4 key购买 nike

大多数情况下,我最终会为订阅和接收操作创建具有相同内容的 AWS IoT 策略。如果允许某人订阅一个主题,则必须允许其接收发布到该主题的消息。

另一种方法是指定要订阅的确切主题并使用所有通配符 (*) 进行 Receive 操作。如果允许某人订阅主题列表,它将永远不会收到来自其他主题的消息,那么为什么还要在 Receive 操作中指定确切的主题呢?

Receive 与 Subscribe 不同的唯一用例是,必须禁止已连接和订阅的事物/用户接收发布到已订阅主题的消息。然而,这是一个非常特殊的情况。

最佳答案

您描述的这种情况正是 AWS 文档中描述的情况。

https://docs.aws.amazon.com/iot/latest/developerguide/policy-actions.html

iot:Receive

Represents the permission to receive a message from AWS IoT. The iot:Receive permission is checked every time a message is delivered to a client. Because this permission is checked on every delivery, it can be used to revoke permissions to clients that are currently subscribed to a topic.

关于amazon-web-services - AWS 物联网策略 : subscribe vs receive actions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56902509/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com