Skip to content

Commit dc2f9f9

Browse files
Merge pull request #235253 from PatAltimore/patricka-device-settings-fix
Move auto reprovisioning setting to global section
2 parents 42a6888 + 204ccfb commit dc2f9f9

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

articles/iot-edge/configure-device.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Configure Azure IoT Edge device settings
33
description: This article shows you how to configure Azure IoT Edge device settings and options using the config.toml file.
44
author: PatAltimore
55
ms.author: patricka
6-
ms.date: 3/6/2023
6+
ms.date: 04/20/2023
77
ms.topic: how-to
88
ms.service: iot-edge
99
services: iot-edge
@@ -13,11 +13,11 @@ services: iot-edge
1313

1414
This article shows settings and options for configuring the IoT Edge *config.toml* file of an IoT Edge device. IoT Edge uses the *config.toml* file to initialize settings for the device. Each of the sections of the *config.toml* file has several options. Not all options are mandatory, as they apply to specific scenarios.
1515

16-
A template containing all options can be found in the *config.toml.edge.template* file within the */etc/aziot* directory on an IoT Edge device. You have the option to copy the contents of the whole template or sections of the template into your *config.toml* file. Uncomment the sections you need. Be aware not to copy over parameters you have already defined.
16+
A template containing all options can be found in the *config.toml.edge.template* file within the */etc/aziot* directory on an IoT Edge device. You can copy the contents of the whole template or sections of the template into your *config.toml* file. Uncomment the sections you need. Be aware not to copy over parameters you have already defined.
1717

1818
## Global parameters
1919

20-
The `hostname`, `parent_hostname`, `trust_bundle_cert`, and `allow_elevated_docker_permissions` parameters must be at the beginning of the configuration file before any other sections. Adding parameters before defined sections ensures they're applied correctly. For more information on valid syntax, see [toml.io ](https://toml.io/).
20+
The **hostname**, **parent_hostname**, **trust_bundle_cert**, **allow_elevated_docker_permissions**, and **auto_reprovisioning_mode** parameters must be at the beginning of the configuration file before any other sections. Adding parameters before a collection of settings ensures they're applied correctly. For more information on valid syntax, see [toml.io ](https://toml.io/).
2121

2222
### Hostname
2323

@@ -56,14 +56,34 @@ For more information about the IoT Edge trust bundle, see [Manage trusted root C
5656

5757
### Elevated Docker Permissions
5858

59-
Some docker capabilities can be used to gain root access. By default, the **--privileged** flag and all capabilities listed in the **CapAdd** parameter of the docker **HostConfig** are allowed.
59+
Some docker capabilities can be used to gain root access. By default, the `--privileged` flag and all capabilities listed in the **CapAdd** parameter of the docker **HostConfig** are allowed.
6060

6161
If no modules require privileged or extra capabilities, use **allow_elevated_docker_permissions** to improve the security of the device.
6262

6363
```toml
6464
allow_elevated_docker_permissions = false
6565
```
6666

67+
### Auto reprovisioning mode
68+
69+
The optional **auto_reprovisioning_mode** parameter specifies the conditions that decide when a device attempts to automatically reprovision with Device Provisioning Service. Auto provisioning mode is ignored if the device has been provisioned manually. For more information about setting DPS provisioning mode, see the [Provisioning](#provisioning) section in this article for more information.
70+
71+
One of the following values can be set:
72+
73+
| Mode | Description |
74+
|------|-------------|
75+
| Dynamic | Reprovision when the device detects that it may have been moved from one IoT Hub to another. This mode is *the default*. |
76+
| AlwaysOnStartup | Reprovision when the device is rebooted or a crash causes the daemons to restart. |
77+
| OnErrorOnly | Never trigger device reprovisioning automatically. Device reprovisioning only occurs as fallback, if the device is unable to connect to IoT Hub during identity provisioning due to connectivity errors. This fallback behavior is implicit in Dynamic and AlwaysOnStartup modes as well. |
78+
79+
For example:
80+
81+
```toml
82+
auto_reprovisioning_mode = "Dynamic"
83+
```
84+
85+
For more information about device reprovisioning, see [IoT Hub Device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
86+
6787
## Provisioning
6888

6989
You can provision a single device or multiple devices at-scale, depending on the needs of your IoT Edge solution. The options available for authenticating communications between your IoT Edge devices and your IoT hubs depend on what provisioning method you choose.
@@ -210,24 +230,6 @@ cloud_timeout_sec = 10
210230
cloud_retries = 1
211231
```
212232

213-
### Optional auto reprovisioning mode
214-
215-
The **auto_reprovisioning_mode** parameter specifies the conditions that decide when a device attempts to automatically reprovision with Device Provisioning Service. It's ignored if the device has been provisioned manually. One of the following values can be set:
216-
217-
| Mode | Description |
218-
|------|-------------|
219-
| Dynamic | Reprovision when the device detects that it may have been moved from one IoT Hub to another. This mode is *the default*. |
220-
| AlwaysOnStartup | Reprovision when the device is rebooted or a crash causes the daemons to restart. |
221-
| OnErrorOnly | Never trigger device reprovisioning automatically. Device reprovisioning only occurs as fallback, if the device is unable to connect to IoT Hub during identity provisioning due to connectivity errors. This fallback behavior is implicit in Dynamic and AlwaysOnStartup modes as well. |
222-
223-
For example:
224-
225-
```toml
226-
auto_reprovisioning_mode = Dynamic
227-
```
228-
229-
For more information about device reprovisioning, see [IoT Hub Device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
230-
231233
## Certificate issuance
232234

233235
If you configured any dynamically issued certs, choose your corresponding issuance method and replace the sample values with your own.
@@ -254,7 +256,7 @@ identity_pk = "pkcs11:slot-id=0;object=est-id?pin-value=1234" # PKCS#11 URI
254256

255257
### EST ID cert requested via EST bootstrap ID cert
256258

257-
Authentication with a TLS client certificate which are used once to create the initial EST ID certificate. After the first certificate issuance, an `identity_cert` and `identity_pk` are automatically created and used for future authentication and renewals. The Subject Common Name (CN) of the generated EST ID certificate is always the same as the configured device ID under the provisioning section. These files must be readable by the users aziotcs and aziotks, respectively.
259+
Authentication with a TLS client certificate that is used once to create the initial EST ID certificate. After the first certificate issuance, an `identity_cert` and `identity_pk` are automatically created and used for future authentication and renewals. The Subject Common Name (CN) of the generated EST ID certificate is always the same as the configured device ID under the provisioning section. These files must be readable by the users *aziotcs* and *aziotks*, respectively.
258260

259261
```toml
260262
bootstrap_identity_cert = "file:///var/aziot/certs/est-bootstrap-id.pem"
@@ -302,7 +304,7 @@ The TPM index persists the DPS authentication key. The index is taken as an offs
302304
auth_key_index = "0x00_01_00"
303305
```
304306

305-
Use authorization values for endorsement and owner hierarchies, if needed. By default, these are empty strings.
307+
Use authorization values for endorsement and owner hierarchies, if needed. By default, these values are empty strings.
306308

307309
```toml
308310
[tpm.hierarchy_authorization]

0 commit comments

Comments
 (0)