HomePhabricator
Diffusion Comm d720180112f1

[reports-service] Obtain service-to-service token for anonymous requests

Description

[reports-service] Obtain service-to-service token for anonymous requests

Summary:
For reports service, we need to support both authenticated and anonymous requests. For authenticated requests, we can obtain the client token from the request context. For anonymous requests, we need to obtain the service-to-service token from the AuthService.

Depends on D9281

Test Plan:
Used Postman to call reports service. When provided UserIdentity token, it passed it through to Blob service. When not provided, it obtained the service-to-service token and passed it through to Blob service.
When called with service-to-service token, it returned HTTP 403 - we don't expect reports service to be called by other services.

Reviewers: michal, varun, jon

Reviewed By: michal

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on Sep 25 2023, 5:26 AM
Reviewer
michal
Differential Revision
D9282: [reports-service] Obtain service-to-service token for anonymous requests
Parents
rCOMM3eab259330b4: [blob][reports] Provide identity service endpoint
Branches
Unknown
Tags
Unknown