Page MenuHomePhabricator

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

Authored by bartek on Jun 13 2024, 12:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 2:55 PM
Unknown Object (File)
Sat, Dec 21, 2:55 PM
Unknown Object (File)
Sat, Dec 21, 2:55 PM
Unknown Object (File)
Sat, Dec 21, 2:54 PM
Unknown Object (File)
Sat, Nov 30, 10:48 AM
Unknown Object (File)
Fri, Nov 29, 1:04 AM
Unknown Object (File)
Wed, Nov 27, 12:59 PM
Unknown Object (File)
Nov 24 2024, 8:46 AM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jun 13 2024, 1:26 AM
varun added inline comments.
shared/comm-lib/src/http/auth.rs
73 ↗(On Diff #41262)

Authorization

This revision is now accepted and ready to land.Jun 14 2024, 6:26 AM