- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
【以下的回答经过翻译处理】 您好,Frank。如果设备具有已在IoT Core注册的证书,则即使没有注册相应的物品,它也可能能够进行连接。这是因为它可以进行身份验证,但不一定意味着它将被授权执行任何操作。这取决于您对AWS IoT策略的设置。
一般而言,每个设备应该有自己的证书和私钥。如果设备已经被安全地配置,并且私钥在设备上得到安全存放,则只有该设备才能使用该证书进行身份验证。 最佳实践:
https://docs.aws.amazon.com/wellarchitected/latest/iot-lens/identity-and-access-management-iam.html
确保每个设备在AWS IoT中都有自己的唯一X.509证书,并且设备不应共享证书(原则上一个设备对应一个证书)。除每个设备使用单独证书外,在使用AWS IoT时,每个设备在IoT注册表中必须有自己的唯一物品名(Thing),并且物品名称用作MQTT连接的MQTT ClientID的基础。
您可以将AWS IoT策略附加到每个证书上。然后,您可以使用AWS IoT 策略变量 限制使用该证书连接的设备。参考https://docs.aws.amazon.com/zh_cn/iot/latest/developerguide/connect-and-pub.html中的示例。
要成功连接,必须在AWS IoT Core注册表中注册物品名称,并使用关联到该物品的身份或主体进行身份验证。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action":["iot:Publish"],
"Resource": ["arn:aws:iot:us-east-1:123456789012:topic/${iot:Connection.Thing.ThingName}"]
},
{
"Effect": "Allow",
"Action": ["iot:Connect"],
"Resource": ["arn:aws:iot:us-east-1:123456789012:client/${iot:Connection.Thing.ThingName}"]
}
]
}
更多信息请参考: https://docs.aws.amazon.com/zh_cn/iot/latest/developerguide/iot-authorization.html https://docs.aws.amazon.com/zh_cn/iot/latest/developerguide/iot-policy-variables.html https://docs.aws.amazon.com/zh_cn/iot/latest/developerguide/example-iot-policies.html https://aws.amazon.com/blogs/iot/understanding-the-aws-iot-security-model/
另外,您可能对使用AWS IoT Device Defender感兴趣。它可以对您的设备进行审计,帮助您检测任何受感染的设备。
Relevanter Inhalt
- Wie veröffentliche ich MQTT-Nachrichten von meinem Gerät auf AWS IoT Core, wenn ich Python verwende?AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor einem Jahr