Skip to content

Conversation

jp-bennett
Copy link
Contributor

Seems like we'll want the switches to control PKI uplink and downlink via MQTT

@GUVWAF
Copy link
Member

GUVWAF commented Aug 11, 2024

There's already an "encryption_enabled" setting in the MQTT config. Can't we follow that?

@jp-bennett
Copy link
Contributor Author

There's already an "encryption_enabled" setting in the MQTT config. Can't we follow that?

We're treating PKI as a separate channel, so this setting follows the per-channel MQTT settings. I'm not sure how exactly that would map to encryption_enabled.

@GUVWAF
Copy link
Member

GUVWAF commented Aug 11, 2024

"encryption_enabled" applies to all packets sent to the MQTT server, no matter which channel. I think we can just follow the same logic for PKI?

@ianmcorvidae
Copy link
Contributor

I believe these new settings aren't for whether the uploaded packets are encrypted or not (with PKI they always are), it's for whether they're uplinked/downlinked to/from MQTT at all. Since the new PKI DMs use different keys, they're effectively "channel-less", so these options are the equivalent of the "uplink enabled" and "downlink enabled" that's on each channel, but for these new messages instead.

@ianmcorvidae
Copy link
Contributor

(or to put it more simply, maybe: if we followed encryption_enabled, then you would be unable to have both encrypted channel messages uplinked & PKI DMs not uplinked; you also wouldn't be able to have PKI messages uplink-only or downlink-only)

@GUVWAF
Copy link
Member

GUVWAF commented Aug 12, 2024

Summary of my points on Discord: currently we also don't have granular settings for uplinking/downlinking DMs and I believe this will be confusing because when you discover a node, you expect you can also DM it.
So if we want to reproduce the current behavior, we would need to uplink/downlink DMs that would otherwise have been sent over a channel we have uplink/downlink enabled. To avoid uplinking/downlinking every DM in an MQTT root topic, I think the best we can do is to check whether you have at least one channel uplink/downlink enabled and both the sender and receiver of the packet in your NodeDB, as then it's likely they share a channel you have uplink/downlink enabled on.

@jp-bennett
Copy link
Contributor Author

Shelving this for now.

@jp-bennett jp-bennett closed this Aug 15, 2024
@caveman99 caveman99 deleted the jp-bennett-patch-1 branch October 12, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants