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

Separate bucket configs for CORS and website policies #397

Merged
merged 7 commits into from
Mar 21, 2019

Conversation

kherock
Copy link
Collaborator

@kherock kherock commented Feb 18, 2019

This should be the last major refactor before implementing the rest of the features planned for 3.0

This adds the concept of "subresources" to the store interface. Currently only bucket cors and website configs use this interface, but it's written to generically support other subresources like object/bucket ACLs, tagging, etc.

Since bucket configurations used to be globally applied, this has substantial implications to the CLI and programmatic interface. I've added the prefabBuckets[] option (or --create-bucket in the CLI) for composing buckets individually at startup that should work as a suitable replacement for users relying on the old cors, indexDocument, and errorDocument options. I've included sample configs in the example folder at the project root.

(This also adds Prettier markdown formatting, I originally meant to include it as a separate commit/PR but it ended up getting lumped into this)

@kherock kherock force-pushed the separate-bucket-configs branch from c699d26 to 5826960 Compare February 18, 2019 06:30
@kherock kherock mentioned this pull request Feb 18, 2019
24 tasks
@kherock kherock force-pushed the separate-bucket-configs branch from 5826960 to ea4da86 Compare February 18, 2019 06:55
@kherock
Copy link
Collaborator Author

kherock commented Feb 18, 2019

@leontastic This is also ready to be reviewed. BTW, I was having trouble deciding on what to call the new prefabBuckets option - I essentially I want to communicate "ensure and configure buckets". I don't like createBuckets since it's not a good analog to AWS's actual createBucket method for S3. The other name I had in mind was precomposeBuckets.

@leontastic
Copy link
Collaborator

@kherock It might be a while before I'll have time to review this diligently... If you are confident in your changes and are able to devote time to fixing bugs and responding to issues, I say go for it. No need to wait on me – you're probably more familiar with the codebase than I am now.

Thanks for your hard work, I know the community appreciates it. 😄

kherock added 5 commits March 2, 2019 22:06
This contains major breaking changes to the CLI and programmatic
interface. Bucket configurations can be set through the S3 API at
runtime or via S3rver configuration options.
… and deletion of buckets with custom configuration
@kherock kherock force-pushed the separate-bucket-configs branch from e6b73e2 to c2e5706 Compare March 3, 2019 03:06
@kherock kherock changed the base branch from koa to next March 3, 2019 03:15
@kherock kherock merged commit e4d6161 into next Mar 21, 2019
@kherock kherock deleted the separate-bucket-configs branch August 5, 2019 04:46
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