Skip to content

Commit 1e5c9dc

Browse files
Merge pull request #244329 from PatAltimore/patricka-gh-move-verify
Move verify section
2 parents 3cca8d5 + de6ffa2 commit 1e5c9dc

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

articles/iot-edge/how-to-connect-downstream-iot-edge-device.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -558,51 +558,6 @@ You should already have IoT Edge installed on your device. If not, follow the st
558558
>
559559
>This error is expected on a newly provisioned device because the IoT Edge Hub module isn't running. To resolve the error, in IoT Hub, set the modules for the device and create a deployment. Creating a deployment for the device starts the modules on the device including the IoT Edge Hub module.
560560
561-
### Verify connectivity from child to parent
562-
563-
01. Verify the TLS/SSL connection from the child to the parent by running the following `openssl` command on the downstream device. Replace `<parent hostname>` with the FQDN or IP address of the parent.
564-
565-
```bash
566-
openssl s_client -connect <parent hostname>:8883 </dev/null 2>&1 >/dev/null
567-
```
568-
569-
The command should assert successful validation of the parent certificate chain similar to the following example:
570-
571-
```Output
572-
azureUser@child-vm:~$ openssl s_client -connect <parent hostname>:8883 </dev/null 2>&1 >/dev/null
573-
Can't use SSL_get_servername
574-
depth=3 CN = Azure_IoT_Hub_CA_Cert_Test_Only
575-
verify return:1
576-
depth=2 CN = Azure_IoT_Hub_Intermediate_Cert_Test_Only
577-
verify return:1
578-
depth=1 CN = gateway.ca
579-
verify return:1
580-
depth=0 CN = <parent hostname>
581-
verify return:1
582-
DONE
583-
```
584-
585-
The "Can't use SSL_get_servername" message can be ignored.
586-
587-
The `depth=0 CN = ` value should match the **hostname** parameter specified in the parent's `config.toml` configuration file.
588-
589-
If the command times out, there may be blocked ports between the child and parent devices. Review the network configuration and settings for the devices.
590-
591-
> [!WARNING]
592-
> Not using a full-chain certificate in the gateway's `[edge_ca]` section results in certificate validation errors from the downstream device. For example, the `openssl s_client ...` command above will produce:
593-
>
594-
> ```
595-
> Can't use SSL_get_servername
596-
> depth=1 CN = gateway.ca
597-
> verify error:num=20:unable to get local issuer certificate
598-
> verify return:1
599-
> depth=0 CN = <parent hostname>
600-
> verify return:1
601-
> DONE
602-
> ```
603-
>
604-
> The same issue occurs for TLS-enabled devices that connect to the downstream IoT Edge device if the full-chain device certificate isn't used and configured on the downstream device.
605-
606561
## Network isolate downstream devices
607562
608563
The steps so far in this article set up IoT Edge devices as either a gateway or a downstream device, and create a trusted connection between them. The gateway device handles interactions between the downstream device and IoT Hub, including authentication and message routing. Modules deployed to downstream IoT Edge devices can still create their own connections to cloud services.
@@ -632,7 +587,7 @@ For each gateway device in a lower layer, network operators need to:
632587
* Provide a static IP address.
633588
* Authorize outbound communications from this IP address to the parent gateway's IP address over ports 443 (HTTPS) and 5671 (AMQP).
634589
635-
### Deploy modules to top layer devices
590+
## Deploy modules to top layer devices
636591
637592
The IoT Edge device at the top layer of a gateway hierarchy has a set of required modules that must be deployed to it, in addition to any workload modules you may run on the device.
638593
@@ -829,11 +784,11 @@ The API proxy module was designed to be customized to handle most common gateway
829784
830785
---
831786
832-
### Deploy modules to lower layer devices
787+
## Deploy modules to lower layer devices
833788
834789
IoT Edge devices in lower layers of a gateway hierarchy have one required module that must be deployed to them, in addition to any workload modules you may run on the device.
835790
836-
#### Route container image pulls
791+
### Route container image pulls
837792
838793
Before discussing the required proxy module for IoT Edge devices in gateway hierarchies, it's important to understand how IoT Edge devices in lower layers get their module images.
839794
@@ -847,7 +802,7 @@ The API proxy module can only route to one registry module, and each registry mo
847802
848803
If you don't want lower layer devices making module pull requests through a gateway hierarchy, another option is to manage a local registry solution. Or, push the module images onto the devices before creating deployments and then set the **imagePullPolicy** to **never**.
849804
850-
#### Bootstrap the IoT Edge agent
805+
### Bootstrap the IoT Edge agent
851806
852807
The IoT Edge agent is the first runtime component to start on any IoT Edge device. You need to make sure that any downstream IoT Edge devices can access the edgeAgent module image when they start up, and then they can access deployments and start the rest of the module images.
853808
@@ -866,7 +821,7 @@ image: "{Parent FQDN or IP}:443/azureiotedge-agent:1.4"
866821
867822
If you are using a local container registry, or providing the container images manually on the device, update the config file accordingly.
868823
869-
#### Configure runtime and deploy proxy module
824+
### Configure runtime and deploy proxy module
870825
871826
The **API proxy module** is required for routing all communications between the cloud and any downstream IoT Edge devices. An IoT Edge device in the bottom layer of the hierarchy, with no downstream IoT Edge devices, does not need this module.
872827
@@ -935,6 +890,51 @@ The API proxy module was designed to be customized to handle most common gateway
935890
1. Select **Review + create** to go to the final step.
936891
1. Select **Create** to deploy to your device.
937892
893+
## Verify connectivity from child to parent
894+
895+
01. Verify the TLS/SSL connection from the child to the parent by running the following `openssl` command on the downstream device. Replace `<parent hostname>` with the FQDN or IP address of the parent.
896+
897+
```bash
898+
openssl s_client -connect <parent hostname>:8883 </dev/null 2>&1 >/dev/null
899+
```
900+
901+
The command should assert successful validation of the parent certificate chain similar to the following example:
902+
903+
```Output
904+
azureUser@child-vm:~$ openssl s_client -connect <parent hostname>:8883 </dev/null 2>&1 >/dev/null
905+
Can't use SSL_get_servername
906+
depth=3 CN = Azure_IoT_Hub_CA_Cert_Test_Only
907+
verify return:1
908+
depth=2 CN = Azure_IoT_Hub_Intermediate_Cert_Test_Only
909+
verify return:1
910+
depth=1 CN = gateway.ca
911+
verify return:1
912+
depth=0 CN = <parent hostname>
913+
verify return:1
914+
DONE
915+
```
916+
917+
The "Can't use SSL_get_servername" message can be ignored.
918+
919+
The `depth=0 CN = ` value should match the **hostname** parameter specified in the parent's `config.toml` configuration file.
920+
921+
If the command times out, there may be blocked ports between the child and parent devices. Review the network configuration and settings for the devices.
922+
923+
> [!WARNING]
924+
> Not using a full-chain certificate in the gateway's `[edge_ca]` section results in certificate validation errors from the downstream device. For example, the `openssl s_client ...` command above will produce:
925+
>
926+
> ```
927+
> Can't use SSL_get_servername
928+
> depth=1 CN = gateway.ca
929+
> verify error:num=20:unable to get local issuer certificate
930+
> verify return:1
931+
> depth=0 CN = <parent hostname>
932+
> verify return:1
933+
> DONE
934+
> ```
935+
>
936+
> The same issue occurs for TLS-enabled devices that connect to the downstream IoT Edge device if the full-chain device certificate isn't used and configured on the downstream device.
937+
938938
## Integrate Microsoft Defender for IoT with IoT Edge gateway
939939
940940
Downstream devices can be used to integrate the Microsoft Defender for IoT's micro agent with the IoT Edge gateway using downstream device proxying.

0 commit comments

Comments
 (0)