Repository navigation
fix(gateway): regression-test removed anonymous /thumbnails proxy - #73
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #45
Summary
The vulnerability from #45 (private video thumbnails publicly served) was already fixed in #43: the anonymous
/thumbnails/*MinIO proxy was removed from the gateway, the MinIO bucket is fully private, and metadata now returns presigned absolutethumbnail_urlvalues (MINIO_PUBLIC_ENDPOINT).This PR locks that in with a regression test:
services/gateway/cmd/server/main.go— router construction extracted frommain()into a testablenewRouter(cfg routerConfig)(mechanical refactor, no logic change).services/gateway/cmd/server/main_test.go(new) —TestNoAnonymousThumbnailsProxy:GET /thumbnails/vid-1/thumb.jpgandGET /thumbnails/must return 404 (no route — the anonymous proxy must never come back).Acceptance criteria
/thumbnails/*→ 404; direct MinIO without a signature → 403 (fully private bucket, presigned URLs from P0 infra: restrict MinIO anonymous policy and close 9000/8081 exposure #43).Verification
go test ./...(gateway) — pass, including the new regression testmake lint-go— 0 issuesmake test-go— all 8 packages okmake e2e— not run (requires the full Docker stack); the bucket-privacy guarantee is covered by deploy config from P0 infra: restrict MinIO anonymous policy and close 9000/8081 exposure #43Review