Repository navigation
Don't set a public-read ACL on deployed files - #37
Merged
Merged
Conversation
The hexdocs buckets use uniform bucket-level access, which rejects uploads that set an object ACL, and enforce public access prevention. Fastly reads them with its own key, so the files don't need to be public.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hexdocs buckets now use uniform bucket-level access (staging since https://github.com/hexpm/hexpm-ops/pull/459, prod next), and Cloud Storage rejects uploads that set an object ACL on those buckets with
400 Cannot insert legacy ACL for an object when uniform bucket-level access is enabled, so the next deploy would fail at the upload step. The buckets also enforce public access prevention, which blockspublicRead.The ACL isn't needed: Fastly reads the bucket with its own HMAC key and an
objectViewergrant, not as a public reader. After staging.hexdocs.pm switched,hexdocs.cssandsitemap.xmlwere still served withx-cache: MISS, MISS, so Fastly fetched them from the bucket. An upload to staging.hexdocs.pm with--predefined-acl=publicReadfailed with the 400 above, and the same upload without it succeeded.