Skip to content

fix(auth): authorize DeleteObjects per key#2814

Merged
overtrue merged 1 commit into
rustfs:mainfrom
GatewayJ:fix/deleteobjects-prefix-auth
May 6, 2026
Merged

fix(auth): authorize DeleteObjects per key#2814
overtrue merged 1 commit into
rustfs:mainfrom
GatewayJ:fix/deleteobjects-prefix-auth

Conversation

@GatewayJ
Copy link
Copy Markdown
Member

@GatewayJ GatewayJ commented May 5, 2026

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other: N/A

Related Issues

Fixes #2766

Summary of Changes

  • Remove the whole-request bucket-level s3:DeleteObject authorization from DeleteObjects.
  • Keep DeleteObjects authorization in the per-object usecase path so mixed requests return per-key results.
  • Preserve s3:BypassGovernanceRetention checks by evaluating the header per object.
  • Add an STS inline-policy e2e test that allows deleting only one object prefix and expects per-key AccessDenied outside that prefix.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CI/CD passed (if applicable)

Impact

  • Breaking change (compatibility)
  • Requires doc/config/deployment update
  • Other impact: Aligns DeleteObjects authorization with object-level S3 policy resources. Deployments that relied on non-standard bucket-ARN s3:DeleteObject rules should use object ARNs such as arn:aws:s3:::bucket/*.

Additional Notes

Validation:

  • make pre-commit
  • cargo test -p e2e_test test_e2e_sts_ -- --nocapture

make pre-commit emitted Cargo jobserver warnings during doctests, but all checks completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

CLA requirements are satisfied for this pull request.

@GatewayJ GatewayJ marked this pull request as ready for review May 5, 2026 16:00
@GatewayJ GatewayJ requested review from loverustfs and overtrue May 5, 2026 16:10
@overtrue overtrue added this pull request to the merge queue May 6, 2026
Merged via the queue into rustfs:main with commit 090d60e May 6, 2026
8 checks passed
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.

DeleteObjects (Multi-Object Delete) requires explicit permission on Bucket ARN

3 participants