HomePhabricator
Diffusion Comm 11fa92ce3bec

[backup] Implement download latest endpoints

Description

[backup] Implement download latest endpoints

Summary:
ENG-4501

Endpoints for downloading backup_id and user_keys for the latest backup for a user. They will be used in the restoration flow in the future. They don't require authorization (because the primary device can't authenticate with identity service before it restores itself from backup). For now we treat username just as userID, in the future we will ask identity service to do this conversion for us (because the primary device also won't know it's userID only username provided by the user).

Depends on D8964

Test Plan:
Run:

GET http://127.0.0.1:50052/backups/latest/1/backup_id
GET http://127.0.0.1:50052/backups/latest/1/user_keys

Check if the returned data is correct. Check if it returns 404 for user without backups.

Reviewers: bartek, patryk, kamil, jon

Reviewed By: bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8965

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Aug 23 2023, 3:20 PM
Reviewer
bartek
Differential Revision
D8965: [backup] Implement download latest endpoints
Parents
rCOMM02d2d035d2ed: [backup] Introduce download endpoints
Branches
Unknown
Tags
Unknown