[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