【发布时间】:2021-02-06 22:20:36
【问题描述】:
希望根据设备用于身份验证的证书将设备限制在 AWS IOT 内的资源(影子)。
Device1 附加到 Cert1 - 我想要一个通用策略,只让 Device1 更新 Device 1 的影子,而不是 Device2
但所有这些都被设备用来进行身份验证的证书触发。
以下政策似乎不起作用 - 有什么帮助吗?
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:Connect",
"Resource": "*",
"Condition": {
"Bool": {
"iot:Connection.Thing.IsAttached": [
"true"
]
}
}
},
{
"Effect": "Allow",
"Action": [
"iot:Publish",
"iot:Receive"
],
"Resource": [
"arn:aws:iot:us-east-1:xxxxxx:topic/${iot:Connection.Thing.ThingTypeName}/${iot:Connection.Thing.ThingName}",
"arn:aws:iot:us-east-1:xxxxxx:topic/${iot:Connection.Thing.ThingTypeName}/${iot:Connection.Thing.ThingName}/*"
]
},
{
"Effect": "Allow",
"Action": [
"iot:Subscribe"
],
"Resource": [
"arn:aws:iot:us-east-1:xxxxxx:topicfilter/${iot:Connection.Thing.ThingTypeName}/${iot:Connection.Thing.ThingName}",
"arn:aws:iot:us-east-1:xxxxxx:topicfilter/${iot:Connection.Thing.ThingTypeName}/${iot:Connection.Thing.ThingName}/*"
]
}
]
}
【问题讨论】:
-
除了问题的标题之外,几乎没有任何关于它如何不起作用的信息。你能详细说明问题吗?
-
希望根据设备用于身份验证的证书将设备限制为 AWS IOT 内部的资源(影子)。 Device1 已附加到 Cert1 - 希望有一个通用策略,仅让 Device1 更新 Device 1 的影子,而不是 Device2,但所有这些都被触发!
标签: aws-iot