question

JeffreyK-4635 avatar image
1 Vote"
JeffreyK-4635 asked JeffreyK-4635 commented

Azure IoT Module Client X509 authentication

I want to create ModuleClient using the X509Cert authentication but I do not see any class for it similar to the one we have for Device auth (DeviceAuthenticationWithX509Certificate).

I have a custom module which would create ModuleClient for edgeAgent to get the moduleTwin and need X509Cert auth for creating module client.

azure-iot-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VenkatYalla-0009 avatar image
2 Votes"
VenkatYalla-0009 answered JeffreyK-4635 commented

IoT Edge modules don't currently support certificate-based authentication.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What are the alternate recommendation for moduleclient authentication to be considered for edge device in prod? I see we have an option to use connectionstring for auth but then how can that be managed/automated for multiple users? I also see a class for ModuleAuthenticationWithToken with SAS Token auth

0 Votes 0 ·


IoT Edge manages the SAS tokens used for module auth for you. There is no need to manually manage these module credentials (neither is it can option to do so).

Just use this CreateFromEnvironment API: https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.sdk.iot.device.moduleclient.createfromenvironment?view=azure-java-stable

1 Vote 1 ·

CreateFromEnvironment can be used if I'm referring to the current module, but if I want to create a moduleclient for edgeAgent in custom module then I may need connectionstring right?

0 Votes 0 ·
Show more comments