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-manage-device-certificates.md
+57-5Lines changed: 57 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,17 @@ To learn more about the different types of certificates and their roles, see [Un
27
27
>[!NOTE]
28
28
>The term "root CA" used throughout this article refers to the topmost authority public certificate of the certificate chain for your IoT solution. You do not need to use the certificate root of a syndicated certificate authority, or the root of your organization's certificate authority. In many cases, it is actually an intermediate CA public certificate.
29
29
30
+
<!-- 1.2 -->
31
+
:::moniker range=">=iotedge-2020-11"
32
+
33
+
## Changes in version 1.2
34
+
35
+
* The **device CA certificate** was renamed as **edge CA certificate**.
36
+
* The **workload CA certificate** was deprecated. Now the IoT Edge security manager generates the IoT Edge hub server certificate directly from the edge CA certificate, without the intermediate workload CA certificate between them.
37
+
38
+
:::moniker-end
39
+
<!-- end-1.2 -->
40
+
30
41
### Prerequisites
31
42
32
43
* An IoT Edge device.
@@ -41,9 +52,21 @@ To learn more about the different types of certificates and their roles, see [Un
41
52
42
53
You should use your own certificate authority to create the following files:
43
54
55
+
<!-- 1.2 -->
56
+
:::moniker range=">=iotedge-2020-11"
57
+
* Root CA
58
+
* Edge CA certificate
59
+
* Edge CA private key
60
+
:::moniker-end
61
+
<!-- end-1.2 -->
62
+
63
+
<!-- 1.1 -->
64
+
:::moniker range="iotedge-2018-06"
44
65
* Root CA
45
66
* Device CA certificate
46
67
* Device CA private key
68
+
:::moniker-end
69
+
<!-- end-1.1 -->
47
70
48
71
In this article, what we refer to as the *root CA* is not the topmost certificate authority for an organization. It's the topmost certificate authority for the IoT Edge scenario, which the IoT Edge hub module, user modules, and any downstream devices use to establish trust between each other.
49
72
@@ -54,6 +77,7 @@ In this article, what we refer to as the *root CA* is not the topmost certificat
54
77
> Currently, a limitation in libiothsm prevents the use of certificates that expire on or after January 1, 2038.
55
78
56
79
:::moniker-end
80
+
<!-- end-1.1 -->
57
81
58
82
To see an example of these certificates, review the scripts that create demo certificates in [Managing test CA certificates for samples and tutorials](https://github.com/Azure/iotedge/tree/master/tools/CACertificates).
59
83
@@ -65,9 +89,21 @@ Copy the three certificate and key files onto your IoT Edge device.
65
89
66
90
If you used the sample scripts to [create demo certificates](how-to-create-test-certificates.md), the three certificate and key files are located at the following paths:
67
91
92
+
<!-- 1.2 -->
93
+
:::moniker range=">=iotedge-2020-11"
94
+
* Edge CA certificate: `<WRKDIR>\certs\iot-edge-device-MyEdgeDeviceCA-full-chain.cert.pem`
95
+
* Edge CA private key: `<WRKDIR>\private\iot-edge-device-MyEdgeDeviceCA.key.pem`
You can use a service like [Azure Key Vault](../key-vault/index.yml) or a function like [Secure copy protocol](https://www.ssh.com/ssh/scp/) to move the certificate files. If you generated the certificates on the IoT Edge device itself, you can skip this step and use the path to the working directory.
73
109
@@ -151,8 +187,8 @@ If you are using IoT Edge for Linux on Windows, you need to use the SSH key loca
151
187
152
188
```toml
153
189
[edge_ca]
154
-
cert = "file:///<path>/<device CA cert>"
155
-
pk = "file:///<path>/<device CA key>"
190
+
cert = "file:///<path>/<edge CA cert>"
191
+
pk = "file:///<path>/<edge CA key>"
156
192
```
157
193
158
194
1. Make sure that the service has read permissions for the directories holding the certificates and keys.
@@ -161,7 +197,7 @@ If you are using IoT Edge for Linux on Windows, you need to use the SSH key loca
161
197
* The certificate files should be owned by the **aziotcs** group.
162
198
163
199
>[!TIP]
164
-
>If your device CA certificate is read-only, meaning you created it and don't want the IoT Edge service to rotate it, set the private key file to mode 0440 and the certificate file to mode 0444. If you created the initial files and then configured the cert service to rotate the device CA certificate in the future, set the private key file to mode 0660 and the certificate file to mode 0664.
200
+
>If your edge CA certificate is read-only, meaning you created it and don't want the IoT Edge service to rotate it, set the private key file to mode 0440 and the certificate file to mode 0444. If you created the initial files and then configured the cert service to rotate the edge CA certificate in the future, set the private key file to mode 0660 and the certificate file to mode 0664.
165
201
166
202
1. If you've used any other certificates for IoT Edge on the device before, delete the files in the following directory. IoT Edge will recreate them with the new CA certificate you provided.
167
203
@@ -180,8 +216,19 @@ If you are using IoT Edge for Linux on Windows, you need to use the SSH key loca
180
216
181
217
IoT Edge automatically generates certificates on the device in several cases, including:
182
218
219
+
<!-- 1.2 -->
220
+
:::moniker range=">=iotedge-2020-11"
221
+
* If you don't provide your own production certificates when you install and provision IoT Edge, the IoT Edge security manager automatically generates a **edge CA certificate**. This self-signed certificate is only meant for development and testing scenarios, not production. This certificate expires after 90 days.
222
+
* The IoT Edge security manager also generates a **workload CA certificate** signed by the edge CA certificate
223
+
:::moniker-end
224
+
<!-- end 1.2 -->
225
+
226
+
<!-- 1.1. -->
227
+
:::moniker range="iotedge-2018-06"
183
228
* If you don't provide your own production certificates when you install and provision IoT Edge, the IoT Edge security manager automatically generates a **device CA certificate**. This self-signed certificate is only meant for development and testing scenarios, not production. This certificate expires after 90 days.
184
229
* The IoT Edge security manager also generates a **workload CA certificate** signed by the device CA certificate
230
+
:::moniker-end
231
+
<!-- end 1.1 -->
185
232
186
233
For more information about the function of the different certificates on an IoT Edge device, see [Understand how Azure IoT Edge uses certificates](iot-edge-certs.md).
187
234
@@ -190,10 +237,15 @@ For these two automatically generated certificates, you have the option of setti
190
237
>[!NOTE]
191
238
>There is a third auto-generated certificate that the IoT Edge security manager creates, the **IoT Edge hub server certificate**. This certificate always has a 30 day lifetime, but is automatically renewed before expiring. The auto-generated CA lifetime value set in the config file doesn't affect this certificate.
192
239
193
-
Upon expiry after the specified number of days, IoT Edge has to be restarted to regenerate the device CA certificate. The device CA certificate won't be renewed automatically.
240
+
<!-- 1.2 -->
241
+
:::moniker range=">=iotedge-2020-11"
242
+
Upon expiry after the specified number of days, IoT Edge has to be restarted to regenerate the edge CA certificate. The edge CA certificate won't be renewed automatically.
243
+
:::moniker-end
244
+
<!-- end 1.2 -->
194
245
195
246
<!-- 1.1. -->
196
247
:::moniker range="iotedge-2018-06"
248
+
Upon expiry after the specified number of days, IoT Edge has to be restarted to regenerate the device CA certificate. The device CA certificate won't be renewed automatically.
197
249
198
250
# [Linux containers](#tab/linux)
199
251
@@ -292,7 +344,7 @@ Upon expiry after the specified number of days, IoT Edge has to be restarted to
292
344
sudo iotedge check --verbose
293
345
```
294
346
295
-
Check the output of the **production readiness: certificates** check, which lists the number of days until the automatically generated device CA certificates expire.
347
+
Check the output of the **production readiness: certificates** check, which lists the number of days until the automatically generated edge CA certificates expire.
Copy file name to clipboardExpand all lines: articles/iot-edge/iot-edge-certs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ This article explains how IoT Edge certificates can work in production, developm
37
37
38
38
There are two common scenarios for setting up certificates on an IoT Edge device. Sometimes the end user, or operator, of a device purchases a generic device made by a manufacturer then manages the certificates themselves. Other times, the manufacturer works under contract to build a custom device for the operator and does some initial certificate signing before handing off the device. The IoT Edge certificate design attempts to take both scenarios into account.
39
39
40
-
The following figure illustrates IoT Edge's usage of certificates. There may be zero, one, or many intermediate signing certificates between the root CA certificate and the device CA certificate, depending on the number of entities involved. Here we show one case.
40
+
The following figure illustrates IoT Edge's usage of certificates. There may be zero, one, or many intermediate signing certificates between the root CA certificate and the edge CA certificate, depending on the number of entities involved. Here we show one case.
0 commit comments