The agent will use this protocol, and communicate with the IoT Hub on port 443.
HTTP Proxy configuration is supported for this protocol, in the case that proxy is also configured, the port of communication with the proxy will be as defined in the proxy configuration.
Authenticate the micro agent
There are two options that can be used to authenticate the Defender for IoT micro agent:
Authenticate using a module identity connection string
You will need to copy the module identity connection string from the DefenderIoTMicroAgent module identity details.
To copy the module identity's connection string:
Navigate to the IoT Hub > Your hub > Device management > Devices.
Select a device from the Device ID list.
Select the Module Identities tab.
Select the DefenderIotMicroAgent module from the list of module identities associated with the device.
Copy the Connection string (primary key) by selecting the copy button.
Create a file named connection_string.txt containing the copied connection string encoded in utf-8 in the Defender for IoT agent directory /etc/defender_iot_micro_agent path by entering the following command:
The connection_string.txt will now be located in the following path location /etc/defender_iot_micro_agent/connection_string.txt.
Märkus
The connection string includes a key that enables direct access to the module itself, therefore includes sensitive information that should only be used and readable by root users.
Place the PEM-encoded public part of the certificate, and the private key, in /etc/defender_iot_micro_agent, to files called certificate_public.pem, and certificate_private.pem.
Place the appropriate connection string in to the connection_string.txt file. The connection string should look like this:
HostName=<the host name of the iot hub>;DeviceId=<the id of the device>;ModuleId=<the id of the module>;x509=true
This string alerts the Defender for IoT agent to expect a certificate to be provided for authentication.
Use the following command to ensure the micro agent is running properly:
Bash
systemctl status defender-iot-micro-agent.service
Ensure that the service is stable by making sure it's active, and that the uptime of the process is appropriate.
Test the system
You can test the system by creating a trigger file on the device. The trigger file will cause the baseline scan in the agent to detect the file as a baseline violation.
Create a file on the file system with the following command:
Microsoft Defender for IoT provides comprehensive threat detection for IoT/OT environments, with multiple deployment options including fully on-premises, cloud-connected, or hybrid.