Skip to content

Commit 0580849

Browse files
committed
Update config; verify ca certs
1 parent 31642ad commit 0580849

6 files changed

+80
-49
lines changed

.openpublishing.redirection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3261,7 +3261,7 @@
32613261
{
32623262
"source_path": "articles/iot-edge/how-to-install-production-certificates.md",
32633263
"redirect_url": "/azure/iot-edge/how-to-manage-device-certificates",
3264-
"redirect_document_id": false
3264+
"redirect_document_id": true
32653265
},
32663266
{
32673267
"source_path": "articles/cognitive-services/cognitive-services-recommendations-quick-start.md",

articles/iot-edge/how-to-auto-provision-symmetric-keys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ The section in the configuration file for symmetric key provisioning looks like
170170
provisioning:
171171
source: "dps"
172172
global_endpoint: "https://global.azure-devices-provisioning.net"
173-
scope_id: "{scope_id}"
173+
scope_id: "<SCOPE_ID>"
174174
attestation:
175175
method: "symmetric_key"
176-
registration_id: "{registration_id}"
177-
symmetric_key: "{symmetric_key}"
176+
registration_id: "<REGISTRATION_ID>"
177+
symmetric_key: "<SYMMETRIC_KEY>"
178178
```
179179
180-
Replace the placeholder values for `{scope_id}`, `{registration_id}`, and `{symmetric_key}` with the data you collected earlier. Make sure the **provisioning:** line has no preceding whitespace and that nested items are indented by two spaces.
180+
Replace the placeholder values for `<SCOPE_ID>`, `<REGISTRATION_ID>`, and `<SYMMETRIC_KEY>` with the data you collected earlier. Make sure the **provisioning:** line has no preceding whitespace and that nested items are indented by two spaces.
181181

182182
### Windows device
183183

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

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This article shows you how to create a Device Provisioning Service enrollment us
2121
* Create either an individual enrollment for a device, or a group enrollment for a set of devices.
2222
* Install the IoT Edge runtime and register the device with IoT Hub.
2323

24-
Using X.509 certificates as an attestation mechanism is an excellent way to scale production and simplify device provisioning. X.509 certificates are typically arranged in a certificate chain of trust in which each certificate in the chain is signed by the private key of the next higher certificate, and so on, terminating in a self-signed root certificate or a trusted root certificate. This arrangement establishes a delegated chain of trust from the root certificate generated by a trusted root certificate authority (CA) down through each intermediate CA to the end-entity "leaf" certificate installed on a device.
24+
Using X.509 certificates as an attestation mechanism is an excellent way to scale production and simplify device provisioning. Typically, X.509 certificates are arranged in a certificate chain of trust. Starting with a self-signed or trusted root certificate, each certificate in the chain signs the next lower certificate. This pattern creates a delegated chain of trust from the root certificate down through each intermediate certificate to the final "leaf" certificate installed on a device.
2525

2626
## Prerequisites
2727

@@ -35,9 +35,9 @@ Using X.509 certificates as an attestation mechanism is an excellent way to scal
3535

3636
## Generate device identity certificates
3737

38-
The device identity certificate is a leaf certificate that connects through a certificate chain of trust to the top X.509 CA certificate. The device identity certificate must have it common name (CN) set to the device ID that you want the device to have in your IoT hub.
38+
The device identity certificate is a leaf certificate that connects through a certificate chain of trust to the top X.509 certificate authority (CA) certificate. The device identity certificate must have it common name (CN) set to the device ID that you want the device to have in your IoT hub.
3939

40-
Device identity certificates are only used for provisioning the IoT Edge device and authenticating the device with Azure IoT Hub. They are not signing certificates, unlike the CA certificates that the IoT Edge device presents to modules or leaf devices for verification. For more information, see [Azure IoT Edge certificate usage detail](iot-edge-certs.md).
40+
Device identity certificates are only used for provisioning the IoT Edge device and authenticating the device with Azure IoT Hub. They aren't signing certificates, unlike the CA certificates that the IoT Edge device presents to modules or leaf devices for verification. For more information, see [Azure IoT Edge certificate usage detail](iot-edge-certs.md).
4141

4242
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.
4343

@@ -57,7 +57,7 @@ Windows:
5757
* `<WRKDIR>\certs\iot-edge-device-identity-<name>-full-chain.cert.pem`
5858
* `<WRKDIR>\private\iot-edge-device-identity-<name>.key.pem`
5959

60-
You need both these certificates on the IoT Edge device. If you're going to use individual enrollment in DPS, then you will upload the .cert.pem file. If you're going to use group enrollment in DPS, then you also need an intermediate or root CA certificate in the same certificate chain of trust to upload. In the case of the test certs, you can use the `<WRKDIR>\certs\azure-iot-test-only.root.ca.cert.pem` certificate for group enrollment.
60+
You need both these certificates on the IoT Edge device. If you're going to use individual enrollment in DPS, then you will upload the .cert.pem file. If you're going to use group enrollment in DPS, then you also need an intermediate or root CA certificate in the same certificate chain of trust to upload. If you're using demo certs, use the `<WRKDIR>\certs\azure-iot-test-only.root.ca.cert.pem` certificate for group enrollment.
6161

6262
## Create a DPS individual enrollment
6363

@@ -67,6 +67,8 @@ If you're looking to provision multiple IoT Edge devices, follow the steps in th
6767

6868
When you create an enrollment in DPS, you have the opportunity to declare an **Initial Device Twin State**. In the device twin, you can set tags to group devices by any metric you need in your solution, like region, environment, location, or device type. These tags are used to create [automatic deployments](how-to-deploy-monitor.md).
6969

70+
For more information about enrollments in the Device Provisioning Service, see [How to manage device enrollments](../iot-dps/how-to-manage-enrollments.md).
71+
7072
1. In the [Azure portal](https://portal.azure.com), navigate to your instance of IoT Hub Device Provisioning Service.
7173

7274
1. Under **Settings**, select **Manage enrollments**.
@@ -83,12 +85,8 @@ When you create an enrollment in DPS, you have the opportunity to declare an **I
8385

8486
* **IoT Edge device**: Select **True** to declare that the enrollment is for an IoT Edge device.
8587

86-
* **Select how you want to assign devices to hubs**: Accept the default value, evenly weighted distribution. Or choose a different value that is specific to this enrollment.
87-
8888
* **Select the IoT hubs this device can be assigned to**: Choose the linked IoT hub that you want to connect your device to. You can choose multiple hubs, and the device will be assigned to one of them according to the selected allocation policy.
8989

90-
* **Select how you want device data to be handled on re-provisioning**: Accept the default value, re-provision and migrate data. Or choose a different value to determine how to handle when devices request provisioning after the first time.
91-
9290
* **Initial Device Twin State**: Add a tag value to be added to the device twin if you'd like. You can use tags to target groups of devices for automatic deployment. For example:
9391

9492
```json
@@ -102,8 +100,6 @@ When you create an enrollment in DPS, you have the opportunity to declare an **I
102100
}
103101
```
104102

105-
* **Enable entry**: Select **Enable**.
106-
107103
1. Select **Save**.
108104

109105
Now that an enrollment exists for this device, the IoT Edge runtime can automatically provision the device during installation. Continue to the [Install the IoT Edge runtime](#install-the-iot-edge-runtime) section to set up your IoT Edge device.
@@ -113,12 +109,54 @@ Now that an enrollment exists for this device, the IoT Edge runtime can automati
113109
Use your generated certificates and keys to create a group enrollment in DPS for multiple IoT Edge devices. Group enrollments use an intermediate or root CA certificate from the certificate chain of trust used to generate the individual device identity certificates.
114110

115111
>[!NOTE]
116-
>Currently, group enrollment is only supported for IoT Edge on Linux devices.
112+
>Currently, group enrollment is only supported for IoT Edge on Linux devices.
117113

118114
If you're looking to provision a single IoT Edge device instead, follow the steps in the previous section, [Create a DPS individual enrollment](#create-a-dps-individual-enrollment).
119115

120116
When you create an enrollment in DPS, you have the opportunity to declare an **Initial Device Twin State**. In the device twin, you can set tags to group devices by any metric you need in your solution, like region, environment, location, or device type. These tags are used to create [automatic deployments](how-to-deploy-monitor.md).
121117

118+
### Verify your root certificate
119+
120+
When you create an enrollment group, you have the option of using a verified certificate. You can verify a certificate with DPS by proving that you have ownership of the root certificate. For more information, see [How to do proof-of-possession for X.509 CA certificates](../iot-dps/how-to-verify-certificates.md).
121+
122+
1. In the [Azure portal](https://portal.azure.com), navigate to your instance of IoT Hub Device Provisioning Service.
123+
124+
1. Select **Certificates** from the left-hand menu.
125+
126+
1. Select **Add** to add a new certificate.
127+
128+
1. Enter a friendly name for your certificate, then browse to the .cer or .pem file that represents the public part of your X.509 certificate.
129+
130+
If you're using the demo certificates, upload the `<wrkdir>/certs/azure-iot-test-only.root.ca.cert.pem` certificate.
131+
132+
1. Select **Save**.
133+
134+
1. Your certificate should now be listed on the **Certificates** page. Select it to open the certificate details.
135+
136+
1. Select **Generate Verification Code** then copy the generated code.
137+
138+
1. Whether you brought your own CA certificate or are using the demo certificates, you can use the verification tool provided in the IoT Edge repository to verify proof of possession. The verification tool uses your CA certificate to sign a new certificate that has the provided verification code as the subject name.
139+
140+
* Windows:
141+
142+
```powershell
143+
New-CACertsVerificationCert "<verification code>"
144+
```
145+
146+
* Linux:
147+
148+
```bash
149+
./certGen.sh create_verification_certificate <verification code>
150+
```
151+
152+
1. In the same certificate details page in the Azure portal, upload the newly generated verification certificate.
153+
154+
1. Select **Verify**.
155+
156+
### Create enrollment group
157+
158+
For more information about enrollments in the Device Provisioning Service, see [How to manage device enrollments](../iot-dps/how-to-manage-enrollments.md).
159+
122160
1. In the [Azure portal](https://portal.azure.com), navigate to your instance of IoT Hub Device Provisioning Service.
123161

124162
1. Under **Settings**, select **Manage enrollments**.
@@ -131,16 +169,12 @@ When you create an enrollment in DPS, you have the opportunity to declare an **I
131169

132170
* **IoT Edge device**: Select **True**. For a group enrollment, all devices must be IoT Edge devices or none of them can be.
133171

134-
* **Certificate Type**: Select **CA Certificate** if you have a certificate stored with DPS already, or **Intermediate Certificate** if you want to upload a new file for just this enrollment.
172+
* **Certificate Type**: Select **CA Certificate** if you have a verified CA certificate stored with DPS, or **Intermediate Certificate** if you want to upload a new file for just this enrollment.
135173

136-
* **Primary certificate**: If you chose CA certificate in the last section, choose your certificate from the dropdown list. If you chose intermediate certificate, upload the public file from an intermediate CA certificate in the certificate chain of trust that was used to generate the device identity certificates.
137-
138-
* **Select how you want to assign devices to hubs**: Accept the default value, evenly weighted distribution. Or choose a different value that is specific to this enrollment.
174+
* **Primary certificate**: If you chose CA certificate in the last section, choose your certificate from the dropdown list. If you chose intermediate certificate, upload the public file from a CA certificate in the certificate chain of trust that was used to generate the device identity certificates.
139175

140176
* **Select the IoT hubs this device can be assigned to**: Choose the linked IoT hub that you want to connect your device to. You can choose multiple hubs, and the device will be assigned to one of them according to the selected allocation policy.
141177

142-
* **Select how you want device data to be handled on re-provisioning**: Accept the default value, re-provision and migrate data. Or choose a different value to determine how to handle when devices request provisioning after the first time.
143-
144178
* **Initial Device Twin State**: Add a tag value to be added to the device twin if you'd like. You can use tags to target groups of devices for automatic deployment. For example:
145179

146180
```json
@@ -154,8 +188,6 @@ When you create an enrollment in DPS, you have the opportunity to declare an **I
154188
}
155189
```
156190

157-
* **Enable entry**: Select **Enable**.
158-
159191
1. Select **Save**.
160192

161193
Now that an enrollment exists for this device, the IoT Edge runtime can automatically provision the device during installation. Continue to the next section to set up your IoT Edge device.
@@ -191,10 +223,10 @@ The section in the configuration file for X.509 automatic provisioning looks lik
191223
provisioning:
192224
source: "dps"
193225
global_endpoint: "https://global.azure-devices-provisioning.net"
194-
scope_id: "{scope_id}"
226+
scope_id: "<SCOPE_ID>"
195227
attestation:
196228
method: "x509"
197-
# registration_id: "<OPTIONAL REGISTRATION ID. IF UNSPECIFIED CAN BE OBTAINED FROM CN OF identity_cert"
229+
# registration_id: "<OPTIONAL REGISTRATION ID. LEAVE COMMENTED OUT TO REGISTER WITH CN OF identity_cert>"
198230
identity_cert: "<REQUIRED URI TO DEVICE IDENTITY CERTIFICATE>"
199231
identity_pk: "<REQUIRED URI TO DEVICE IDENTITY PRIVATE KEY>"
200232
```

