-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
backend/s3proxy/s3.go
Outdated
tagout, err := s.client.GetBucketTagging(ctx, &s3.GetBucketTaggingInput{ | ||
Bucket: &bucket, | ||
}) | ||
err = handleError(err) | ||
if err != nil { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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.
61d84af
to
6481e2a
Compare
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.