Address ENG-8256.
Added a special AMQP message, that when received by consumer for given device ID, the websocket session is closed.
Paths
| Differential D13227 Authored by bartek on Sep 2 2024, 11:46 PM.
Details Summary Address ENG-8256. Added a special AMQP message, that when received by consumer for given device ID, the websocket session is closed. Test Plan Modified SendMessageToDevice to send this message instead. Confirmed that the device is disconnected.
Diff Detail
Event Timelinebartek held this revision as a draft. Herald added subscribers: tomek, ashoat. · View Herald TranscriptSep 2 2024, 11:46 PM2024-09-02 23:46:35 (UTC-7) Harbormaster completed remote builds in B31403: Diff 43849.Sep 3 2024, 12:02 AM2024-09-03 00:02:28 (UTC-7) Comment Actions I also considered using an enum enum AMQPMessage { MessageToDevice(MessageToDevice), SessionClose } but again I had weird issues with serde when trying to make it backwards compatible with existing format. For now I sticked to simple "special message" constant. Comment Actions One note: This is safe because of serialization here and the malicious device will not be able to close other devices sessions. This revision is now accepted and ready to land.Sep 6 2024, 6:08 AM2024-09-06 06:08:06 (UTC-7) Closed by commit rCOMM407963823a72: [tunnelbroker] Close WS session when received special AMQP message (authored by bartek). · Explain WhySep 9 2024, 6:15 AM2024-09-09 06:15:46 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 43982 services/tunnelbroker/src/constants.rs
services/tunnelbroker/src/websockets/mod.rs
|