Skip to content
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

fix: cleanup backend ACLs #371

Merged
merged 1 commit into from
Jan 11, 2024
Merged

fix: cleanup backend ACLs #371

merged 1 commit into from
Jan 11, 2024

Conversation

benmcclelland
Copy link
Member

This adds the default ACL to the CreateBucket backend method so that the backend doesn't need to know how to construct and ACL.

This also moves the s3proxy ACLs to a tag key/value because the gateway ACLs are not the same accounts as the backend s3 server. TODO: we may need to mask this tag key/value if we add support for the Get/PutBucketTagging API.

@benmcclelland benmcclelland requested a review from mlt180 January 10, 2024 07:02
mlt180
mlt180 previously approved these changes Jan 10, 2024
tagout, err := s.client.GetBucketTagging(ctx, &s3.GetBucketTaggingInput{
Bucket: &bucket,
})
err = handleError(err)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

But these 2 actions are actually not supported in our gateway: GetBucketTagging, PutBucketTagging.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this means that we cant use our gateway as a backend for s3proxy yet. we will need to think about if we want to support this stacking.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can add these 2 actions support in posix. That wouldn't be a big deal for us

return SendResponse(ctx, fmt.Errorf("marshal acl: %w", err), &MetaOpts{Logger: c.logger, Action: "CreateBucket", BucketOwner: acct.Access})
}

err = c.be.CreateBucket(ctx.Context(), &s3.CreateBucketInput{
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have to support here to add bucket ACL on bucket creation, because the CLI and SDKs have this feature to define bucket ACL on creation. Maybe this could be a separate task?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, lets add a new issue for this

@mlt180 mlt180 dismissed their stale review January 10, 2024 12:46

There are 2 comments(not yet approved)

This adds the default ACL to the CreateBucket backend method so
that the backend doesn't need to know how to construct and ACL.

This also moves the s3proxy ACLs to a tag key/value because the
gateway ACLs are not the same accounts as the backend s3 server.
TODO: we may need to mask this tag key/value if we add support
for the Get/PutBucketTagging API.
@benmcclelland benmcclelland merged commit c406d70 into main Jan 11, 2024
5 checks passed
@benmcclelland benmcclelland deleted the ben/default_acl branch January 11, 2024 20:30
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.

2 participants