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)
Wed, Aug 28, 8:44 PM
Unknown Object (File)
Wed, Aug 28, 6:23 AM
Unknown Object (File)
Tue, Aug 27, 5:47 AM
Unknown Object (File)
Tue, Aug 27, 5:44 AM
Unknown Object (File)
Tue, Aug 27, 5:41 AM
Unknown Object (File)
Tue, Aug 27, 5:22 AM
Unknown Object (File)
Tue, Aug 27, 4:11 AM
Unknown Object (File)
Mon, Aug 26, 12:35 PM
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