Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅
中国的 Amazon Web Services 服务入门
(PDF)。
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
更新 EMQX 部署配置以进行授权
更新 EMQX 部署配置以进行授权
导航至 Amazon IoT SiteWise 控制台。
-
在左侧导航栏中,选择 Edge 部分的 Edge 网关。
-
选择要配置的网关。
-
在 Edge 网关配置部分,复制您的 Greengrass 核心设备值。将其保存以备后用。
-
打开 Amazon IoT 管理控制台。
-
在左侧导航栏的 “管理” 部分下,选择 Greengrass 设备,然后选择 “部署”。
-
找到您之前保存的核心设备值,然后选择该链接以打开部署。
-
选择 “操作” 下拉按钮,然后选择 “修改”。
-
阅读显示的消息,然后选择修订部署。将出现 “指定目标” 页面。
-
选择 “下一步”,直到进入 “配置组件” 步骤。
-
选择 aws.greengrass.clientdevices.mqtt.EMQX
单选按钮。
-
选择 “配置组件” 按钮。此时将显示该组件的配置页面。
-
在 “配置更新” 下,选择 “重置为组件版本的默认配置:2.*”。 *。
-
根据您的操作系统将以下内容粘贴到要合并的配置部分。
- Linux
-
{
"emqxConfig": {
"authorization": {
"no_match": "deny",
"sources": [
{
"enable": true,
"path": "/opt/emqx/data/authz/acl.conf",
"type": "file"
}
]
},
"listeners": {
"tcp": {
"default": {
"enabled": true,
"enable_authn": false
}
},
"ssl": {
"default": {
"enabled": true,
"enable_authn": true,
"ssl_options": {
"verify": "verify_none",
"fail_if_no_peer_cert": false
}
}
}
},
"authentication": {
"enable": true,
"backend": "built_in_database",
"mechanism": "password_based",
"password_hash_algorithm": {
"iterations": 210000,
"mac_fun": "sha512",
"name": "pbkdf2"
},
"user_id_type": "username"
},
"dashboard": {
"listeners": {
"http": {
"bind": 18083
}
}
}
},
"authMode": "bypass",
"dockerOptions": "-p 8883:8883 -p 127.0.0.1:1883:1883 -p 127.0.0.1:18083:18083 -v emqx-data:/opt/emqx/data -e EMQX_NODE__NAME=emqx@local",
"requiresPrivilege": "true"
}
- Windows
-
{
"emqxConfig": {
"authorization": {
"no_match": "deny",
"sources": [
{
"enable": true,
"type": "file",
"path": "C:\\greengrass\\v2\\work\\aws.greengrass.clientdevices.mqtt.EMQX\\v2\\data\\authz\\acl.conf"
}
]
},
"listeners": {
"tcp": {
"default": {
"enabled": true,
"enable_authn": false
}
},
"ssl": {
"default": {
"enabled": true,
"enable_authn": true,
"ssl_options": {
"verify": "verify_none",
"fail_if_no_peer_cert": false
}
}
}
},
"authentication": {
"enable": true,
"backend": "built_in_database",
"mechanism": "password_based",
"password_hash_algorithm": {
"iterations": 210000,
"mac_fun": "sha512",
"name": "pbkdf2"
},
"user_id_type": "username"
},
"dashboard": {
"listeners": {
"http": {
"bind": 18083
}
}
}
},
"authMode": "bypass",
"requiresPrivilege": "true"
}
-
选择确认。
-
选择 “下一步”,直到进入 “查看” 步骤。
-
选择部署。