How to Create Module with x509 authentication with C SDK? #2506
-
Can a module be created when authenticating with x509 certificates? I'm using x509 certificates to authenticate because I'll have an HSM that's used in first provisioning and creating devices. So I can create devices with certificates, then I'm able to interact with the device twin. I want to then create modules under a device. Is there a way to do that with x509 certificates? I see some functions for modules but they all seem to use shared access tokens. Or is there a way to get a shared access token for a device using certificates? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I found the Identity Service which provisions devices and modules. It says it can't use x509 authentication for modules, so I wouldn't be surprised if the answer is I can't do what I want. https://azure.github.io/iot-identity-service/develop-an-agent.html |
Beta Was this translation helpful? Give feedback.
-
X.509 Module Authentication@FaehnrichLE , the answer is yes: modules (with or without using Azure IoT Edge / Identity Service) can be authenticated via X.509 certificates/HSM (which is our recommended auth. mode). Unfortunately, we have found the feature poorly documented. I am actively working with our Tech Writers to complete the documentation. Meanwhile, please see my instructions in https://github.com/MicrosoftDocs/azure-docs/issues/111494 Programmatic Module CreationIoT Hub Resource Manager - IoT Hub identity is requiredThe C SDK's Service Client (the ResourceManager client) is currently deprecated and no longer recommended. To create a module programmatically, please use any of the other language SDK's ResourceManager clients: https://learn.microsoft.com/en-us/azure/iot-hub/module-twins-dotnet (we also have documentation for CLI, NodeJS and Python). Azure IoT Identity Service / Azure IoT EdgeEdge devices can manage module identities using the device's Edge identity (instead of a global IoT Hub policy). The APIs that these two products use are not considered "public API" for IoT Hub and may change without notice. (See below for relevant source.) |
Beta Was this translation helpful? Give feedback.
X.509 Module Authentication
@FaehnrichLE , the answer is yes: modules (with or without using Azure IoT Edge / Identity Service) can be authenticated via X.509 certificates/HSM (which is our recommended auth. mode).
Unfortunately, we have found the feature poorly documented. I am actively working with our Tech Writers to complete the documentation.
Meanwhile, please see my instructions in https://github.com/MicrosoftDocs/azure-docs/issues/111494
It would be very helpful if you could use https://github.com/MicrosoftDocs/azure-docs/issues/111494 for any questions/observations or enhancements to my proposed documentation.
Programmatic Module Creation
IoT Hub Resource Manager - IoT Hub identit…