Defining Env variables
Because Lightweight Encryption Server works by fetching data from Event-hub, it needs appropriate connection strings.
The way of providing the necessary information is by the means of environment variables set in the process of installing the Lightweight Encryption Server module on the IoT edge device.
The environment variables that need to be set are the following:
- IOT_HUB_CONN_STR – IoT Hub connection string. This is needed because Lightweight Encryption Server utilizes direct messages.
It can be found in IoT-Hub → Shared access policies
- EVENT_HUB_CONN_STR – This is an Event Hub compatible endpoint connection string with the read permission.
It can be found in IoT-Hub → Built-in endpoints → Event Hub-compatible endpoint
And one optional environment variable:
- EVENT_HUB_CONSUMER_GROUP_NAME – consumer group defined for the event hub endpoint. It is optional. On default, it will become “$Default” consumer.
It can be found in IoT-Hub → Built-in endpoints → Event → Consumer Groups