Page MenuHomePhabricator

[blob] Hide endpoints behind auth middleware
ClosedPublic

Authored by bartek on Jun 13 2024, 1:07 AM.
Tags
None
Referenced Files
F2830430: D12415.id41441.diff
Fri, Sep 27, 7:34 PM
Unknown Object (File)
Fri, Sep 27, 10:26 AM
Unknown Object (File)
Wed, Sep 18, 10:13 AM
Unknown Object (File)
Sat, Sep 14, 9:16 PM
Unknown Object (File)
Sat, Sep 14, 5:32 PM
Unknown Object (File)
Mon, Sep 9, 7:37 AM
Unknown Object (File)
Mon, Sep 9, 7:29 AM
Unknown Object (File)
Mon, Sep 9, 7:11 AM
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.Jun 13 2024, 2:11 AM
ashoat retitled this revision from [blob] Hide edpoints behind auth middleware to [blob] Hide endpoints behind auth middleware.Jun 13 2024, 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.Jun 17 2024, 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.