Page MenuHomePhabricator

[Tunnelbroker] Route refreshkeys request to websocket connection

Authored by jon on May 1 2023, 7:14 AM.
Referenced Files
Unknown Object (File)
Mon, May 22, 6:50 PM
Unknown Object (File)
Mon, May 22, 4:49 PM
Unknown Object (File)
Mon, May 22, 12:07 AM
Unknown Object (File)
Wed, May 17, 11:56 PM
Unknown Object (File)
Wed, May 17, 5:09 PM
Unknown Object (File)
Tue, May 16, 3:47 PM
Unknown Object (File)
Tue, May 16, 11:14 AM
Unknown Object (File)
Thu, May 11, 12:02 PM



Ensure that messages issued to the gRPC endpoint end up
being routed to the correct websocket connection.

Test Plan
# Launch tunnelbroker in other window or in the background
(cd services/tunnelbroker && RUST_LOG=debug cargo run &)
cd services/commtest && cargo test --test tunnelbroker_integration_test

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 1 2023, 7:29 AM
Harbormaster failed remote builds in B18953: Diff 25963!
jon requested review of this revision.May 2 2023, 5:47 PM
varun requested changes to this revision.May 4 2023, 3:13 PM
varun added inline comments.
14 ↗(On Diff #26030)


30 ↗(On Diff #26030)

is unavailable the right code? how about not found instead?

71–79 ↗(On Diff #26030)

how does this work exactly? a comment might be helpful since the select macro seems to be doing a lot here

81 ↗(On Diff #26030)


97 ↗(On Diff #26030)

how about handle_outgoing_message?

This revision now requires changes to proceed.May 4 2023, 3:13 PM
jon marked 5 inline comments as done.

Address feedback

30 ↗(On Diff #26030)

Depends if you see it as "is the device available for a message", or "does a connection to this device exist?". I don't feel strongly either way.

81 ↗(On Diff #26030)

ambiguous if this is incoming from something like identity service or the device. I'll use handle_message_from_device

97 ↗(On Diff #26030)

It's not outgoing, it would be something like identity service asking this specific device to refresh keys. So the origin of the message is external to tunnelbroker or the device.

I'll do handle_message_from_service to keep it consistent.

Minor fixups, rebase on master

This revision is now accepted and ready to land.Mon, May 15, 4:24 AM