articles/iot-edge/how-to-install-iot-edge-linux.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,12 @@ sudo nano /etc/iotedge/config.yaml
174174
175175
Find the provisioning configurations of the file and uncomment the **Manual provisioning configuration** section. Update the value of **device_connection_string** with the connection string from your IoT Edge device. Make sure any other provisioning sections are commented out. Make sure the **provisioning:** line has no preceding whitespace and that nested items are indented by two spaces.
176176
177-
```yml
178-
# Manual provisioning configuration
179-
provisioning:
180-
source: "manual"
181-
device_connection_string: "<ADD DEVICE CONNECTION STRING HERE>"
182-
dyname_reprovisioning: false
183-
```
177+
```yml
178+
# Manual provisioning configuration
179+
provisioning:
180+
source: "manual"
181+
device_connection_string: "<ADD DEVICE CONNECTION STRING HERE>"
182+
```
184183
185184
To paste clipboard contents into Nano `Shift+Right Click` or press `Shift+Insert`.
186185
@@ -196,7 +195,7 @@ sudo systemctl restart iotedge
196195
197196
### Option 2: Automatic provisioning
198197
199-
IoT Edge devices can be automatically provisioned using the [Azure IoT Hub Device Provisioning Service (DPS)](../iot-dps/index.yml). Currently, IoT Edge supports two attestation mechanisms when using automatic provisioning, but your hardware requirements may impact your choices. For example, Raspberry Pi devices do not come with a Trusted Platform Module (TPM) chip by default. For more information, refer to the following articles:
198+
IoT Edge devices can be automatically provisioned using the [Azure IoT Hub Device Provisioning Service (DPS)](../iot-dps/index.yml). Currently, IoT Edge supports two attestation mechanisms when using automatic provisioning, but your hardware requirements may impact your choices. For example, Raspberry Pi devices do not come with a Trusted Platform Module (TPM) chip by default. For more information, see the following articles:
200199
201200
* [Create and provision an IoT Edge device with a virtual TPM on a Linux VM](how-to-auto-provision-simulated-device-linux.md)
202201
* [Create and provision an IoT Edge device using X.509 certificates](how-to-auto-provision-x509-certs.md)
@@ -219,10 +218,10 @@ TPM attestation:
219218
provisioning:
220219
source: "dps"
221220
global_endpoint: "https://global.azure-devices-provisioning.net"
222-
scope_id: "{scope_id}"
221+
scope_id: "<SCOPE_ID>"
223222
attestation:
224223
method: "tpm"
225-
registration_id: "{registration_id}"
224+
registration_id: "<REGISTRATION_ID>"
226225
```
227226
228227
X.509 attestation:
@@ -232,10 +231,10 @@ X.509 attestation:
232231
provisioning:
233232
source: "dps"
234233
global_endpoint: "https://global.azure-devices-provisioning.net"
235-
scope_id: "{scope_id}"
234+
scope_id: "<SCOPE_ID>"
236235
attestation:
237236
method: "x509"
238-
# registration_id: "<OPTIONAL REGISTRATION ID. IF UNSPECIFIED CAN BE OBTAINED FROM CN OF identity_cert"
237+
# registration_id: "<OPTIONAL REGISTRATION ID. LEAVE COMMENTED OUT TO REGISTER WITH CN OF identity_cert>"
239238
identity_cert: "<REQUIRED URI TO DEVICE IDENTITY CERTIFICATE>"
240239
identity_pk: "<REQUIRED URI TO DEVICE IDENTITY PRIVATE KEY>"
241240
```
@@ -247,11 +246,11 @@ Symmetric key attestation:
247246
provisioning:
248247
source: "dps"
249248
global_endpoint: "https://global.azure-devices-provisioning.net"
250-
scope_id: "{scope_id}"
249+
scope_id: "<SCOPE_ID>"
251250
attestation:
252251
method: "symmetric_key"
253-
registration_id: "{registration_id}"
254-
symmetric_key: "{symmetric_key}"
252+
registration_id: "<REGISTRATION_ID>"
253+
symmetric_key: "<SYMMETRIC_KEY>"
255254
```
256255
257256
To paste clipboard contents into Nano `Shift+Right Click` or press `Shift+Insert`.
@@ -314,7 +313,7 @@ Many embedded device manufacturers ship device images that contain custom Linux
314313
./check-config.sh
315314
```
316315
317-
This command provides a detailed output that contains the status of kernel features that are used by the Moby runtime. You will want to ensure that all items under `Generally Necessary` and `Network Drivers` are enabled to ensure that your kernel is fully compatible with the Moby runtime. If you have identified any missing features, enable them by rebuilding your kernel from source and selecting the associated modules for inclusion in the appropriate kernel .config. Similarly, if you are using a kernel configuration generator like defconfig or menuconfig, find and enable the respective features and rebuild your kernel accordingly. Once you have deployed your newly modified kernel, run the check-config script again to verify that all the required features were successfully enabled.
316+
This command provides a detailed output that contains the status of kernel features that are used by the Moby runtime. You will want to ensure that all items under `Generally Necessary` and `Network Drivers` are enabled to ensure that your kernel is fully compatible with the Moby runtime. If you have identified any missing features, enable them by rebuilding your kernel from source and selecting the associated modules for inclusion in the appropriate kernel .config. Similarly, if you are using a kernel configuration generator like `defconfig` or `menuconfig`, find and enable the respective features and rebuild your kernel accordingly. Once you have deployed your newly modified kernel, run the check-config script again to verify that all the required features were successfully enabled.
318317
319318
## Uninstall IoT Edge
320319

articles/iot-edge/how-to-install-iot-edge-windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ IoT Core devices must include the IoT Core- Windows Containers optional feature
4242
Get-Service vmcompute
4343
```
4444

45-
If the service is present, you should get a successful response with the service status listed as **running**. If the vmcompute service is not found, then your device does not meet the requirements for IoT Edge. Contact your hardware provider to ask about support for this feature.
45+
If the service is present, you should get a successful response with the service status listed as **running**. If the `vmcompute` service is not found, then your device does not meet the requirements for IoT Edge. Contact your hardware provider to ask about support for this feature.
4646

4747
### Prepare for a container engine
4848

0 commit comments

Comments
 (0)