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
description: This article shows you how to configure Azure IoT Edge device settings and options using the config.toml file.
4
4
author: PatAltimore
5
5
ms.author: patricka
6
-
ms.date: 3/6/2023
6
+
ms.date: 04/20/2023
7
7
ms.topic: how-to
8
8
ms.service: iot-edge
9
9
services: iot-edge
@@ -13,11 +13,11 @@ services: iot-edge
13
13
14
14
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.
15
15
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.
17
17
18
18
## Global parameters
19
19
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/).
21
21
22
22
### Hostname
23
23
@@ -56,14 +56,34 @@ For more information about the IoT Edge trust bundle, see [Manage trusted root C
56
56
57
57
### Elevated Docker Permissions
58
58
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.
60
60
61
61
If no modules require privileged or extra capabilities, use **allow_elevated_docker_permissions** to improve the security of the device.
62
62
63
63
```toml
64
64
allow_elevated_docker_permissions = false
65
65
```
66
66
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
+
67
87
## Provisioning
68
88
69
89
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
210
230
cloud_retries = 1
211
231
```
212
232
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
-
231
233
## Certificate issuance
232
234
233
235
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
254
256
255
257
### EST ID cert requested via EST bootstrap ID cert
256
258
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.
0 commit comments