You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-central/core/how-to-connect-devices-x509.md
+26-18Lines changed: 26 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Connect devices with X.509 certificates in an Azure IoT Central applicati
3
3
description: How to connect devices with X.509 certificates using Node.js device SDK for IoT Central Application
4
4
author: dominicbetts
5
5
ms.author: dobett
6
-
ms.date: 06/15/2022
6
+
ms.date: 09/13/2022
7
7
ms.topic: how-to
8
8
ms.service: iot-central
9
9
services: iot-central
@@ -35,7 +35,7 @@ This guide builds on the samples shown in the [Create and connect a client appli
35
35
36
36
## Prerequisites
37
37
38
-
Complete the [Create and connect a client application to your Azure IoT Central application](./tutorial-connect-device.md) tutorial. This includes installing the prerequisites for your choice of programming language.
38
+
To complete the steps in this how-to guide, you should first complete the [Create and connect a client application to your Azure IoT Central application](./tutorial-connect-device.md) tutorial.
39
39
40
40
In this how-to guide, you generate some test X.509 certificates. To be able to generate these certificates, you need:
41
41
@@ -89,31 +89,39 @@ Make a note of the location of these files. You need it later.
89
89
90
90
1. Open your IoT Central application and navigate to **Permissions** in the left pane and select **Device connection groups**.
91
91
92
-
1. Select **+ New**, and create a new enrollment group called _MyX509Group_ with an attestation type of **Certificates (X.509)**.
92
+
1. Select **+ New** to create a new enrollment group called _MyX509Group_ with an attestation type of **Certificates (X.509)**.
93
93
94
-
1. Open the enrollment group you created and select **Manage Primary**.
94
+
1. In the enrollment group you created, select **Manage primary**.
95
95
96
-
1. Select file option to upload the root certificate file called _mytestrootcert_cert.pem_ that you generated previously.
96
+
1. In the **Primary certificate** panel, select **Add certificate**.
97
97
98
-
1. To complete the verification, generate the verification code, copy it, and then use it to create an X.509 verification certificate at the command prompt:
98
+
1. Upload the root certificate file called _mytestrootcert_cert.pem_ that you generated previously.
99
+
100
+
1. If you're using an intermediate or root certificate authority that you trust and know you have full ownership of the certificate, you can self-attest that you've verified the certificate by setting certificate status verified on upload to **On**. Otherwise, set certificate status verified on upload to **Off**.
101
+
102
+
1. If you set certificate status verified on upload to **Off**, select **Generate verification code**.
103
+
104
+
1. Copy the verification code, copy it, and then create an X.509 verification certificate. For example, at the command prompt:
You can now connect devices that have an X.509 certificate derived from this primary root certificate.
109
117
110
-
After you save the enrollment group, make a note of the ID Scope.
118
+
After you save the enrollment group, make a note of the ID scope.
111
119
112
120
### Run sample device code
113
121
114
122
:::zone pivot="programming-language-csharp"
115
123
116
-
If you're using Windows, the X.509 certificates must be in the Windows certificate store for the sample to work. In Windows Explorer, double-click on each PFX files generated previously - `mytestrootcert.pfx` and `sampleDevice01.pfx`. In the **Certificate Import Wizard**, select **Current User** as the store location, enter `1234` as the password, and let the wizard choose the certificate store automatically. The wizard imports the certificates to the current user's personal store.
124
+
If you're using Windows, the X.509 certificates must be in the Windows certificate store for the sample to work. In Windows Explorer, double-click on the PFX files you generated previously - `mytestrootcert.pfx` and `sampleDevice01.pfx`. In the **Certificate Import Wizard**, select **Current User** as the store location, enter `1234` as the password, and let the wizard choose the certificate store automatically. The wizard imports the certificates to the current user's personal store.
@@ -237,25 +245,25 @@ These commands produce the following device certificates:
237
245
238
246
### Create individual enrollment
239
247
240
-
1. In the Azure IoT Central application, select **Devices**, and create a new device with **Device ID** as _mytestselfcertprimary_ from the thermostat device template. Make a note of the **ID Scope**, you use it later.
248
+
1. In the Azure IoT Central application, select **Devices**, and create a new device with **Device ID** as _mytestselfcertprimary_ from the thermostat device template. Make a note of the **ID scope**, you use it later.
241
249
242
250
1. Open the device you created and select **Connect**.
243
251
244
-
1. Select **Individual Enrollments** as the **Connect Method** and **Certificates (X.509)** as the mechanism.
252
+
1. Select **Individual enrollment** as the **Authentication type** and **Certificates (X.509)** as the **Authentication method**.
245
253
246
-
1.Select file option under primary and upload the certificate file called _mytestselfcertprimary_cert.pem_ that you generated previously.
254
+
1.Upload the _mytestselfcertprimary_cert.pem_file that you generated previously as the primary certificate.
247
255
248
-
1.Select the file option for the secondary certificate and upload the certificate file called _mytestselfcertsecondary_cert.pem._ Then select **Save**:
256
+
1.Upload the _mytestselfcertsecondary_cert.pem_file that you generated previously as the secondary certificate. Then select **Save**.
If you're using Windows, the X.509 certificates must be in the Windows certificate store for the sample to work. In Windows Explorer, double-click on each PFX files generated previously - `mytestselfcertprimary.pfx` and `mytestselfcertsecondary.pfx`. In the **Certificate Import Wizard**, select **Current User** as the store location, enter `1234` as the password, and let the wizard choose the certificate store automatically. The wizard imports the certificates to the current user's personal store.
266
+
If you're using Windows, the X.509 certificates must be in the Windows certificate store for the sample to work. In Windows Explorer, double-click on the PFX files you generated previously - `mytestselfcertprimary.pfx` and `mytestselfcertsecondary.pfx`. In the **Certificate Import Wizard**, select **Current User** as the store location, enter `1234` as the password, and let the wizard choose the certificate store automatically. The wizard imports the certificates to the current user's personal store.
@@ -447,9 +455,9 @@ To handle certificate expirations, use the following approach to update the curr
447
455
448
456
### Individual enrollments and certificate expiration
449
457
450
-
If you're rolling certificates to handle certificate expirations, you should use the secondary certificate configuration as follows to reduce downtime for devices attempting to provision.
458
+
If you're rolling certificates to handle certificate expirations, you should use the secondary certificate configuration as follows to reduce downtime for devices attempting to provision in your application.
451
459
452
-
When the secondary certificate nears expiration, and needs to be rolled, you can rotate to using the primary configuration. Rotating between the primary and secondary certificates in this way reduces downtime for devices attempting to provision.
460
+
When the secondary certificate nears expiration, and needs to be rolled, you can rotate to using the primary configuration. Rotating between the primary and secondary certificates in this way reduces downtime for devices attempting to provision in your application.
0 commit comments