HomePhabricator
Diffusion Comm b19587c8124d

[comm-lib] Add env var to disable CSAT verification

Description

[comm-lib] Add env var to disable CSAT verification

Summary:
Introduced the COMM_SERVICES_DISABLE_CSAT_VERIFICATION env var flag that lets us skip
token verification for services.

Needed to replace built-in BearerAuth middleware extractor with a custom one, that
allows Authorization header to be optional. By the way, gained converting header value
into our AuthorizationCredential type for free.

Depends on D12411

Test Plan:
Tested more deeply in further diffs. At this point, wrapped Blob service endpoints with the middleware:

  • With env var set, request succeeded with and without Authorization header
  • Without the env var, HTTP 401 was returned if header was not provided or was malformed.

At this point, only header format is validated, credentials may be invalid

Reviewers: varun, will, kamil

Reviewed By: varun

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on Jun 12 2024, 8:07 AM
Reviewer
varun
Differential Revision
D12412: [comm-lib] Add env var to disable CSAT verification
Parents
rCOMM6ee7d17d7527: [comm-lib] Use futures_util::Ready to simplify code
Branches
Unknown
Tags
Unknown