patches: add v1.11.0 owner-scoped access patch and its leil-rig proof
0003-owner-scoped-access.patch changes authorization, applied after the de-brand and dark-theme patches: - a bucket's ACL and policy may name only the owner's keys (accounts on the owner's UserID), whoever writes them, root included; - public access is read-only: all-users READ, and "*" allowed only s3:GetObject and s3:ListBucket; - the bucket policy never denies the owner's key; - DeleteBucket, PutBucketVersioning, PutObjectLockConfiguration and PutBucketOwnershipControls are reserved to root and admins; - an ACL with the all-users READ grant can be written back unchanged. docs/owner-scoped-access.md has the rules, what v1.11.0 already did, and the leil-rig proof procedure with its 2026-11-10 result: 63 of 63 on the patched build, 29 of 63 failing on stock v1.11.0. tests/owner-scope/ holds the proof script and a stdlib-only SigV4 request helper. README and the pipeline doc list the patch and how to re-verify it after a rebase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1984762186
commit
152ea01107
6 files changed
+1963
-6
No files matched your search
@@ -14,6 +14,13 @@ Artifact names are intentionally **unchanged** — the binary stays
|
||||
drop-in compatible with existing configs, systemd units, and the
|
||||
`versitygw` CLI. Only the embedded web UI is rebranded to "S3 Gateway".
|
||||
|
||||
The v1.11.0 series also carries one behavioural patch,
|
||||
**owner-scoped bucket access**: a bucket's ACL and policy may name only
|
||||
the owner's own keys, public access is read-only, and deleting a bucket
|
||||
or changing its versioning, object lock or ownership controls is left
|
||||
to the gateway's root and admins. See
|
||||
[docs/owner-scoped-access.md](docs/owner-scoped-access.md).
|
||||
|
||||
```
|
||||
upstream tag (vX.Y.Z) this repo
|
||||
github.com/versity/versitygw patches/<tag>/*.patch
|
||||
@@ -40,15 +47,19 @@ s3-gateway/
|
||||
├── patches/
|
||||
│ ├── v1.11.0/ # the supported series
|
||||
│ │ ├── 0001-webui-debrand.patch
|
||||
│ │ └── 0002-webui-dark-theme.patch
|
||||
│ │ ├── 0002-webui-dark-theme.patch
|
||||
│ │ └── 0003-owner-scoped-access.patch
|
||||
│ └── archive/ # superseded; kept, not built
|
||||
│ ├── v1.10.0/
|
||||
│ ├── v1.8.0/
|
||||
│ ├── v1.7.0/
|
||||
│ ├── v1.6.0/
|
||||
│ └── v1.5.0/
|
||||
├── tests/owner-scope/ # leil-rig proof test for 0003 (proof.sh, s3req.py)
|
||||
├── .gitea/workflows/build.yml
|
||||
└── docs/multi-version-pipeline.md
|
||||
└── docs/
|
||||
├── multi-version-pipeline.md
|
||||
└── owner-scoped-access.md # what 0003 does, and its proof test
|
||||
```
|
||||
|
||||
## Build locally
|
||||
@@ -86,9 +97,9 @@ publish a build of a superseded release.
|
||||
|
||||
Currently maintained:
|
||||
|
||||
| Upstream tag | Patch set | Contents |
|
||||
|--------------|---------------|-----------------------------------------------------------|
|
||||
| `v1.11.0` | `v1.11.0/` | `0001-webui-debrand.patch`, `0002-webui-dark-theme.patch` |
|
||||
| Upstream tag | Patch set | Contents |
|
||||
|--------------|---------------|---------------------------------------------------------------------------------------------|
|
||||
| `v1.11.0` | `v1.11.0/` | `0001-webui-debrand.patch`, `0002-webui-dark-theme.patch`, `0003-owner-scoped-access.patch` |
|
||||
|
||||
**v1.11.0 is the only supported version.** It supersedes `v1.10.0`
|
||||
with 42 further upstream fixes, so the older series — `v1.10.0`,
|
||||
@@ -141,6 +152,35 @@ The only markup change is the login page's light background gradient,
|
||||
which becomes a solid dark surface. It is part of the supported
|
||||
`v1.11.0` series, and of every archived set except `v1.5.0`.
|
||||
|
||||
### What the owner-scoped access patch does
|
||||
|
||||
`0003-owner-scoped-access.patch` changes authorization in `auth/` (plus
|
||||
one call in `s3api/controllers/bucket-put.go`). A bucket's owner is the
|
||||
account its ACL names; the owner's *keys* are every account with that
|
||||
account's `UserID`.
|
||||
|
||||
- **Only the owner's keys.** `PutBucketPolicy`, `PutBucketAcl` (body
|
||||
and grant headers) and `CreateBucket`'s grant headers — so also
|
||||
`versitygw admin create-bucket --grant-*` — refuse any account whose
|
||||
`UserID` is not the owner's. Root is refused too.
|
||||
- **Public means read.** `all-users` gets `READ` only; a policy may
|
||||
allow `"*"` only `s3:GetObject` and `s3:ListBucket`.
|
||||
`public-read-write` and every other public grant are refused.
|
||||
- **A policy adds to the ACL.** An `Allow` from either is enough and a
|
||||
policy `Deny` wins — except that the owner's key is never denied.
|
||||
- **Root/admin only:** `DeleteBucket`, `PutBucketVersioning`,
|
||||
`PutObjectLockConfiguration`, `PutBucketOwnershipControls` (and
|
||||
`DeleteBucketOwnershipControls`).
|
||||
- An ACL holding the `all-users` `READ` grant can be written back
|
||||
unchanged (upstream answers `500`).
|
||||
|
||||
It is the series' only patch outside `webui/`, and it has unit tests:
|
||||
after a rebase run `go test ./auth/ ./s3api/...` (on Linux — on Windows
|
||||
upstream's standalone-IAM, posix and CLI tests fail with or without the
|
||||
series) and
|
||||
the leil-rig proof test in
|
||||
[docs/owner-scoped-access.md](docs/owner-scoped-access.md#proving-the-patch-is-in-on-leil-rig).
|
||||
|
||||
## Adding / refreshing a version
|
||||
|
||||
When upstream cuts a new release you want a build of, you rebase the
|
||||
|
||||
Reference in new issue
Block a user