Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the nodejs sdk support x.509 certificate authentication for it's ModuleClient? #1216

Closed
akboba01 opened this issue Mar 6, 2024 · 2 comments
Assignees

Comments

@akboba01
Copy link

akboba01 commented Mar 6, 2024

When attempting to use the ModuleClient with x.509 authentication I get an error NotImplementedError: ModuleClient only supports SAS Token authentication.

  const moduleClient = ModuleClient.fromConnectionString(
    `HostName=${hubName};DeviceId=${deviceId};ModuleId=${moduleId};x509=true`,
    Mqtt
  );

However, the IoT Hub docs imply this is possible. Is there a different way of using the node sdk to do this?

@olivakar
Copy link
Contributor

It will throw this error if the connection string does not contain a SharedAccessKey field because x509 authentication is not supported for modules.

@olivakar olivakar self-assigned this Mar 13, 2024
@vishnureddy17
Copy link
Member

Seems resolved, closing issue. Feel free to re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants