Skip to content

Commit

Permalink
Fix s3_sync and s3_logging integration tests (#1801) (#1802)
Browse files Browse the repository at this point in the history
Fix s3_sync and s3_logging integration tests

SUMMARY
See also: ansible-collections/amazon.aws#1511
At the end of April Amazon updated various S3 bucket defaults. Buckets now have public_access blocked by default, and object_owner set to "BucketOwnerEnforced".
https://aws.amazon.com/blogs/aws/heads-up-amazon-s3-security-changes-are-coming-in-april-of-2023/
This change to the defaults resulted in some of our tests failing.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
s3_sync
s3_logging
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
(cherry picked from commit 4cad9ee)

Co-authored-by: Mark Chappell <mchappel@redhat.com>
  • Loading branch information
patchback[bot] and tremble committed May 4, 2023
1 parent ef84541 commit 37eb2bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/1797-s3-acls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trivial:
- s3_sync - fix tests broken by AWS changing default permissions
- s3_logging - fix tests broken by AWS changing default permissions
2 changes: 2 additions & 0 deletions tests/integration/targets/s3_logging/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
s3_bucket:
state: present
name: '{{ log_bucket_1 }}'
object_ownership: BucketOwnerPreferred
register: output
- assert:
that:
Expand All @@ -56,6 +57,7 @@
s3_bucket:
state: present
name: '{{ log_bucket_2 }}'
object_ownership: BucketOwnerPreferred
register: output
- assert:
that:
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/targets/s3_sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
s3_bucket:
name: "{{ test_bucket }}"
state: present
public_access:
block_public_acls: false
object_ownership: BucketOwnerPreferred
register: output

- assert:
Expand Down

0 comments on commit 37eb2bd

Please sign in to comment.