Repository navigation
fix: limit cached-read grants to object reads - #248
Conversation
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
[High impact] The change reaches cached-read authorization in transparent proxy mode. Do not merge yet: a successful public-object read can still grant access to private cached objects in the same bucket.
|
ovaistariq
left a comment
There was a problem hiding this comment.
Reviewed: cached-read grants are now issued only after a client GET/HEAD 2xx on a real object key with no foreign subresource, so a write-only principal's PUT no longer unlocks private cached reads for the bucket. Remaining gap (a public-object GET still grants the bucket) needs a Tigris-side authorization signal and is tracked as a follow-up.
|
🎉 This PR is included in version 1.22.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Transparent mode no longer treats a successful write or another non-object-read response as permission to read private cached data. TAG still learns signing keys from successful replies, but grants bucket-level cached-read authorization only after a recognized
GetObjectorHeadObjectsucceeds upstream.The response interceptor now separates key learning from authorization. It rejects other S3 subresources, including
GetObjectAttributes, and unknown or malformed query selectors even when they use GET. The internal signing-key header is still stripped on every response. No S3 route or configuration is added.The README, security guide, and transparent-proxy maintenance notes now describe this boundary. Routed tests keep multipart initiation and two-day signing-key learning intact, verify authorized GET/HEAD cache hits, and ensure that multipart and
GetObjectAttributesreplies do not grant access when the origin deniesGetObject. The tests also cover bucket isolation, authorization expiry and 403 revocation, and signing-key header failure paths.The routed correctness comparison found the assertion violated at
4df832ad38e8d9cc6cea919603be1ccd7657b75fand satisfied on the final source. The fixture uses a controlled origin policy; it does not establish a production incident or its frequency, and it does not address finer-grained object policies.The checks passed:
make lint-ci,make lint,make test,make test-integration, andmake test-race. Full repository CI remains pending.Recorded proof ran with retained support that is not included in this pull request.
Generated by Perfloop. Measurements and checks. Reproduce this comparison (tenant access required).
Note
High Risk
Changes authorization semantics for transparent mode cache hits; incorrect query classification could deny legitimate reads or still over-grant, with direct impact on access to private cached objects.
Overview
Tightens transparent-proxy cached-read authorization so a successful upstream response no longer automatically grants bucket read access when TAG learns signing keys.
The response interceptor now splits identity from permission:
learnSigningKeysstill caches derived keys from any successful reply with the internal header, butAuthzCache.Grantruns only ingrantReadAuthorizationafter a 2xx on a client GET/HEAD to a real object key.isReadAuthorizationQueryblocks grants for other subresources (e.g.?attributes,?tagging,?uploads, unknown query keys).Docs (README,
docs/security.md, transparent-proxy rules) describe that writes and passthrough successes do not confer cached-read rights. Unit tests cover the interceptor, query classifier, and signing-key failure paths; integration tests cover multipart/tagging/attributes vs deniedGetObject, HEAD cache hits, 403 revocation, and per-bucket isolation.Reviewed by Cursor Bugbot for commit 8233c19. Bugbot is set up for automated code reviews on this repo. Configure here.