unable to make device connect to azure event grid with client authentication using CA certificate chain

Mudige Tarun Kumar 10 Reputation points
2023-07-12T06:59:16.6033333+00:00

Below mentioned are the steps I followed to connect my device to the Event grid with client authentication using the CA certificate chain.

  1. Generated client certificate using the below commands in PowerShell.

.\step ca init --deployment-type standalone --name MqttAppSamplesCA --dns localhost --address 127.0.0.1:443 --provisioner MqttAppSamplesCAProvisioner

step_0.23.4\bin\step.exe certificate create PM_A0EDCE PM_A0EDCE.pem PM_A0EDCE.key --ca .step/certs/intermediate_ca.crt --ca-key .step/secrets/intermediate_ca_key --no-password --insecure --not-after 2400h

  1. Uploaded the intermediate_ca.crt generated using the above command to the namespace as mentioned below.image
  2. configured client authentication settings, as shown below.
    User's image
  3. Tried to connect the device to the Event grid from the MQTTX app as mentioned below by clicking on the "Connect" option at the top right corner of the image.
    User's image
  4. The connection failed with the below-mentioned error message.
    User's image

Please let me know what could be the cause of this error and how I can fix it.

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
330 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dinesh 0 Reputation points
    2023-08-16T21:14:25.9533333+00:00

    I got this working with the mqttx cli, here is the exact command I used for the user client4. I generated certificates using openssl, and important is to enter the common name or email address to match the authentication ID

    "C:\Program Files\MQTTX\mqttx-cli-win-x64.exe" conn --hostname HOST_ADDRESS -p 8883 -l mqtts --cert client.crt --key client.key -u client4-authnID

    0 comments No comments