Skip to content

Commit 9fd2c8a

Browse files
committed
sts: put_object with bucket-owner-full-control
some session policy tests try get_object() after put_object() to test differences between session- and role policy, but put_object() adds ACLs that already grant access for get_object(). set canned acl 'bucket-owner-full-control' on put_object() so that get_object() permissions rely solely on policy Signed-off-by: Casey Bodley <[email protected]>
1 parent f3c85ae commit 9fd2c8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

s3tests/functional/test_sts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ def test_session_policy_bucket_policy_role_arn():
10811081
region_name='',
10821082
)
10831083
bucket_body = 'this is a test file'
1084-
s3_put_obj = s3_client.put_object(Body=bucket_body, Bucket=bucket_name_1, Key="test-1.txt")
1084+
s3_put_obj = s3_client.put_object(Body=bucket_body, Bucket=bucket_name_1, Key="test-1.txt", ACL='bucket-owner-full-control')
10851085
assert s3_put_obj['ResponseMetadata']['HTTPStatusCode'] == 200
10861086

10871087
try:
@@ -1157,7 +1157,7 @@ def test_session_policy_bucket_policy_session_arn():
11571157
region_name='',
11581158
)
11591159
bucket_body = 'this is a test file'
1160-
s3_put_obj = s3_client.put_object(Body=bucket_body, Bucket=bucket_name_1, Key="test-1.txt")
1160+
s3_put_obj = s3_client.put_object(Body=bucket_body, Bucket=bucket_name_1, Key="test-1.txt", ACL='bucket-owner-full-control')
11611161
assert s3_put_obj['ResponseMetadata']['HTTPStatusCode'] == 200
11621162

11631163

0 commit comments

Comments
 (0)