Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up tasks for built-in bridge #2794

Open
9 of 13 tasks
jarhodes314 opened this issue Mar 25, 2024 · 2 comments
Open
9 of 13 tasks

Follow up tasks for built-in bridge #2794

jarhodes314 opened this issue Mar 25, 2024 · 2 comments
Assignees
Labels
improvement User value

Comments

@jarhodes314
Copy link
Contributor

jarhodes314 commented Mar 25, 2024

In #2716, support was added to the mapper for a built-in Cumulocity bridge, to replace the mosquitto-based bridge.

Here is a list of follow up tasks that need completing before the feature is fully complete and ready to be enabled for users:

  • Don't drop messages published when the mapper is down (see Add support for built-in bridge to tedge-mapper-c8y #2716 (comment) for a test case)
  • Support non-c8y clouds
  • Ensure custom templates work
    This appears to just work. I added a custom template ID to tedge config, restarted the mapper, and created the template in the Cumulocity UI and the mapper was forwarding messages received to c8y/s/uc/my-template-id. There were no issues with subscribing to the template topic before the template existed, as I hoped would be the case. Deleting the template in the UI didn't stop Cumulocity from sending the template messages, although this is clearly a Cumulocity behaviour, and not within our control, even if it does seem a bit weird.
  • Make mapper bridge health message look like other messages
  • Fix connectivity check in tedge connect c8y
  • Ensure status is reported as "up" after restarting local broker
  • Fix bridge health topic filtering (Initial follow up tasks for built-in bridge #2810 (comment))
  • Use the custom topic prefix in the tedge-mapper-c8y service name
  • Custom topic prefix validation
  • Various TODOs left in code in the original PR (to be expanded as notable ones are encountered)
  • Documentation
  • Make the associated configurations visible, both in tedge config list and tedge config list --doc
  • Remove the feature flag and enable the feature by default
@jarhodes314
Copy link
Contributor Author

I've been looking at making the logic work for tedge cert create and have hit a bit of an issue. In the case of the built-in bridge, we want the device certificate to be owned by tedge, but in the mosquitto bridge, the device certificate should instead be owned by mosquitto. At the moment, the configuration for the bridge is c8y.bridge.built_in, implying that this setting is per-cloud, but since only one of mosquitto or the mapper should be able to read the cert/key at a time, it isn't actually possible to have this setting work differently for different clouds.

@didier-wenzek @reubenmiller do you think it's reasonable to change the setting to bridge.built_in (or some other name), or do you have other suggestions as to how to resolve this?

@didier-wenzek
Copy link
Contributor

didier-wenzek commented Apr 5, 2024

I've been looking at making the logic work for tedge cert create and have hit a bit of an issue. In the case of the built-in bridge, we want the device certificate to be owned by tedge, but in the mosquitto bridge, the device certificate should instead be owned by mosquitto. At the moment, the configuration for the bridge is c8y.bridge.built_in, implying that this setting is per-cloud, but since only one of mosquitto or the mapper should be able to read the cert/key at a time, it isn't actually possible to have this setting work differently for different clouds.

@didier-wenzek @reubenmiller do you think it's reasonable to change the setting to bridge.built_in (or some other name), or do you have other suggestions as to how to resolve this?

I see different alternatives - none really convincing

  1. Having a device certificate per cloud. But how to ensure all these have the same CN? Furthermore, this doesn't really help here when the point is to connect the same cloud (c8y) using two different mechanisms (mosquitto bridge or built-in).
  2. Let tedge cert create checks the c8y.bridge.built_in setting (or better as you propose a generic bridge.built_in setting) to assign the appropriate owner to the private key, One might improve the user experience if tedge cert create can also be used to re-assign the proper owner if the setting for bridge.built_in is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement User value
Projects
None yet
Development

No branches or pull requests

2 participants