-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Proposal] Add a generic device-based addressing scheme for "WAN" networks #133
Comments
Thoughts about channel isolation and authenticationProblemWe will have to take care that this implementation does not accidentally weaken Kotori's security concept, which is mostly based around limiting access to certain topics by path prefix, and mapping that to channel user/owner ACLs in Mosquitto, which are reflected on the second path level of the MQTT topic, after the You will recognize that it is not possible to apply an ACL rule on the MQTT topic If we don't apply any countermeasures here, direct-device-addressing will open the door to access the write path to anyone else's channels, even if they would be protected by a MQTT full-channel ACL. ExampleThose examples demonstrate the MQTT topics for the same data channel, while using different addressing schematics, classical channel-based vs. the new device-based scheme.
A typical Mosquitto ACL item currently looks like this.
SolutionsI see two possible solutions.
ConclusionCurrently, for @thiasB use case, I see no other choice than 1., adding a Please do not hesitate to share any ideas you might have about this detail. Thanks. Footnotes |
About
Based on my thoughts shared at GH-132, I am trying to generalize a few new requirements around data acquisition from TTN into another design principle of Kotori. On this matter, I am thinking about finally adding a device-based addressing/endpoint scheme, additionally to the channel-based approach Kotori is offering from the very beginning.
Please note while referring to TTN and HTTP within this proposal, the functionality is meant to be generally available, also for MQTT-based data acquisition.
Relation to the TTN integration
In this way, we will have a more generic foundation to build upon, and can specialize it by adding specific concerns around TTN on top of it. From a different perspective, the TTN WAN support feature would not take any significant detour from what Kotori will be offering anyway.
Requirements recap
We identified two more sensible variants to submit measurement/metric/telemetry data to Kotori.
Proposal
So, my proposal to implement those variants would be to introduce a new endpoint infix, but not special to TTN, which would just be
/d
, which means "device". If this would be followed by a device identifier, the device identifier would be picked from the URL. When there is no device identifier, and the data will be submitted straight to the realm address, the machinery will attempt to decode it from the message payload.Device identifier in URL
Example:
Device identifier in message payload
Example:
Feature request
The original feature request from @thiasB is:
As it is only a proposal yet, I will be happy to take your thoughts into consideration.
/cc @einsiedlerkrebs, @thiasB, @u-l-m-i, @ClemensGruber, @wetterfrosch, @MKO1640
The text was updated successfully, but these errors were encountered: