thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
218 stars 54 forks source link

Support Cumulocity IoT SmartREST 1.0 topics #3008

Open reubenmiller opened 1 month ago

reubenmiller commented 1 month ago

Is your feature request related to a problem? Please describe.

Some customers with older Cumulocity IoT agents, have used SmartREST 1. Currently thin-edge.io does not support the SmartREST 1 topics, and therefore can't be used (out-of-the-box) to migrate existing agents to use the local MQTT broker.

Being able to use thin-edge.io with SmartREST 1 enables customers to slowing migrate their existing solutions, and they can still benefit from the out-of-the-box functionality provided by thin-edge.io, and still use any custom functionality provided by their agent (whist not having to worry about the Cumulocity IoT connection).

Though overtime it is still encouraged for users to migrate away from SmartREST 1 to SmartREST 2, however usage of SmartREST 1 should not be a blocker for thin-edge.io adoption.

Describe the solution you'd like

thin-edge.io should support SmartREST 1 topics to enable existing customers to re-use existing agents with thin-edge.io by using both the local MQTT broker (which bridges the Cumulocity IoT topics) and the local c8y proxy (for REST communication).

Requirements:

Describe alternatives you've considered

Additional context

reubenmiller commented 1 month ago

After some investigation, SmartREST 1.0 can't be used by thin-edge.io due to the usage of a certificate based device user (as the MQTT connection is via x509 certificates). The incompatibility arises as SmartREST 1.0 assumes Basic Auth, where as a cert-based device user uses Bearer Auth.

A follow up investigation is being done to see if an option to enable the older username/password style MQTT connection would be feasible to provide an easier upgrade path for existing users of SmartREST 1.0

reubenmiller commented 1 month ago

This ticket is on hold until https://github.com/thin-edge/thin-edge.io/issues/3036 is resolved