Skip to content

Comments

Adds admin session_passkey handling for 2.5 remote admin#655

Merged
ianmcorvidae merged 1 commit into2.5from
show-pubkey
Aug 24, 2024
Merged

Adds admin session_passkey handling for 2.5 remote admin#655
ianmcorvidae merged 1 commit into2.5from
show-pubkey

Conversation

@jp-bennett
Copy link
Contributor

Tested with a 2.5 node doing remote admin over pki with another 2.5 node, as well as a legacy admin against an older node. For completeness, probably should test this with a 2.4 local node as well.

@ianmcorvidae
Copy link
Contributor

This looks good to me!

Question, though -- do we need this for other admin "set" messages as well? writeChannel, setOwner, setURL, set_ringtone, set_canned_message, and stuff like "exit simulator", "reboot" etc. come to mind, and there might be some other places we should be pulling in the session key as well (e.g. when requesting channels, if writeChannel needs the key outbound, stuff like that)

@jp-bennett
Copy link
Contributor Author

Question, though -- do we need this for other admin "set" messages as well?

Ah, yes. I suppose there is more to remote admin than just the config fields. You're correct, it will need to grab the key from those responses, and set it when sending those messages.

Copy link
Contributor

@ianmcorvidae ianmcorvidae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, I think! We should consolidate those two entries in the protocols dict but otherwise I think this is good. We still need to add the fetch session key bit you mentioned in discord, of course. I'll try to give that a look if someone else doesn't beat me to it

portnums_pb2.PortNum.STORE_FORWARD_APP: KnownProtocol("storeforward", storeforward_pb2.StoreAndForward),
portnums_pb2.PortNum.NEIGHBORINFO_APP: KnownProtocol("neighborinfo", mesh_pb2.NeighborInfo),
portnums_pb2.PortNum.MAP_REPORT_APP: KnownProtocol("mapreport", mqtt_pb2.MapReport),
portnums_pb2.PortNum.ADMIN_APP: KnownProtocol(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just replacing it, but we should probably just add the handler to the existing entry for ADMIN_APP up on line 228

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed that it was already in there!

@ianmcorvidae ianmcorvidae merged commit ff72fc4 into 2.5 Aug 24, 2024
@jp-bennett jp-bennett deleted the show-pubkey branch June 6, 2025 14:21
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.

2 participants