Authorize explicit object version deletes - #59
Draft
metaneutrons wants to merge 2 commits into
Draft
Conversation
Signed-off-by: metaneutrons <436979+metaneutrons@users.noreply.github.com>
Signed-off-by: metaneutrons <436979+metaneutrons@users.noreply.github.com>
metaneutrons
force-pushed
the
fix/delete-object-version-authorization
branch
from
August 15, 2026 13:50
45843b3 to
197000d
Compare
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 changed
versionIdusings3:DeleteObjectversionId=null, usings3:DeleteObjectVersions3:versionidcondition valueDeleteObjectfor explicit versionsWhy
Silo previously required
s3:DeleteObjectfor every delete and treateds3:DeleteObjectVersiononly 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:DeleteObjectmust grants3:DeleteObjectVersioninstead. Current-object deletes continue to requires3:DeleteObject.Validation
go test ./cmd -count=1go vet ./cmdCGO_ENABLED=0 go build ./...make verifierswith the module-pinnedstringerandmsgpgeneratorsgovulncheck ./cmd: no called vulnerabilitiesRegression 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 ands3:versionidselection; explicit deny precedence; denied-data preservation; and preservation of the object version beneath an explicitly deleted marker.Reference
DeleteObjectwithoutversionIdrequiress3:DeleteObject; a specific version requiress3:DeleteObjectVersion.