在 iotedge 1.2 中,我在“/etc/aziot/config.toml.template”文件中看到以下内容:
## DPS provisioning with symmetric key
# [provisioning]
# source = "dps"
# global_endpoint = "https://global.azure-devices-provisioning.net/"
# id_scope = "0ab1234C5D6"
#
# [provisioning.attestation]
# method = "symmetric_key"
# registration_id = "my-device"
#
# symmetric_key = { value = "YXppb3QtaWRlbnRpdHktc2VydmljZXxhemlvdC1pZGVudGl0eS1zZXJ2aWNlfGF6aW90LWlkZW50aXR5LXNlcg==" } # inline key (base64), or...
# symmetric_key = { uri = "file:///var/secrets/device-id.key" } # file URI, or...
# symmetric_key = { uri = "pkcs11:slot-id=0;object=device%20id?pin-value=1234" }
当然,我可以在“对称密钥”配置的第一个选项中明确指定密钥,但如果我想在文件中指定它(对称密钥的第二个选项),文件格式是什么?
我已经逐字尝试了关键,并且我已经尝试过
{ value = "<key>" }
无济于事 - 我收到“未找到设备身份”错误。文档只是说可以使用外部文件,但仅此而已。