S3 gateway: auth-mode compatibility testing, recalibrate to 192/838, add badge#23
Merged
Merged
Conversation
… 192/838 Make the ceph/s3-tests compatibility suite run cleanly against the gateway with SigV4 auth + S3 ACLs enabled (the basis the CI compose uses), fix the gateway bug that previously made that impossible, recalibrate the allowlist, and add a self-updating compatibility badge. Gateway fix — ListBuckets is ownership-scoped: ListAllMyBuckets filtered visible buckets by READ permission, so a bucket made public-read by one account leaked into every other account's listing. Under the suite (auth on) this poisoned cleanup: the per-test setup() nukes all prefixed buckets via each account's client, and a foreign public-read bucket in account B's listing made B's DeleteObjects on it return 403, which the suite re-raises, cascading the whole run into setup/teardown errors. ListBuckets now filters by ownership (BoxAcl.owner == principal), matching AWS/RGW. Anonymous mode is unchanged (owns() short-circuits when auth is disabled). Recalibration (ceph/s3-tests master @ 5522d1c, auth + ACLs enabled): 192 passed / 552 failed / 94 skipped, 0 errors -- up from the 164 pre-auth baseline. The net +28 (0 regressions) is exactly what real auth unlocks: bucket/object ACLs, cross-account access control, auth negatives, and anonymous-access checks. Refreshed allowlist.txt and rewrote compat/s3-tests/README.md for the auth basis (supported-surface table, the ListBuckets ownership note, family-by-family failure breakdown summing to 552). Self-updating badge: run.sh --calibrate now also emits badge.json (a Shields endpoint payload) with the passed/collected percentage, surfaced as the README "S3 compatibility" badge (22%, 192/838) so it tracks future calibrations automatically. Tooling: Added S3CompatGatewayLauncher, a Docker-less in-JVM stack (embedded BookKeeper + ZooKeeper + node + gateway) so the suite can be calibrated without the rate-limited Docker Hub images, and bounded EmbeddedBookKeeper's open-file cache so a single bookie survives the suite's heavy ledger churn under a low RLIMIT_NOFILE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MejdBZYEDJWFU6s88tZH6t
✅ S3 compatibility gate passed
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
=========================================
Coverage 83.66% 83.66%
Complexity 677 677
=========================================
Files 161 161
Lines 8874 8876 +2
Branches 1330 1330
=========================================
+ Hits 7424 7426 +2
Misses 970 970
Partials 480 480 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What & why
Make the
ceph/s3-testscompatibility suite run cleanly against the gateway with SigV4 auth + S3 ACLs enabled (the basis the CI compose uses), fix the gateway bug that previously made auth-mode calibration impossible, recalibrate the allowlist, and add a self-updating compatibility badge.Previously the auth-enabled suite collapsed into 659 fixture errors — not a real compatibility signal. Root cause below.
Gateway fix —
ListBucketsis ownership-scopedListAllMyBucketsfiltered visible buckets by READ permission, so apublic-readbucket owned by one account leaked into every account's listing. Under the suite (auth on) this poisoned cleanup: the per-testsetup()nukes all prefixed buckets via each account's client, and a foreignpublic-readbucket showing up in account B's listing made B'sDeleteObjectson it return 403, which the suite re-raises — cascading the whole run into setup/teardown errors.Fix:
ListBucketsnow filters by ownership (BoxAcl.owner == principal), matching AWS/RGW whereListAllMyBucketsreturns only buckets you own. Anonymous mode is unchanged (owns()short-circuits when auth is disabled).Recalibration (ceph/s3-tests
master@5522d1c, auth + ACLs enabled)28 newly passing, 0 regressions over the 164 pre-auth baseline — exactly what real auth unlocks: bucket/object ACLs (
bucket_acl_*,object_acl_*), cross-account access control (access_bucket_private_*), auth negatives (list_buckets_bad_auth), and anonymous-access checks.Self-updating badge
run.sh --calibratenow also emitsbadge.json(a Shields endpoint payload) with thepassed / collectedpercentage, surfaced as the README S3 compatibility badge (22%, 192/838) so it tracks future calibrations automatically.Tooling
Added
S3CompatGatewayLauncher, a Docker-less in-JVM stack (embedded BookKeeper + ZooKeeper + node + gateway) so the suite can be calibrated without the rate-limited Docker Hub images, and boundedEmbeddedBookKeeper's open-file cache so a single bookie survives the suite's heavy ledger churn under a lowRLIMIT_NOFILE.Verification
run.shin gate mode against the auth gateway reproduces the 192-test allowlist green.Notes / follow-ups
compat/s3-tests/README.md.🤖 Generated with Claude Code
Generated by Claude Code