Skip to content

Commit d7e80c4

Browse files
authored
Merge pull request #203676 from w-azure/winona-device-ca
Changed device CA to edge CA
2 parents 691dbaa + a4ab5d1 commit d7e80c4

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

articles/iot-edge/how-to-manage-device-certificates.md

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ To learn more about the different types of certificates and their roles, see [Un
2727
>[!NOTE]
2828
>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.
2929
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+
3041
### Prerequisites
3142

3243
* An IoT Edge device.
@@ -41,9 +52,21 @@ To learn more about the different types of certificates and their roles, see [Un
4152

4253
You should use your own certificate authority to create the following files:
4354

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"
4465
* Root CA
4566
* Device CA certificate
4667
* Device CA private key
68+
:::moniker-end
69+
<!-- end-1.1 -->
4770

4871
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.
4972

@@ -54,6 +77,7 @@ In this article, what we refer to as the *root CA* is not the topmost certificat
5477
> Currently, a limitation in libiothsm prevents the use of certificates that expire on or after January 1, 2038.
5578
5679
:::moniker-end
80+
<!-- end-1.1 -->
5781

5882
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).
5983

@@ -65,9 +89,21 @@ Copy the three certificate and key files onto your IoT Edge device.
6589

6690
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:
6791

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`
96+
* Root CA: `<WRKDIR>\certs\azure-iot-test-only.root.ca.cert.pem`
97+
:::moniker-end
98+
<!-- end-1.2 -->
99+
100+
<!-- 1.1 -->
101+
:::moniker range="iotedge-2018-06"
68102
* Device CA certificate: `<WRKDIR>\certs\iot-edge-device-MyEdgeDeviceCA-full-chain.cert.pem`
69103
* Device CA private key: `<WRKDIR>\private\iot-edge-device-MyEdgeDeviceCA.key.pem`
70104
* Root CA: `<WRKDIR>\certs\azure-iot-test-only.root.ca.cert.pem`
105+
:::moniker-end
106+
<!-- end-1.1 -->
71107

72108
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.
73109

@@ -151,8 +187,8 @@ If you are using IoT Edge for Linux on Windows, you need to use the SSH key loca
151187

152188
```toml
153189
[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>"
156192
```
157193

158194
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
161197
* The certificate files should be owned by the **aziotcs** group.
162198

163199
>[!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.
165201

166202
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.
167203

@@ -180,8 +216,19 @@ If you are using IoT Edge for Linux on Windows, you need to use the SSH key loca
180216

181217
IoT Edge automatically generates certificates on the device in several cases, including:
182218

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"
183228
* 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.
184229
* The IoT Edge security manager also generates a **workload CA certificate** signed by the device CA certificate
230+
:::moniker-end
231+
<!-- end 1.1 -->
185232

186233
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).
187234

@@ -190,10 +237,15 @@ For these two automatically generated certificates, you have the option of setti
190237
>[!NOTE]
191238
>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.
192239

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 -->
194245

195246
<!-- 1.1. -->
196247
:::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.
197249

198250
# [Linux containers](#tab/linux)
199251

@@ -292,7 +344,7 @@ Upon expiry after the specified number of days, IoT Edge has to be restarted to
292344
sudo iotedge check --verbose
293345
```
294346

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.
296348
:::moniker-end
297349
<!-- end 1.2 -->
298350

articles/iot-edge/iot-edge-certs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This article explains how IoT Edge certificates can work in production, developm
3737

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

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

4242
<!--1.1-->
4343
:::moniker range="iotedge-2018-06"

0 commit comments

Comments
 (0)