@@ -78,6 +78,9 @@ skip_crc_check = {{ .PacketForwarder.SkipCRCCheck }}
7878# LoRa Server MQTT backend. Therefore only change these values when
7979# absolutely needed.
8080# Use "{{ "{{ .MAC }}" }}" as an substitution for the LoRa gateway MAC.
81+ #
82+ # Note that some authentication types might overwrite these templates (e.g.
83+ # in case of GCP Cloud IoT Core)!
8184uplink_topic_template="{{ .Backend.MQTT.UplinkTopicTemplate }}"
8285downlink_topic_template="{{ .Backend.MQTT.DownlinkTopicTemplate }}"
8386stats_topic_template="{{ .Backend.MQTT.StatsTopicTemplate }}"
@@ -154,6 +157,41 @@ marshaler="{{ .Backend.MQTT.Marshaler }}"
154157 max_reconnect_interval="{{ .Backend.MQTT.Auth.Generic.MaxReconnectInterval }}"
155158
156159
160+ # Google Cloud Platform Cloud IoT Core authentication.
161+ #
162+ # Please note that when using this authentication type, the MQTT topics
163+ # will be automatically set to match the MQTT topics as expected by
164+ # Cloud IoT Core.
165+ [backend.mqtt.auth.gcp_cloud_iot_core]
166+ # MQTT server.
167+ server="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.Server }}"
168+
169+ # Google Cloud IoT Core Device id.
170+ device_id="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.DeviceID }}"
171+
172+ # Google Cloud project id.
173+ project_id="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.ProjectID }}"
174+
175+ # Google Cloud region.
176+ cloud_region="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.CloudRegion }}"
177+
178+ # Google Cloud IoT registry id.
179+ registry_id="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.RegistryID }}"
180+
181+ # JWT token expiration time.
182+ jwt_expiration="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.JWTExpiration }}"
183+
184+ # JWT token key-file.
185+ #
186+ # Example command to generate a key-pair:
187+ # $ ssh-keygen -t rsa -b 4096 -f private-key.pem
188+ # $ openssl rsa -in private-key.pem -pubout -outform PEM -out public-key.pem
189+ #
190+ # Then point the setting below to the private-key.pem and associate the
191+ # public-key.pem with this device / gateway in Google Cloud IoT Core.
192+ jwt_key_file="{{ .Backend.MQTT.Auth.GCPCloudIoTCore.JWTKeyFile }}"
193+
194+
157195# Metrics configuration.
158196[metrics]
159197
0 commit comments