Page MenuHomePhabricator

[blob] Hide endpoints behind auth middleware
ClosedPublic

Authored by bartek on Thu, Jun 13, 1:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 6:16 PM
Unknown Object (File)
Mon, Jun 24, 1:26 PM
Unknown Object (File)
Mon, Jun 24, 1:07 PM
Unknown Object (File)
Sun, Jun 23, 7:13 PM
Unknown Object (File)
Sun, Jun 23, 6:44 PM
Unknown Object (File)
Sat, Jun 22, 9:11 PM
Unknown Object (File)
Sat, Jun 22, 12:28 PM
Unknown Object (File)
Fri, Jun 21, 5:41 PM
Subscribers

Details

Summary

Wrapped all /blob/** endpoints with auth middleware.

By the way, added /health which was missing, but it's handy for AWS ECS to do health checks (until now it treated 404 as okay)

Depends on D12414

Test Plan

Test plan for D12414 for all blob endpoints. /health works without auth

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.Thu, Jun 13, 2:11 AM
ashoat retitled this revision from [blob] Hide edpoints behind auth middleware to [blob] Hide endpoints behind auth middleware.Thu, Jun 13, 8:23 AM
varun added inline comments.
services/blob/src/http/mod.rs
42 ↗(On Diff #41270)

do we need this clone?

This revision is now accepted and ready to land.Mon, Jun 17, 9:00 PM
services/blob/src/http/mod.rs
42 ↗(On Diff #41270)

yes, because HttpServer::new(move || { moves it into the closure, and the closure can be called multiple times, once for each HTTP listener thread.
But probably moving the get_comm_authentication_middleware() call into the closure could avoid the clone() call. Under the hood, they're equivalent, though.