Page MenuHomePhabricator

[Tunnelbroker][lib] add `BadDeviceToken` message type
ClosedPublic

Authored by kamil on Jul 29 2024, 2:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 12, 5:05 AM
Unknown Object (File)
Sat, Dec 7, 12:06 PM
Unknown Object (File)
Sat, Dec 7, 12:00 PM
Unknown Object (File)
Nov 9 2024, 11:36 PM
Subscribers

Details

Summary

ENG-8498.

Similar to keyserver one but for Tunnelbroker.

Depends on D12909

Test Plan

Tested later in the stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 29 2024, 6:25 AM
kamil edited the summary of this revision. (Show Details)
kamil edited the test plan for this revision. (Show Details)
bartek added inline comments.
lib/types/tunnelbroker/peer-to-peer-message-types.js
115 ↗(On Diff #42862)

Just curious - why do we need the invalid token value?

This revision is now accepted and ready to land.Jul 29 2024, 8:15 AM
lib/types/tunnelbroker/peer-to-peer-message-types.js
115 ↗(On Diff #42862)

To handle some race conditions and messages delivered with delay:

  1. Tunnelbroker discovers token is invalid and queue message
  2. Device uploads a new device token (handlers trying to do it on each app load)
  3. BadDeviceToken is delivered.

In case 3 we just ignore the message because we're invalidating a different token (implemented in D12912).

lib/types/tunnelbroker/peer-to-peer-message-types.js
115 ↗(On Diff #42862)

Okay, this makes perfect sense to me, thanks for explaining