Skip to content

Commit 1e1dd85

Browse files
authored
Merge pull request #110912 from kgremban/apr2-ancaupdates
update cert instructions for x.509 dps
2 parents 6f35f07 + 66b29fe commit 1e1dd85

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

articles/iot-edge/how-to-auto-provision-x509-certs.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: kgremban
55
manager: philmea
66
ms.author: kgremban
77
ms.reviewer: kevindaw
8-
ms.date: 03/06/2020
8+
ms.date: 04/09/2020
99
ms.topic: conceptual
1010
ms.service: iot-edge
1111
services: iot-edge
@@ -40,6 +40,12 @@ Device identity certificates are only used for provisioning the IoT Edge device
4040

4141
After you create the device identity certificate, you should have two files: a .cer or .pem file that contains the public portion of the certificate, and a .cer or .pem file with the private key of the certificate. If you plan to use group enrollment in DPS, you also need the public portion of an intermediate or root CA certificate in the same certificate chain of trust.
4242

43+
You need the following files to set up automatic provisioning with X.509:
44+
45+
* The device identity certificate and its private key certificate. The device identity certificate is uploaded to DPS if you create an individual enrollment. The private key is passed to the IoT Edge runtime.
46+
* A full chain certificate, which should have at least the device identity and the intermediate certificates in it. The full chain certificate is passed to the IoT Edge runtime.
47+
* An intermediate or root CA certificate from the certificate chain of trust. This certificate is uploaded to DPS if you create a group enrollment.
48+
4349
### Use test certificates
4450

