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-connect-downstream-iot-edge-device.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ For example, the following commands create a root CA certificate, a parent devic
130
130
131
131
For more information about creating test certificates, see [create demo certificates to test IoT Edge device features](how-to-create-test-certificates.md).
132
132
133
-
01. You'll need to transfer the certificates and keys to each device. You can use a USB drive, a service like [Azure Key Vault](../key-vault/general/overview.md), or with a function like [Secure file copy](https://www.ssh.com/ssh/scp/). Choose one of these methods that best matches your scenario.
133
+
01. You'll need to transfer the certificates and keys to each device. You can use a USB drive, a service like [Azure Key Vault](../key-vault/general/overview.md), or with a function like [Secure file copy](https://www.ssh.com/ssh/scp/). Choose one of these methods that best matches your scenario. Copy the files to the preferred directory for certificates and keys. Use `/var/aziot/certs` for certificates and `/var/aziot/secrets` for keys.
134
134
135
135
For more information on installing certificates on a device, see [Manage certificates on an IoT Edge device](how-to-manage-device-certificates.md).
136
136
@@ -140,22 +140,22 @@ To configure your parent device, open a local or remote command shell.
140
140
141
141
To enable secure connections, every IoT Edge parent device in a gateway scenario needs to be configured with a unique device CA certificate and a copy of the root CA certificate shared by all devices in the gateway hierarchy.
142
142
143
-
01. Transfer the **root CA certificate**, **parent device CA certificate**, and **parent private key** to the parent device. The examples in this article use the directory `/var/secrets` for the certificates and keys directory.
143
+
01. Transfer the **root CA certificate**, **parent device CA certificate**, and **parent private key** to the parent device. The examples in this article use the preferred directory `/var/aziot` for the certificates and keys.
144
144
145
145
01. Install the **root CA certificate** on the parent IoT Edge device. First, copy the root certificate into the certificate directory and add `.crt` to the end of the file name. Next, update the certificate store on the device using the platform-specific command.
01. Find or add the **Edge CA certificate** section in the config file. Update the certificate `cert` and private key `pk` parameters with the file URI paths for the certificate and key files on the parent IoT Edge device. IoT Edge requires the certificate and private key to be in text-based privacy-enhanced mail (PEM) format. For example:
01. Verify your IoT Edge device uses the correct version of the IoT Edge agent when it starts. Find the **Default Edge Agent** section and set the image value for IoT Edge to version 1.4. For example:
@@ -238,11 +238,11 @@ You should already have IoT Edge installed on your device. If not, follow the st
01. Save and close the `config.toml` configuration file. For example if you're using the **nano** editor, select**Ctrl+O** - *Write Out*, **Enter**, and **Ctrl+X** - *Exit*.
@@ -319,22 +319,22 @@ To configure your child device, open a local or remote command shell.
319
319
320
320
To enable secure connections, every IoT Edge child device in a gateway scenario needs to be configured with a unique device CA certificate and a copy of the root CA certificate shared by all devices in the gateway hierarchy.
321
321
322
-
01. Transfer the **root CA certificate**, **child device CA certificate**, and **child private key** to the child device. The examples in this article use the directory `/var/secrets` for the certificates and keys directory.
322
+
01. Transfer the **root CA certificate**, **child device CA certificate**, and **child private key** to the child device. The examples in this article use the directory `/var/aziot` for the certificates and keys directory.
323
323
324
324
01. Install the **root CA certificate** on the child IoT Edge device. First, copy the root certificate into the certificate directory and add `.crt` to the end of the file name. Next, update the certificate store on the device using the platform-specific command.
01. Find or add the **Edge CA certificate** section in the configuration file. Update the certificate `cert` and private key `pk` parameters with the file URI paths for the certificate and key files on the IoT Edge child device. IoT Edge requires the certificate and private key to be in text-based privacy-enhanced mail (PEM) format. For example:
01. Verify your IoT Edge device uses the correct version of the IoT Edge agent when it starts. Find the **Default Edge Agent** section and set the image value for IoT Edge to version 1.4. For example:
@@ -405,11 +405,11 @@ You should already have IoT Edge installed on your device. If not, follow the st
01. Save and close the `config.toml` configuration file. For example if you're using the **nano** editor, select**Ctrl+O** - *Write Out*, **Enter**, and **Ctrl+X** - *Exit*.
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-create-transparent-gateway.md
+35-22Lines changed: 35 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,12 +114,30 @@ If you don't have your own certificate authority and want to use demo certificat
114
114
115
115
# [IoT Edge](#tab/iotedge)
116
116
117
-
If you created the certificates on a different machine, copy them over to your IoT Edge device then proceed with the next steps. You can use a USB drive, a service like [Azure Key Vault](../key-vault/general/overview.md), or with a function like [Secure file copy](https://www.ssh.com/ssh/scp/). Choose one of these methods that best matches your scenario.
117
+
1. If you created the certificates on a different machine, copy them over to your IoT Edge device. You can use a USB drive, a service like [Azure Key Vault](../key-vault/general/overview.md), or with a function like [Secure file copy](https://www.ssh.com/ssh/scp/).
118
+
1. Move the files to the preferred directory for certificates and keys. Use `/var/aziot/certs` for certificates and `/var/aziot/secrets` for keys.
119
+
1. Change the ownership and permissions of the certificates and keys.
120
+
121
+
```bash
122
+
sudo chown aziotcs:aziotcs /var/aziot/certs
123
+
sudo chown -R iotedge /var/aziot/certs
124
+
sudo chmod 644 /var/aziot/secrets/
125
+
```
118
126
119
127
# [IoT Edge for Linux on Windows](#tab/eflow)
120
128
121
129
Now, you need to copy the certificates to the Azure IoT Edge for Linux on Windows virtual machine.
122
130
131
+
1. Copy the certificates to the EFLOW virtual machine to a directory where you have write access. For example, the `/home/iotedge-user` home directory.
1. Open an elevated _PowerShell_ session by starting with **Run as Administrator**.
124
142
125
143
Connect to the EFLOW virtual machine.
@@ -128,38 +146,33 @@ Now, you need to copy the certificates to the Azure IoT Edge for Linux on Window
128
146
Connect-EflowVm
129
147
```
130
148
131
-
1. Create the certificates directory. You can select any writeable directory. For this tutorial, we'll use the _iotedge-user_ home folder.
149
+
1. Create the certificates directory. You should store your certificates and keys to the preferred `/var/aziot`directory. Use `/var/aziot/certs` for certificates and `/var/aziot/secrets` for keys.
132
150
133
151
```bash
134
-
cd~
135
-
mkdir certs
136
-
cd certs
137
-
mkdir certs
138
-
mkdir private
152
+
sudo mkdir -p /var/aziot/certs
153
+
sudo mkdir -p /var/aziot/secrets
139
154
```
140
155
141
-
1.Exit the EFLOW VM connection.
156
+
1.Move the certificates and keys to the preferred `/var/aziot` directory.
142
157
143
158
```bash
144
-
exit
159
+
# Move the IoT Edge device CA certificate and key to preferred location
1. Invoke the following commands on the EFLOW VM to grant *iotedge* permissions to the certificate files since `Copy-EflowVMFile` copies files with root only access permissions.
@@ -149,7 +149,7 @@ Each device requires the Certificate Authority (CA) certificate that is associat
149
149
1. Certificates should be owned by the key service user **aziotks**. Set the ownership to **aziotks**for all the certificate files.
150
150
151
151
```bash
152
-
sudo chown aziotks:aziotks /var/secrets/*.pem
152
+
sudo chown aziotks:aziotks /var/aziot/certs/*.pem
153
153
```
154
154
155
155
## Provision IoT Edge device using DPS
@@ -159,7 +159,7 @@ Using Device Provisioning Service allows you to automatically issue and renew ce
159
159
### Upload CA certificate to DPS
160
160
161
161
1. If you don't have a Device Provisioning Service linked to IoT Hub, see [Quickstart: Set up the IoT Hub Device Provisioning Service with the Azure portal](../iot-dps/quick-setup-auto-provision.md).
162
-
1. Transfer the `cacert.crt.pem` file from your device to a computer with access to the Azure portal such as your development computer. An easy way to transfer the certificate is to remotely connect to your device, display the certificate using the command `cat /var/secrets/cacert.crt.pem`, copy the entire output, and paste the contents to a new file on your development computer.
162
+
1. Transfer the `cacert.crt.pem` file from your device to a computer with access to the Azure portal such as your development computer. An easy way to transfer the certificate is to remotely connect to your device, display the certificate using the command `cat /var/aziot/certs/cacert.crt.pem`, copy the entire output, and paste the contents to a new file on your development computer.
163
163
1. In the [Azure portal](https://portal.azure.com), navigate to your instance of IoT Hub Device Provisioning Service.
164
164
1. Under **Settings**, select **Certificates**, then **+Add**.
165
165
@@ -233,7 +233,7 @@ On the IoT Edge device, update the IoT Edge configuration file to use device cer
233
233
# Optional if the EST server's TLS certificate is already trusted by the system's CA certificates.
0 commit comments