Thanks to visit codestin.com
Credit goes to github.com

Skip to content

implement S3 native ACL #8902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 21, 2023
Merged

implement S3 native ACL #8902

merged 3 commits into from
Aug 21, 2023

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Aug 13, 2023

Motivation

Implement S3 Bucket and Object ACL, even if not enforced, in the new S3 provider.

Changes

This combines Moto ACL implementation with the fixes we have in moto-ext. For this we are not going the extra miles, keeping the same functionality as we had. As we do not enforce ACL at the moment, this is fine. AWS does not encourage the use of ACL now.
Also added some tests for GetObjectACL/PutObjectACL which were missing.
This PR implements:

  • PutBucketACL
  • GetObjectACL
  • PutObjectACL
  • GetObjectACL
  • Support for ACL in following operations:
    • PutObject
    • CreateMultipartUpload
    • CopyObject

@bentsku bentsku added aws:s3 Amazon Simple Storage Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Aug 13, 2023
@bentsku bentsku self-assigned this Aug 13, 2023
@coveralls
Copy link

coveralls commented Aug 13, 2023

Coverage Status

coverage: 80.81% (-0.1%) from 80.955% when pulling 5b821fd on s3-native-acl into e6c117f on master.

@bentsku bentsku force-pushed the s3-native-policy-replication branch from 241be74 to db3f515 Compare August 15, 2023 21:18
@bentsku bentsku marked this pull request as ready for review August 15, 2023 22:13
@bentsku bentsku requested a review from macnev2013 as a code owner August 15, 2023 22:13
@bentsku bentsku force-pushed the s3-native-policy-replication branch from db3f515 to a3af01c Compare August 16, 2023 15:14
@bentsku bentsku requested a review from thrau as a code owner August 16, 2023 15:14
@thrau thrau removed their request for review August 16, 2023 15:24
@thrau
Copy link
Member

thrau commented Aug 16, 2023

i'll let @macnev2013 review this one :-)

Base automatically changed from s3-native-policy-replication to master August 16, 2023 16:15
@github-actions
Copy link

LocalStack Community integration with Pro

       2 files         2 suites   1h 34m 33s ⏱️
2 086 tests 1 659 ✔️ 427 💤 0
2 087 runs  1 659 ✔️ 428 💤 0

Results for commit c2b8852.

Copy link
Contributor

@macnev2013 macnev2013 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great sets of changes. LGTM 🚀

grantee = Grantee(
Type=GranteeType.CanonicalUser,
ID=grantee_id,
DisplayName="webfile", # TODO: only in certain regions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: only in certain regions

Maybe in next iteration we can write a test case a snapshot validated parameterized test case. Which tests this specific scenario for all the regions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should have a list of those regions in the S3 documentation, this would be great for parity! Right now we have the same behaviour as moto, but would be great to expand on it

@bentsku bentsku merged commit 0b7a9ab into master Aug 21, 2023
@bentsku bentsku deleted the s3-native-acl branch August 21, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:s3 Amazon Simple Storage Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants