HomePhabricator
Diffusion Comm 38138df4b9c6

[reports] Verify CSAT if present

Description

[reports] Verify CSAT if present

Summary:
CSAT for uploading reports is optional. If it's present, reporting user ID can be retrieved from it.
It's also used for Blob service requests (report upload). If it's not present, a service-to-service token is retrieved.

This diff handles the case, when requesting UserIdentity (CSAT) is present, but Identity verification failed.
In this case, we need service-to-service token, the same as for non-existing credential.

Depends on D12416

Test Plan:
Tested locally and on staging. Uploaded large (> 400kB) report with valid and invalid credentials.
Both uploads succeeded. Looking at Blob service logs (level=trace), noted that:

  • the former request used UserIdentity credential,
  • the latter request used ServicesToken credential.

Reviewers: varun, will, kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on Jun 13 2024, 12:50 AM
Reviewer
kamil
Differential Revision
D12448: [reports] Verify CSAT if present
Parents
rCOMMc459cea60ff1: [reports] Require auth for viewing reports
Branches
Unknown
Tags
Unknown