Project

General

Profile

Actions

Bug #37403

closed

Object can still be deleted even if s3:DeleteObject policy is set

Added by Enming Zhang over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
mimic, luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

For example, the testing bucket name is '111', the bucket owner is em_test1

[root@localhost ~]# s3cmd info s3://111
s3://111/ (bucket):
Location: default
Payer: BucketOwner
Expiration Rule: none
Policy: {"Version": "2012-10-17", "Statement": [{"Action": ["s3:PutObject", "s3:DeleteObject"], "Principal": {"AWS": ["arn:aws:iam:::user/em_test1"]}, "Resource": ["arn:aws:s3:::111/InterLeave"], "Effect": "Deny", "Sid": "worm1"}, {"Action": ["s3:GetObject"], "Principal": {"AWS": ["arn:aws:iam:::user/em_test2"]}, "Resource": ["arn:aws:s3:::111/InterLeave"], "Effect": "Allow", "Sid": "worm2"}]}
CORS: none
ACL: em_test1: FULL_CONTROL

We can see that there is a related bucket policy configuration set to bucket 111 which defines that the bucket owner em_test1 can not overwrite (by PutObject) and delete (by DeleteObject) the InterLeave object in the bucket 111.

root@localhost ~]# s3cmd put InterLeave s3://111
upload: 'InterLeave' -> 's3://111/InterLeave' [1 of 1]
37072 of 37072 100% in 0s 3.75 MB/s done
ERROR: S3 error: 403 (AccessDenied)

[root@localhost ~]# s3cmd del s3://111/InterLeave
delete: 's3://111/InterLeave'

Then we really can not overwrite the InterLeave object in bucket 111, but we can still delete it.


Related issues 2 (0 open2 closed)

Copied to rgw - Backport #38192: mimic: Object can still be deleted even if s3:DeleteObject policy is setResolvedPrashant DActions
Copied to rgw - Backport #38193: luminous: Object can still be deleted even if s3:DeleteObject policy is setResolvedPrashant DActions
Actions #2

Updated by Brad Hubbard over 5 years ago

  • Project changed from Ceph to rgw
Actions #3

Updated by Abhishek Lekshmanan over 5 years ago

  • Status changed from New to 17
Actions #4

Updated by Ken Dreyer about 5 years ago

  • Status changed from 17 to Pending Backport
  • Backport set to mimic, luminous
Actions #5

Updated by Nathan Cutler about 5 years ago

  • Copied to Backport #38192: mimic: Object can still be deleted even if s3:DeleteObject policy is set added
Actions #6

Updated by Nathan Cutler about 5 years ago

  • Copied to Backport #38193: luminous: Object can still be deleted even if s3:DeleteObject policy is set added
Actions #7

Updated by Nathan Cutler about 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF