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
F2831587: D12412.diff
Sat, Sep 28, 12:30 AM
Unknown Object (File)
Mon, Sep 9, 10:28 PM
Unknown Object (File)
Mon, Sep 9, 5:18 PM
Unknown Object (File)
Mon, Sep 9, 5:08 PM
Unknown Object (File)
Mon, Sep 9, 3:35 AM
Unknown Object (File)
Mon, Sep 9, 2:59 AM
Unknown Object (File)
Mon, Sep 9, 2:08 AM
Unknown Object (File)
Wed, Sep 4, 2:26 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