Page MenuHomePhabricator

[Tunnelbroker] invalidate bad APNs tokens
ClosedPublic

Authored by kamil on Jul 29 2024, 2:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 3:57 PM
Unknown Object (File)
Sat, Nov 9, 11:36 PM
Unknown Object (File)
Sat, Nov 9, 7:51 PM
Unknown Object (File)
Sat, Nov 9, 7:12 PM
Unknown Object (File)
Wed, Nov 6, 11:03 PM
Unknown Object (File)
Fri, Nov 1, 12:03 AM
Unknown Object (File)
Sat, Oct 19, 8:24 AM
Unknown Object (File)
Fri, Oct 18, 9:46 PM
Subscribers

Details

Summary

ENG-8498.

Based on an error from APNs:

  1. Flip the flag in DDB.
  2. Send a message to device.

Depends on D12910

Test Plan

Manually malformed device token for iOS device in DDB, try sending notif to this device and verify that flag was flipped and the message was sent to the device (both online and offline device)

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:37 AM
kamil edited the summary of this revision. (Show Details)
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
services/tunnelbroker/src/websockets/session.rs
406 ↗(On Diff #42863)

we should use also Unregistered and ExpiredToken (410 status code) - I did mistake while committing, going to update in next rebase

bartek added inline comments.
services/tunnelbroker/src/websockets/session.rs
406 ↗(On Diff #42863)

Just FYI - this syntax should be possible:

if matches!(
  body.reason, 
  ErrorReason::BadDeviceToken | ErrorReason::Unregistered | ErrorReason::ExpiredToken
) {
This revision is now accepted and ready to land.Jul 29 2024, 8:20 AM
This revision was automatically updated to reflect the committed changes.

Forgot to add missing error - sorry for that

This revision is now accepted and ready to land.Jul 30 2024, 4:20 AM
This revision was landed with ongoing or failed builds.Jul 30 2024, 5:39 AM
This revision was automatically updated to reflect the committed changes.