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)
Sat, Nov 2, 2:18 AM
Unknown Object (File)
Fri, Nov 1, 10:18 AM
Unknown Object (File)
Fri, Nov 1, 10:18 AM
Unknown Object (File)
Fri, Nov 1, 10:18 AM
Unknown Object (File)
Fri, Nov 1, 10:18 AM
Unknown Object (File)
Fri, Nov 1, 10:18 AM
Unknown Object (File)
Thu, Oct 31, 3:38 AM
Unknown Object (File)
Tue, Oct 22, 2:18 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
No Lint Coverage
Unit
No Test Coverage

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

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

IMO a bit more natural

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