Skip to content

Authorize explicit object version deletes - #59

Draft
metaneutrons wants to merge 2 commits into
pgsty:mainfrom
metaneutrons:fix/delete-object-version-authorization
Draft

Authorize explicit object version deletes#59
metaneutrons wants to merge 2 commits into
pgsty:mainfrom
metaneutrons:fix/delete-object-version-authorization

Conversation

@metaneutrons

@metaneutrons metaneutrons commented Aug 15, 2026

Copy link
Copy Markdown

What changed

  • authorize DELETE requests without versionId using s3:DeleteObject
  • authorize DELETE requests with an explicit version, including versionId=null, using s3:DeleteObjectVersion
  • select the action independently for each entry in multi-delete requests
  • preserve the effective per-entry s3:versionid condition value
  • remove the obsolete compatibility check that still required DeleteObject for explicit versions

Why

Silo previously required s3:DeleteObject for every delete and treated s3:DeleteObjectVersion only as an additional deny check. This prevented a least-privilege principal from deleting exact immutable versions without also gaining permission to delete the current key or create delete markers.

The new mapping follows AWS S3 authorization semantics and keeps current-object and exact-version deletion independently grantable.

Closes #58.

Compatibility

This is an authorization change, not an S3 API or storage-format change. Policies that intentionally allowed explicit version deletes with only s3:DeleteObject must grant s3:DeleteObjectVersion instead. Current-object deletes continue to require s3:DeleteObject.

Validation

  • focused authorization suite, repeated 10 times
  • focused race-detector suite
  • complete go test ./cmd -count=1
  • go vet ./cmd
  • CGO_ENABLED=0 go build ./...
  • make verifiers with the module-pinned stringer and msgp generators
  • govulncheck ./cmd: no called vulnerabilities

Regression coverage includes signed IAM identity policies and anonymous bucket policies; single and multi-delete; UUID, null, and delete-marker versions; inverse permission boundaries; per-entry action and s3:versionid selection; explicit deny precedence; denied-data preservation; and preservation of the object version beneath an explicitly deleted marker.

Reference

Signed-off-by: metaneutrons <436979+metaneutrons@users.noreply.github.com>
Signed-off-by: metaneutrons <436979+metaneutrons@users.noreply.github.com>
@metaneutrons
metaneutrons force-pushed the fix/delete-object-version-authorization branch from 45843b3 to 197000d Compare August 15, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authorize explicit object-version deletes with s3:DeleteObjectVersion

1 participant