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

Creating configuration to set a default ACL for new objects #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AgentScrubbles
Copy link

Some S3 providers (such as DigitalOcean) do not provide a bucket-wide option for "public read" for newly added items. Instead, an ACL must be set on the metadata of each putObject request into the bucket setting the x-amz-acl header to public-read.

Here I've implemented another S3 configuration option to read in a new configuration key, S3_DEFAULT_ACL (which would then be public-read for those providers who require it), and then use it to set the header value. If it is undefined, it will act as it currently does today and not send anything.

Minio translates metadata into headers, and will pass this along as a header.

Also added tests around this change, and fixed a small typing issue (the as never), which appears to be a non-issue.

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.

1 participant