Page MenuHomePhabricator

[Tunnelbroker] implement FCM Access Token lifetime
ClosedPublic

Authored by kamil on Jul 16 2024, 1:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 10:50 PM
Unknown Object (File)
Mon, Dec 16, 10:50 PM
Unknown Object (File)
Mon, Dec 16, 10:50 PM
Unknown Object (File)
Mon, Dec 16, 10:50 PM
Unknown Object (File)
Mon, Dec 16, 10:50 PM
Unknown Object (File)
Thu, Nov 28, 4:19 AM
Unknown Object (File)
Nov 24 2024, 12:45 PM
Unknown Object (File)
Nov 24 2024, 11:59 AM
Subscribers

Details

Summary

Implementing what is described in Google's OAuth 2.0 for Server to Server Applications.

Depends on D12765

Test Plan

Call get_auth_bearer and make sure it's regenerated when needed. Later in the stack I tested both sending notif with correct and incorrect access token

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 16 2024, 2:38 AM
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
services/tunnelbroker/src/notifs/fcm/token.rs
103–104 ↗(On Diff #42323)

FCM_ACCESS_TOKEN_GENERATION_THRESHOLD is to handle time between this check and actual API call to send Firebase message

bartek added inline comments.
services/tunnelbroker/src/notifs/fcm/token.rs
98 ↗(On Diff #42323)

IMO a bit more natural

This revision is now accepted and ready to land.Jul 18 2024, 7:19 AM