4551
If you don't have a certificate authority available to create new identity certs and want to try out this scenario, the Azure IoT Edge git repository contains scripts that you can use to generate test certificates. These certificates are designed for development testing only, and must not be used in production.
@@ -81,7 +87,7 @@ For more information about enrollments in the Device Provisioning Service, see [
8187

8288
* **Primary Certificate .pem or .cer file**: Upload the public file from the device identity certificate. If you used the scripts to generate a test certificate, choose the following file:
8389

84-
`<WRKDIR>/certs/iot-edge-device-identity-<name>-full-chain.cert.pem`
90+
`<WRKDIR>/certs/iot-edge-device-identity-<name>.cert.pem`
8591

8692
* **IoT Hub Device ID**: Provide an ID for your device if you'd like. You can use device IDs to target an individual device for module deployment. If you don't provide a device ID, the common name (CN) in the X.509 certificate is used.
8793

@@ -200,7 +206,7 @@ X.509 provisioning with DPS is only supported in IoT Edge version 1.0.9 or newer
200206
You'll need the following information when provisioning your device:
201207

202208
* The DPS **ID Scope** value. You can retrieve this value from the overview page of your DPS instance in the Azure portal.
203-
* The device identity certificate file on the device.
209+
* The device identity certificate chain file on the device.
204210
* The device identity key file on the device.
205211
* An optional registration ID (pulled from the common name in the device identity certificate if not supplied).
206212

@@ -212,7 +218,7 @@ Use the following link to install the Azure IoT Edge runtime on your device, usi
212218

213219
When you add the X.509 certificate and key information to the config.yaml file, the paths should be provided as file URIs. For example:
214220

215-
* `file:///<path>/identity_certificate.pem`
221+
* `file:///<path>/identity_certificate_chain.pem`
216222
* `file:///<path>/identity_key.pem`
217223

218224
The section in the configuration file for X.509 automatic provisioning looks like this:
@@ -230,7 +236,7 @@ provisioning:
230236
identity_pk: "<REQUIRED URI TO DEVICE IDENTITY PRIVATE KEY>"
231237
```
232238

233-
Replace the placeholder values for `scope_id`, `identity_cert`, `identity_pk` with the scope ID from your DPS instance, and the URIs to the cert and key file locations on your device. Provide a `registration_id` for the device if you want, or leave this line commented out to register the device with the CN name of the identity certificate.
239+
Replace the placeholder values for `scope_id`, `identity_cert`, `identity_pk` with the scope ID from your DPS instance, and the URIs to the cert chain and key file locations on your device. Provide a `registration_id` for the device if you want, or leave this line commented out to register the device with the CN name of the identity certificate.
234240

235241
Always restart the security daemon after updating the config.yaml file.
236242

@@ -240,7 +246,7 @@ sudo systemctl restart iotedge
240246

241247
### Windows device
242248

243-
Install the IoT Edge runtime on the device for which you generated the identity certificate and identity key. You'll configure the IoT Edge runtime for automatic, not manual, provisioning.
249+
Install the IoT Edge runtime on the device for which you generated the identity certificate chain and identity key. You'll configure the IoT Edge runtime for automatic, not manual, provisioning.
244250

245251
For more detailed information about installing IoT Edge on Windows, including prerequisites and instructions for tasks like managing containers and updating IoT Edge, see [Install the Azure IoT Edge runtime on Windows](how-to-install-iot-edge-windows.md).
246252

@@ -257,11 +263,11 @@ For more detailed information about installing IoT Edge on Windows, including pr
257263

258264
1. The **Initialize-IoTEdge** command configures the IoT Edge runtime on your machine. The command defaults to manual provisioning unless you use the `-Dps` flag to use automatic provisioning.
259265

260-
Replace the placeholder values for `{scope_id}`, `{identity cert path}`, and `{identity key path}` with the appropriate values from your DPS instance and the file paths on your device. If you want to specify the registration ID, include `-RegistrationId {registration_id}` as well, replacing the placeholder as appropriate.
266+
Replace the placeholder values for `{scope_id}`, `{identity cert chain path}`, and `{identity key path}` with the appropriate values from your DPS instance and the file paths on your device. If you want to specify the registration ID, include `-RegistrationId {registration_id}` as well, replacing the placeholder as appropriate.
261267

262268
```powershell
263269
. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; `
264-
Initialize-IoTEdge -Dps -ScopeId {scope ID} -X509IdentityCertificate {identity cert path} -X509IdentityPrivateKey {identity key path}
270+
Initialize-IoTEdge -Dps -ScopeId {scope ID} -X509IdentityCertificate {identity cert chain path} -X509IdentityPrivateKey {identity key path}
265271
```
266272

267273
>[!TIP]

articles/iot-edge/how-to-create-test-certificates.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Create test certificates and learn how to install them on an Azure
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 02/26/2020
7+
ms.date: 04/14/2020
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -242,8 +242,9 @@ New-CACertsEdgeDeviceIdentity "<name>"
242242

243243
The name that you pass in to this command will be the device ID for the IoT Edge device in IoT Hub.
244244

245-
The new device identity command creates several certificate and key files, including two that you'll use when creating an individual enrollment in DPS and installing the IoT Edge runtime:
245+
The new device identity command creates several certificate and key files, including three that you'll use when creating an individual enrollment in DPS and installing the IoT Edge runtime:
246246

247+
* `<WRKDIR>\certs\iot-edge-device-identity-<name>-full-chain.cert.pem`
247248
* `<WRKDIR>\certs\iot-edge-device-identity-<name>.cert.pem`
248249
* `<WRKDIR>\private\iot-edge-device-identity-<name>.key.pem`
249250

@@ -257,8 +258,9 @@ Create the IoT Edge device identity certificate and private key with the followi
257258

258259
The name that you pass in to this command will be the device ID for the IoT Edge device in IoT Hub.
259260

260-
The script creates several certificate and key files, including two that you'll use when creating an individual enrollment in DPS and installing the IoT Edge runtime:
261+
The script creates several certificate and key files, including three that you'll use when creating an individual enrollment in DPS and installing the IoT Edge runtime:
261262

263+
* `<WRKDIR>\certs\iot-edge-device-identity-<name>-full-chain.cert.pem`
262264
* `<WRKDIR>/certs/iot-edge-device-identity-<name>.cert.pem`
263265
* `<WRKDIR>/private/iot-edge-device-identity-<name>.key.pem`
264266

0 commit comments

Comments
 (0)