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-edge/how-to-create-iot-edge-device.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,32 +138,32 @@ To see more of the features of DPS, see the [Features section of the overview pa
138
138
139
139
## Choose an authentication method
140
140
141
-
### Symmetric keys attestation
142
-
143
-
Symmetric key attestation is a simple approach to authenticating a device. This attestation method represents a "Hello world" experience for developers who are new to device provisioning, or don't have strict security requirements.
144
-
145
-
When you create a new device identity in IoT Hub, the service creates two keys. You place one of the keys on the device, and it presents the key to IoT Hub when authenticating.
146
-
147
-
This authentication method is faster to get started but not as secure. Device provisioning using a TPM or X.509 certificates is more secure and should be used for solutions with more stringent security requirements.
148
-
149
141
### X.509 certificate attestation
150
142
151
-
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.
143
+
Using X.509 certificates as an attestation mechanism is the recommended 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.
152
144
153
-
You create two X.509 identity certificates and place them on the device. When you create a new device identity in IoT Hub, you provide thumbprints from both certificates. When the device authenticates to IoT Hub, it presents one certificate and IoT Hub verifies that the certificate matches its thumbprint.
145
+
You create two X.509 identity certificates and place them on the device. When you create a new device identity in IoT Hub, you provide thumbprints from both certificates. When the device authenticates to IoT Hub, it presents one certificate and IoT Hub verifies that the certificate matches its thumbprint. The X.509 keys on the device should be stored in a Hardware Security Module (HSM). For example, PKCS#11 modules, ATECC, dTPM, etc.
154
146
155
-
This authentication method is more secure than symmetric keys and is recommended for production scenarios.
147
+
This authentication method is more secure than symmetric keys and supports group enrollments which provides a simplified management experience for a high number of devices. This authentication method is recommended for production scenarios.
156
148
157
149
### Trusted platform module (TPM) attestation
158
150
159
-
Using TPM attestation is the most secure method for device provisioning, as it provides authentication features in both software and hardware. Each TPM chip uses a unique endorsement key to verify its authenticity.
151
+
Using TPM attestation is a method for device provisioning that uses authentication features in both software and hardware. Each TPM chip uses a unique endorsement key to verify its authenticity.
160
152
161
153
TPM attestation is only available for provisioning at-scale with DPS, and only supports individual enrollments not group enrollments. Group enrollments aren't available because of the device-specific nature of TPM.
162
154
163
155
TPM 2.0 is required when you use TPM attestation with the device provisioning service.
164
156
165
157
This authentication method is more secure than symmetric keys and is recommended for production scenarios.
166
158
159
+
### Symmetric keys attestation
160
+
161
+
Symmetric key attestation is a simple approach to authenticating a device. This attestation method represents a "Hello world" experience for developers who are new to device provisioning, or don't have strict security requirements.
162
+
163
+
When you create a new device identity in IoT Hub, the service creates two keys. You place one of the keys on the device, and it presents the key to IoT Hub when authenticating.
164
+
165
+
This authentication method is faster to get started but not as secure. Device provisioning using a TPM or X.509 certificates is more secure and should be used for solutions with more stringent security requirements.
166
+
167
167
## Next steps
168
168
169
169
You can use the table of contents to navigate to the appropriate end-to-end guide for creating an IoT Edge device for your IoT Edge solution's platform, provisioning, and authentication requirements.
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-provision-devices-at-scale-linux-tpm.md
+69-2Lines changed: 69 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,8 @@ The tasks are as follows:
52
52
53
53
A physical Linux device to be the IoT Edge device.
54
54
55
+
If you are a device manufacturer then refer to guidance on [integrating a TPM into the manufacturing process](../iot-dps/concepts-device-oem-security-practices.md#integrating-a-tpm-into-the-manufacturing-process).
56
+
55
57
# [Virtual machine](#tab/virtual-machine)
56
58
57
59
A Windows development machine with [Hyper-V enabled](/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v). This article uses Windows 10 running an Ubuntu Server VM.
@@ -141,6 +143,8 @@ After the installation is finished and you've signed back in to your VM, you're
141
143
142
144
## Retrieve provisioning information for your TPM
143
145
146
+
<!-- 1.1 -->
147
+
:::moniker range="<iotedge-1.4"
144
148
In this section, you build a tool that you can use to retrieve the registration ID and endorsement key for your TPM.
145
149
146
150
1. Sign in to your device, and then follow the steps in [Set up a Linux development environment](https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/devbox_setup.md#linux) to install and build the Azure IoT device SDK for C.
@@ -157,11 +161,74 @@ In this section, you build a tool that you can use to retrieve the registration
157
161
158
162
1. The output window displays the device's **Registration ID** and the **Endorsement key**. Copy these values for use later when you create an individual enrollment for your device in the device provisioning service.
159
163
160
-
> [!TIP]
161
-
> If you don't want to use the SDK tool to retrieve the information, you need to find another way to obtain the provisioning information. The endorsement key, which is unique to each TPM chip, is obtained from the TPM chip manufacturer associated with it. You can derive a unique registration ID for your TPM device. For example, you can create an SHA-256 hash of the endorsement key.
164
+
:::moniker-end
165
+
<!-- end 1.1 -->
166
+
167
+
<!-- iotedge-1.4 -->
168
+
:::moniker range=">=iotedge-1.4"
169
+
170
+
> [!NOTE]
171
+
> This article previously used the `tpm_device_provision` tool from the IoT C SDK to generate provisioning info. If you relied on that tool previously, then be aware the steps below generate a different registration ID for the same public endorsement key. If you need to recreate the registration ID as before then refer to how the C SDK's [tpm_device_provision tool](https://github.com/Azure/azure-iot-sdk-c/tree/main/provisioning_client/tools/tpm_device_provision) generates it. Be sure the registration ID for the individual enrollment in DPS matches the regisration ID the IoT Edge device is configured to use.
172
+
173
+
In this section, you use the TPM2 software tools to retrieve the endorsement key for your TPM and then generate a unique registration ID. This section corresponds with [Step 3: Device has firmware and software installed](../iot-dps/concepts-device-oem-security-practices.md#step-3-device-has-firmware-and-software-installed) in the process for [integrating a TPM into the manufacturing process](../iot-dps/concepts-device-oem-security-practices.md#integrating-a-tpm-into-the-manufacturing-process).
174
+
175
+
### Install the TPM2 Tools
176
+
Sign in to your device, and install the `tpm2-tools` package.
177
+
178
+
# [Ubuntu / Debian / Raspberry Pi OS](#tab/ubuntu+debian+rpios)
179
+
180
+
181
+
```bash
182
+
sudo apt-get install tpm2-tools
183
+
```
184
+
185
+
# [Red Hat Enterprise Linux](#tab/rhel)
186
+
187
+
188
+
```bash
189
+
sudo yum install tpm2-tools
190
+
```
191
+
192
+
---
193
+
194
+
Run the following script to read the endorsement key, creating one if it does not already exist.
printf"Gathering the registration information...\n\nRegistration Id:\n%s\n\nEndorsement Key:\n%s\n"$(sha256sum -b ek.pub | cut -d'' -f1 | sed -e 's/[^[:alnum:]]//g')$(base64 -w0 ek.pub)
218
+
$SUDO rm ek.pub srk.ctx 2> /dev/null
219
+
220
+
```
221
+
222
+
The output window displays the device's **Endorsement key** and a unique **Registration ID**. Copy these values for use later when you create an individual enrollment for your device in the device provisioning service.
223
+
224
+
:::moniker-end
225
+
<!-- end iotedge-1.4 -->
162
226
163
227
After you have your registration ID and endorsement key, you're ready to continue.
164
228
229
+
> [!TIP]
230
+
> If you don't want to use the TPM2 software tools to retrieve the information, you need to find another way to obtain the provisioning information. The endorsement key, which is unique to each TPM chip, is obtained from the TPM chip manufacturer associated with it. You can derive a unique registration ID for your TPM device. For example, as shown above you can create an SHA-256 hash of the endorsement key.
231
+
165
232
<!-- Create an enrollment for your device using TPM provisioning information H2 and content -->
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-provision-devices-at-scale-linux-x509.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ The tasks are as follows:
24
24
25
25
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.
26
26
27
+
> [!TIP]
28
+
> If your device has a Hardware Security Module (HSM) such as a TPM 2.0, then we recommend storing the X.509 keys securely in the HSM. Learn more about how to implement the zero-touch provisioning at scale described in [this blueprint](https://azure.microsoft.com/blog/the-blueprint-to-securely-solve-the-elusive-zerotouch-provisioning-of-iot-devices-at-scale) with the [iotedge-tpm2cloud](https://aka.ms/iotedge-tpm2cloud) sample.
29
+
27
30
## Prerequisites
28
31
29
32
<!-- Cloud resources prerequisites H3 and content -->
0 commit comments