HomePhabricator
Diffusion Comm 41e4177c4707

[native][web] Add AuthMetadata to Blob service upload actions

Description

[native][web] Add AuthMetadata to Blob service upload actions

Summary:
Final diff resolving ENG-6288, ENG-6290 and ENG-6291.
Modified Blob service multimedia upload calls to add AuthMetadata to the request.

It'd be difficult to split this into smaller parts because of required types for blob upload functions in lib.

Depends on D10912.

Test Plan:
Extended test plan from previous diffs. Done on both web and native:

  • Enabled encrypted media and blob service, sent a multimedia message
  • Modified blob handlers the same way as in D10908 test plan
  • Opened chat on native - the multimedia loads correctly
  • (Web only) Also canceled message after the photo was preloaded - this caused "revoke holder" call on Blob service
  • Made sure Blob service logs for all endpoints (get, assign_holder, upload, revoke) contain auth metadata like this:
INFO get_blob{blob_hash=xn2ILjHR45XHsbjNf_wRalWNjusWtCNntiutX1eJn0w}: blob::http::handlers::blob: Get blob request auth=UserToken(UserIdentity { user_id: "foo", access_token: "baz", device_id: "9/Dk+21eU27n7fpvFDVWqNrouje2XKGW2jtLPC7vx+A" })
`

Reviewers: atul, tomek, inka, michal

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
bartekAuthored on Feb 1 2024, 5:31 AM
Reviewer
tomek
Differential Revision
D10913: [native][web] Add AuthMetadata to Blob service upload actions
Parents
rCOMMb30526643bde: [web] Pass CSAT to Blob service when fetching multimedia
Branches
Unknown
Tags
Unknown