Skip to content

Commit ace9098

Browse files
committed
Update X.509 options
1 parent b514665 commit ace9098

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

articles/iot-central/core/how-to-connect-devices-x509.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Connect devices with X.509 certificates in an Azure IoT Central applicati
33
description: How to connect devices with X.509 certificates using Node.js device SDK for IoT Central Application
44
author: dominicbetts
55
ms.author: dobett
6-
ms.date: 06/15/2022
6+
ms.date: 09/13/2022
77
ms.topic: how-to
88
ms.service: iot-central
99
services: iot-central
@@ -35,7 +35,7 @@ This guide builds on the samples shown in the [Create and connect a client appli
3535

3636
## Prerequisites
3737

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.
3939

4040
In this how-to guide, you generate some test X.509 certificates. To be able to generate these certificates, you need:
4141

@@ -89,31 +89,39 @@ Make a note of the location of these files. You need it later.
8989
9090
1. Open your IoT Central application and navigate to **Permissions** in the left pane and select **Device connection groups**.
9191
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)**.
9393
94-
1. Open the enrollment group you created and select **Manage Primary**.
94+
1. In the enrollment group you created, select **Manage primary**.
9595
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**.
9797
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:
99105
100106
```cmd/sh
101107
node create_test_cert.js verification --ca mytestrootcert_cert.pem --key mytestrootcert_key.pem --nonce {verification-code}
102108
```
103109
104-
1. Select **Verify** to upload the signed verification certificate _verification_cert.pem_ to complete the verification:
110+
1. Select **Verify** to upload the signed verification certificate _verification_cert.pem_ to complete the verification.
111+
112+
1. The status of the primary certificate is now **Verified**:
105113
106114
![Verified Certificate](./media/how-to-connect-devices-x509/verified.png)
107115
108116
You can now connect devices that have an X.509 certificate derived from this primary root certificate.
109117
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.
111119
112120
### Run sample device code
113121
114122
:::zone pivot="programming-language-csharp"
115123
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.
117125
118126
[!INCLUDE [iot-central-x509-csharp-code](../../../includes/iot-central-x509-csharp-code.md)]
119127
@@ -237,25 +245,25 @@ These commands produce the following device certificates:
237245

238246
### Create individual enrollment
239247

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.
241249

242250
1. Open the device you created and select **Connect**.
243251

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**.
245253

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.
247255

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**.
249257

250-
![Individual enrollment Certificate Upload](./media/how-to-connect-devices-x509/individual-enrollment.png)
258+
1. The device now has an individual enrollment with X.509 certificates.
251259

252-
The device is now provisioned with X.509 certificate.
260+
![Individual enrollment certificates](./media/how-to-connect-devices-x509/individual-enrollment.png)
253261

254262
### Run a sample individual enrollment device
255263

256264
:::zone pivot="programming-language-csharp"
257265

258-
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.
259267

260268
[!INCLUDE [iot-central-x509-csharp-code](../../../includes/iot-central-x509-csharp-code.md)]
261269

@@ -447,9 +455,9 @@ To handle certificate expirations, use the following approach to update the curr
447455
448456
### Individual enrollments and certificate expiration
449457
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.
451459
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.
453461
454462
1. Select **Devices**, and select the device.
455463
-92.2 KB
Loading
27.5 KB
Loading

0 commit comments

Comments
 (0)